O'Reilly logo

Play Framework Essentials by Julien Richard-Foy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Controlling the data flow

Iteratees allow us to consume data streams and enumerators to produce data streams. With their reactive programming model, we just say what to do when data is available. But how is the data flow controlled? Consider, for instance, a situation where a producer generates data at a higher rate than what the facing iteratee can consume, what happens then?

In that case, iteratees impose their speed to data producers. It means that if your server is slower than a client uploading a file, the uploading process will be slowed down according to the iteratee processing speed. This feature is called back-pressure handling.

Conversely, in some cases, you don't want things to be slowed down, for instance, if you are serving data to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required