suppose i have a client which sends the request to server to generate numbers from 1 to 100 and send the response back to client. Assume that generating numbers from 1 to 100 is very tedious job and it requires lot of resources so my server will start generating the numbers and sends the numbers to client as soon as the number is generated on server, instead of generating all number and sending the response at once to client.
It is something like flipkart page. if you open a page we can see that, the page is keep on updating with new products at the bottom, instead of listing all products once at one shot.
Can any one please suggest me some efficient technique in java for my simple use case ?