Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Reactive Streams with Akka Streams

Reactive Streams with Akka Streams

This item in japanese

Lire ce contenu en français

Typesafe has announced the early preview of Akka Streams, an open source implementation of the Reactive Streams draft specification using an Actor-based implementation. Reactive Streams is an initiative to provide a standard for asynchronous stream processing with non-blocking back pressure on the Java Virtual Machine (JVM). Asynchrony is required to enable the parallel use of computing resources, and back pressure in needed to make sure the data producer doesn't overwhelm the data consumer and potentially bring down the entire system. Reactive Streams is an engineering collaboration between Twitter, Oracle, Pivotal, Red Hat, Applied Duality, Typesafe, Netflix, and Doug Lea.

There is an increase in stream-based processing, like those that stream video, handle transactions for millions of concurrent users, or find patterns in real-time user actions. Handling streaming data, both real-time content and bulk data transfers, requires special care since the resource consumption needs to be carefully controlled so that a fast data source does not overwhelm the stream destination. The goal of the Reactive Streams specification is to create a standard for achieving statically typed, high-performance, low latency, and asynchronous streams of data with built-in non-blocking back pressure, which hopefully will lead to standardized Java platform support. The capability of handling back-pressure between asynchronous execution stages will enable the distribution of stream processing across a cluster of thousands of nodes. When a system reaches capacity, overflow handling kicks in, which could be achieved either by slowing down the external source or dropping requests in a controlled fashion.

Akka Streams, the Akka implementation of the Reactive Streams specification, is based on Actors as its mechanism for execution, distribution and resilience. A fluent DSL allows the formulation of processing graphs, which are then turned into an underlying Actor network. The current implementation runs every step within its own Actor, but future releases will add other variants, like batching operations to run within a single Actor.

The Reactive Streams specification allows the creation of conforming, interoperating implementations. There are currently 3 implementations of the Reactive Streams draft specification. The first one is Akka Streams. The second one is Reactor Composable. The implementation draft is being explored for Reactor 1.1 and onwards. The third one is RxJava. Support is being prototyped and explored for inclusion in RxJava 1.0.

To get started, you can download Typesafe Activator and get started with the Akka Streams Scala template. The Akka Streams Java template is forthcoming. For more information, read the official Typesafe announcement and Real-Time Data Streaming Gets Standardized at ReadWrite. You can also register for the Introducing Reactive Streams webinar scheduled on May 7, 2014 at 9:00 AM PDT.

Rate this Article