Writing incremental computations using iteratees
There is another situation, which I haven't mentioned yet, where the server could be waiting for a remote response: when it reads the body of an incoming request. Indeed, according to the upload speed of the client, the server may be waiting between every chunk of data. In this situation, the job of the server consists of parsing the request body to make it available to the action's code. However, you don't want the server to block for the inputs to arrive, and you probably don't want the server to load the entire request body in memory, just in case it is a big file! Play provides a specific abstraction named Iteratee
for the purpose of incrementally consuming a stream of data in a non-blocking ...
Get Play Framework Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.