SlideShare a Scribd company logo
OUT-OF-THE-BOX
REACTIVE STREAMS
WITH JAVA 9
JACEK KUNICKI
@rucek
https://github.com/rucek/reactive-streams-java9
@rucekOOTB REACTIVE STREAMS WITH JAVA 9
STREAM PROCESSING
PRODUCER CONSUMERPROCESSING
STAGE 1
PROCESSING
STAGE N
DATA
SubscriberPublisher
BACKPRESSURE
request(n)
Processor Processor
java.util.concurrent.Flow
@rucek
j.u.c.Flow.Publisher<T>
▸ produces items of type T that subscribers are going to consume
▸ multiple subscribers receive items in the same order
▸ subscribers register via subscribe(Subscriber<? super T>)
OOTB REACTIVE STREAMS WITH JAVA 9
@rucek
j.u.c.Flow.Subscriber<T>
▸ subscribes to a producer in order to receive:
▸ subscription confirmation via onSubscribe(Subscription)
▸ items via onNext(T)
▸ errors via onError(Throwable)
▸ completion signal via onComplete()
OOTB REACTIVE STREAMS WITH JAVA 9
@rucek
j.u.c.Flow.Subscription
▸ connects a single producer to a single subscriber, allows to:
▸ backpressure with request(long)
▸ signal (eventual) termination with cancel()
OOTB REACTIVE STREAMS WITH JAVA 9
@rucek
j.u.c.Flow.Processor<T, R>
▸ a combination of a Subscriber<T> and a Publisher<R>
OOTB REACTIVE STREAMS WITH JAVA 9
@rucek
j.u.c.SubmissionPublisher<T>
▸ the only concrete implementation available so far
▸ asynchronously issues submitted (non-null) items to current subscribers
▸ can be used as a base for your own components
OOTB REACTIVE STREAMS WITH JAVA 9
onSubscribe
onNext*
(onComplete | onError)?
Publisher.subscribe(Subscriber)
@rucekOOTB REACTIVE STREAMS WITH JAVA 9
@rucek
DEMO 1 - PURE JAVA 9
▸ number publisher based on an IntStream
▸ filtering and mapping processors based on the SubmissionPublisher
▸ a subscriber that prints to System.out
OOTB REACTIVE STREAMS WITH JAVA 9
@rucek
DEMO 2 - INTEGRATION
▸ Project Reactor’s Flux as a publisher
▸ Akka Streams Flow as a processor
▸ a pure Java 9 processor
▸ a pure Java 9 subscriber
OOTB REACTIVE STREAMS WITH JAVA 9
@rucek
SUMMARY
▸ not a full Reactive Streams implementation
▸ allows for interoperability between other implementations
▸ incubating Reactive Streams support in the new HTTP client
OOTB REACTIVE STREAMS WITH JAVA 9
@rucek
THANK YOU!
@rucek
OOTB REACTIVE STREAMS WITH JAVA 9
https://github.com/rucek/reactive-streams-java9

More Related Content

PDF
How (not) to use reactive streams in java 9+
PDF
PyParis2017 / Tutorial transcript - Function-as-a-service : a pythonic perspe...
PPTX
Monitoring on Kubernetes using prometheus
PDF
Big tables and you - Keeping DDL operatations fast
PDF
Serverless Spring by Stephane Maldini
PDF
Reactive Extensions
PDF
Wix Code - Todo App - Yale Hachathon
PDF
Running kubernetes
How (not) to use reactive streams in java 9+
PyParis2017 / Tutorial transcript - Function-as-a-service : a pythonic perspe...
Monitoring on Kubernetes using prometheus
Big tables and you - Keeping DDL operatations fast
Serverless Spring by Stephane Maldini
Reactive Extensions
Wix Code - Todo App - Yale Hachathon
Running kubernetes

Similar to Out-of-the-box Reactive Streams with Java 9 (20)

PDF
Reactive Programming in Java and Spring Framework 5
PDF
Combine Framework
PDF
The Dream Stream Team for Pulsar and Spring
PDF
Reactive Streams and RxJava2
PDF
Building Scalable Stateless Applications with RxJava
PDF
Kafka as a Platform: the Ecosystem from the Ground Up with Robin Moffatt | Ka...
PDF
Reactive Stream Processing with Akka Streams
PDF
Reactive Card Magic: Understanding Spring WebFlux and Project Reactor
PPTX
Reactive programming for java developers
PDF
Java Microservices with Netflix OSS & Spring
PPTX
RxJava 2 Reactive extensions for the JVM
PDF
Reactive Streams 1.0 and Akka Streams
PPTX
RxJava Applied
PDF
Reactive mesh
PDF
RxJava - introduction & design
PPTX
RxJava2 Slides
PDF
Introducing Exactly Once Semantics in Apache Kafka with Matthias J. Sax
PDF
Kafka in Adobe Ad Cloud's Analytics Platform: Building systems with exactly-o...
PDF
Apache Kafka in Adobe Ad Cloud's Analytics Platform
PDF
Iniciación rx java
Reactive Programming in Java and Spring Framework 5
Combine Framework
The Dream Stream Team for Pulsar and Spring
Reactive Streams and RxJava2
Building Scalable Stateless Applications with RxJava
Kafka as a Platform: the Ecosystem from the Ground Up with Robin Moffatt | Ka...
Reactive Stream Processing with Akka Streams
Reactive Card Magic: Understanding Spring WebFlux and Project Reactor
Reactive programming for java developers
Java Microservices with Netflix OSS & Spring
RxJava 2 Reactive extensions for the JVM
Reactive Streams 1.0 and Akka Streams
RxJava Applied
Reactive mesh
RxJava - introduction & design
RxJava2 Slides
Introducing Exactly Once Semantics in Apache Kafka with Matthias J. Sax
Kafka in Adobe Ad Cloud's Analytics Platform: Building systems with exactly-o...
Apache Kafka in Adobe Ad Cloud's Analytics Platform
Iniciación rx java
Ad

More from SoftwareMill (20)

PDF
Growing Oxen: channel operators and retries
PDF
How To Survive a Live-Coding Session
PDF
Goryle i ser szwajcarski. Czego medycyna ratunkowa może Cię nauczyć o tworzen...
PPTX
Have you ever wondered about code review?
PDF
Reactive Integration with Akka Streams and Alpakka
PDF
W świecie botów czyli po co nam SI
PDF
Small intro to Big Data
PDF
Hiring, Bots and Beer. (Hiring in the IT industry)
PDF
Teal Is The New Black
PDF
Windowing data in big data streams
PDF
Kafka as a message queue
PDF
Introduction to Cassandra
PDF
Origins of Free
PDF
Cassandra - how to fail?
PDF
How to manage in a flat organized, remote and transparent company
PDF
Performance tests with gatling
PDF
Origins of free
PDF
Projekt z punktu widzenia UX designera
PDF
Machine learning by example
PPTX
Open source big data landscape and possible ITS applications
Growing Oxen: channel operators and retries
How To Survive a Live-Coding Session
Goryle i ser szwajcarski. Czego medycyna ratunkowa może Cię nauczyć o tworzen...
Have you ever wondered about code review?
Reactive Integration with Akka Streams and Alpakka
W świecie botów czyli po co nam SI
Small intro to Big Data
Hiring, Bots and Beer. (Hiring in the IT industry)
Teal Is The New Black
Windowing data in big data streams
Kafka as a message queue
Introduction to Cassandra
Origins of Free
Cassandra - how to fail?
How to manage in a flat organized, remote and transparent company
Performance tests with gatling
Origins of free
Projekt z punktu widzenia UX designera
Machine learning by example
Open source big data landscape and possible ITS applications
Ad

Recently uploaded (20)

PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
Transform Your Business with a Software ERP System
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
top salesforce developer skills in 2025.pdf
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
Essential Infomation Tech presentation.pptx
PPTX
history of c programming in notes for students .pptx
PDF
medical staffing services at VALiNTRY
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
PTS Company Brochure 2025 (1).pdf.......
Odoo Companies in India – Driving Business Transformation.pdf
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Wondershare Filmora 15 Crack With Activation Key [2025
Transform Your Business with a Software ERP System
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Upgrade and Innovation Strategies for SAP ERP Customers
Navsoft: AI-Powered Business Solutions & Custom Software Development
wealthsignaloriginal-com-DS-text-... (1).pdf
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
top salesforce developer skills in 2025.pdf
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Operating system designcfffgfgggggggvggggggggg
How Creative Agencies Leverage Project Management Software.pdf
Essential Infomation Tech presentation.pptx
history of c programming in notes for students .pptx
medical staffing services at VALiNTRY
CHAPTER 2 - PM Management and IT Context
PTS Company Brochure 2025 (1).pdf.......

Out-of-the-box Reactive Streams with Java 9