Presentation: Reactive Streams, j.u.concurrent, & Beyond!


11:50am - 12:40pm



Key Takeaways

  • Gain a more solid understanding between the use of reactive systems, and reactive streams.
  • Understand how the reactive streams protocol works and how it will affect your code.
  • Learn about one of the substantial building blocks of reactive and the JDK is heading.


Reactive Streams are a cross-company initiative first ignited by Lightbend in 2013, soon to be joined by RxJava and other implementations focused on solving a very similar problem: asynchronous non-blocking stream processing, with guaranteed over-flow protection. Fast forward to 2016 and now these interfaces are part of JSR-266 and proposed for JDK9.

In this talk we'll first disambiguate what the word Stream means in this context (as it's been overloaded recently by various different meanings), then look at how its protocol works and how one might use it in the real world showing examples using existing implementations.

We'll also have a peek into the future, to see what the next steps for such collaborative protocols and the JDK ecosystem are in general.


QCon: What is your role today?

Konrad: I am a senior developer in the Akka core team at Lightbend. I’m mostly focused on the core concurrency module, persistence as well as Streams and Akka HTTP which I maintain. One could summarise this as reactive distributed programming.

QCon: How would you describe the persona of the target audience of this talk?

Konrad: I would say architects, but really it’s anyone that has a bunch of systems and needs to think about how those systems interact. If you’ve been running production systems and dealing with overloaded boxes etc, this topic surely will be easy to relate to for you.

QCon: What’s the motivation for your talk?

Konrad: Both streams and reactive have very overloaded meanings right now. When you say “reactive”, for many people it’s still a relatively new term, and the confusion in naming that has came up in the recent year with new projects using this naming in different contexts only adds to the confusion. A few years ago we set the story straight for that with the Reactive Manifesto. On the other hand the word “stream” is also rather overloaded right now, with JDK streams being more like parallel collections, and spark streaming being micro batches. So where do “reactive streams” fit in all of this? The goal of this talk is to explain what "reactive streams" in the JDK actually means.

For example, recently when people think "streaming," they think "Spark streaming" (or something like that). But that is only one of the many flavors of streaming. And is is not really the problem space that Reactive Streams are addressing. Reactive Streams is a high-performance asynchronous, yet local, way of communicating without overflowing either participant – e.g. two threads, actors or message queues communicating. Using this as a building block, we’re able to provide new kinds of abstractions that work well together.

The key feature is that libraries agreed that we should standardize these things. So when you have an Akka or RxJava application (or library), you can be sure that it will inter-operate seamlessly with any other Reactive Streams compatible library. It avoids lock-in and fosters the growth or a larger for-the-shared-good ecosystem for all streaming libraries. It’s like "hey, thanks to reactive streams we have so many interim possibilities, and I know all of them work the correct way".

So the talk explains how would you use this stuff in the real world. For example, we recently created some connectors to Kafka, AMQP, MQTT, S3 and more. From there, with a couple lines of code you can get a stream and connect it right away to any other reactive streams compatible component, for example a streaming web server (like Akka HTTP) to provide a streaming API endpoint in just a few lines of code. There’s not even much to demo with these example as it often boils down to just a few lines of code, all the heavy lifting being solved internally. I think that’s the impressive part; that it just works–all these technologies just fit together, thanks to the shared fundamentals we laid out.

QCon: QCon targets advanced architects and senior development leads; what do you feel are the key takeaways for those type of people?

Konrad: I would like such a person to understand on what level this abstraction is. It’s also really important step back and understand the foundational principles here before following the crowd. Then we’ll talk about one of the building blocks which is functional reactive programming and its impact on various libraries.

So on one hand, we have Reactive Systems, which encompases a wider system architecture, that embraces resilience to failure and elasticity. And what we now have with libraries like Akka Streams or RxJava, is yet another great tool in the toolkit for building these systems.

It's important to realize that new people are coming in from, say, an enterprise background and suddenly there’s something reactive in the JDK. To them they are asking, what does this mean if I use reactive streams–is my entire system is reactive?

The answers is "yes and no". That’s only the asynchronous processing part of it. Many companies realised the value of asynchronous programming. To make those programs workable and scale well, there’s additional things we need to think about – like back-pressure (flow-control), so that’s what Reactive Streams are solving.

QCon: What do you feel is the most disruptive tech in IT right now?

Konrad: I am really enjoying the comeback of actually thinking about the low-level details in software. It’s a move away from too much abstraction and bloat ware that frameworks of the past decade have gotten us used to, a new and light epoch is starting. It’s both refreshing and exciting to be able to see the move down-to-the-metal in recent years, with performance demands making us reconsider the old ways of building software.

Speaker: Konrad Malawski

Akka @Lightbend & Reactive Streams Committer

Akka hakker @ Lightbend, where he also participated in the Reactive Streams initiative and implemented it's Technology Compatibility Kit. Konrad is a late-night passionate dev living by the motto "Life is Study!". His favourite discussion topics range from distributed systems to capybaras. He has founded and run multiple user groups (Java, Scala, Computer Science, ...), as well as the awesome GeeCON conference, in Poland. Other than that, he maintains a number of Scala tools (such as sbt-jmh), and frequently speaks on distributed systems and concurrency topics at conferences all around the world. In those rare times he's not coding, he spreads the joy of computer science by helping local user groups and whitepaper reading clubs. He also holds number of titles, the most fun of which being Java One RockStar 2015.

Find Konrad Malawski at

Similar Talks



Monday Nov 7

Tuesday Nov 8

Wednesday Nov 9

Conference for Professional Software Developers