I mentioned in the first chapter that the code called by controllers must be thread-safe. We also noticed that the result of calling an action has type
Future[Result] rather than just
Result. This chapter explains these subtleties and gives answers to questions such as "How are concurrent requests processed by Play applications?"
More precisely, this chapter presents the challenges of stream processing and the way the Play framework solves them. You will learn how to consume, produce, and transform data streams in a non-blocking way using the Iteratee library. Then, you will leverage these skills to stream results and push real-time notifications to your clients. By the end of the chapter, you ...