Chapter 9. Reactive Streams

 

This chapter covers

  • Reasons for defining a Reactive Streams standard
  • The building blocks of the Akka Streams library that implements Reactive Streams
  • Using Akka Streams in combination with iteratees and building a simple flow graph
  • Observing reactive back pressure in action

The Reactive Streams standard (www.reactive-streams.org) defines the interfaces, methods, and protocols necessary for building interoperable libraries that enable asynchronous stream processing with nonblocking back pressure. There are already a few implementations of this standard, and in this chapter we’ll take a look at the Akka Streams library (http://doc.akka.io/docs/akka-stream-and-http-experimental/current). We’ll start by asking why Reactive Streams is useful at all, and then we’ll move on to exploring a few of the basic building blocks of Akka Streams. Finally, we’ll get our hands dirty revising and extending our application from chapter 2 with Akka Streams.

9.1. Why Reactive Streams

There are two major motivations behind the development of the Reactive Streams standard, both stemming from the fact that there’s an increased need for transferring large quantities of data across asynchronous boundaries—boundaries between different applications, different CPUs, or different networked systems. These quantities of data may be so large, in fact, that they can’t always be processed at full speed by the system on the receiving end.

9.2. Introducing Akka Streams

9.3. Summary