Book Image

Play Framework essentials

By : Julien Richard-Foy
Book Image

Play Framework essentials

By: Julien Richard-Foy

Overview of this book

Table of Contents (14 chapters)
Play Framework Essentials
About the Author
About the Reviewers


This chapter detailed a lot of things on the internals of the framework. You now know that Play uses an evented execution model to process requests and serve responses and that it implies that your code should not block the execution thread. You know how to use future blocks and promises to define computation fragments that can be concurrently managed by Play's execution context and how to define your own execution context with a different threading policy, for example, if you are constrained to use a blocking API.

You now know how to define incremental computations consuming streams of data, how to produce such streams of data, and how to transform them. You learned how to put this in practice in your HTTP layer to stream your responses using the chunked transfer encoding, to incrementally parse the body of the requests, and to send push notifications to your clients using server-sent events or WebSockets.

You also learned that keeping your server stateless makes it easier to scale...