Conference: Nov 13-15, 2017
Workshops: Nov 16-17, 2017
Presentation: Reactive Streams, j.u.concurrent, & Beyond!
Duration
Level:
- Intermediate
Persona:
- Developer, JVM
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.
Abstract
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.
Interview
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.
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.
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.
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.
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.
Similar Talks
.
Tracks
Monday Nov 7
-
Architectures You've Always Wondered About
You know the names. Now learn lessons from their architectures
-
Distributed Systems War Stories
“A distributed system is one in which the failure of a computer you didn't even know existed can render your own computer unusable.” - Lamport.
-
Containers Everywhere
State of the art in Container deployment, management, scheduling
-
Art of Relevancy and Recommendations
Lessons on the adoption of practical, real-world machine learning practices. AI & Deep learning explored.
-
Next Generation Web Standards, Frameworks, and Techniques
JavaScript, HTML5, WASM, and more... innovations targetting the browser
-
Optimize You
Keeping life in balance is a challenge. Learn lifehacks, tips, & techniques for success.
Tuesday Nov 8
-
Next Generation Microservices
What will microservices look like in 3 years? What if we could start over?
-
Java: Are You Ready for This?
Real world lessons & prepping for JDK9. Reactive code in Java today, Performance/Optimization, Where Unsafe is heading, & JVM compile interface.
-
Big Data Meets the Cloud
Overviews and lessons learned from companies that have implemented their Big Data use-cases in the Cloud
-
Evolving DevOps
Lessons/stories on optimizing the deployment pipeline
-
Software Engineering Softskills
Great engineers do more than code. Learn their secrets and level up.
-
Modern CS in the Real World
Applied, practical, & real-world dive into industry adoption of modern CS ideas
Wednesday Nov 9
-
Architecting for Failure
Your system will fail. Take control before it takes you with it.
-
Stream Processing
Stream Processing, Near-Real Time Processing
-
Bare Metal Performance
Native languages, kernel bypass, tooling - make the most of your hardware
-
Culture as a Differentiator
The why and how for building successful engineering cultures
-
//TODO: Security <-- fix this
Building security from the start. Stories, lessons, and innovations advancing the field of software security.
-
UX Reimagined
Bots, virtual reality, voice, and new thought processes around design. The track explores the current art of the possible in UX and lessons from early adoption.