SlideShare a Scribd company logo
Reactive programming 
met Java SE 8 en Java EE 7 
Martijn Blankestijn
Agenda 
● Context 
● Sequence, zonder futures 
● Futures 
● CompletableFuture 
● Round-up
Context 
Our 
responsiblity
@Path("customers") public class DemoOverviewResource { 
@GET @Path("{username}") 
@Produces(APPLICATION_JSON) 
public CustomerOverview retrieve( 
@PathParam("username") String username) { 
Customer customer = getCustomerInfo(username); 
Contract[] contracts = getContracts(customer); 
Communication[] communications = getCommunications(customer); 
return createOverview( 
customer, 
contracts, 
communications); 
}
Customer 
Contract 
Communications 
TIME 
Sequential
A Future 
represents 
the result 
of an 
asynchronous computation
public interface Future<V> { 
boolean isDone(); 
V get() 
V get(long timeout, TimeUnit unit)
Reactive programming met Java 8 en Java EE 7 - Martijn Blankestijn
Customer 
Contract 
Communications 
TIME 
Sequential 
Futures
Reactive programming met Java 8 en Java EE 7 - Martijn Blankestijn
Reactive programming 
is a programming paradigm 
oriented around 
data flows 
and the 
propagation of change
Reactive programming met Java 8 en Java EE 7 - Martijn Blankestijn
CompletableFuture 
A Future that may be 
explicitly completed 
and may trigger actions 
upon its completion.
Chaining methods 
run 
thenAccept 
thenApply 
thenCompose 
whenComplete
Joining methods 
runAfterBoth 
thenAcceptBoth 
thenCombine 
... 
allOf
Model the flow
Reactive programming met Java 8 en Java EE 7 - Martijn Blankestijn
Customer 
Contract 
Communications 
TIME 
Sequential 
Futures 
Completable Futures
Links 
● Demo: 
https://github.com/martijnblankestijn/reactive-rest-demo 
● JAX-RS 
● Completable Future 
● ManagedExecutor: JSR 236 Concurrency Utilities for Java EE 
● Reactive Manifesto
Reactive programming met Java 8 en Java EE 7 - Martijn Blankestijn

More Related Content

PPT
Reactive Java EE - Let Me Count the Ways!
ODP
Java EE Pattern: Entity Control Boundary Pattern and Java EE
ODP
Java EE Pattern: The Boundary Layer
PPTX
Supercharged java 8 : with cyclops-react
PDF
Lessons Learned: Using Spark and Microservices
PPT
introduction to Windows Comunication Foundation
PDF
Clean Architecture @ Taxibeat
PDF
Android development
Reactive Java EE - Let Me Count the Ways!
Java EE Pattern: Entity Control Boundary Pattern and Java EE
Java EE Pattern: The Boundary Layer
Supercharged java 8 : with cyclops-react
Lessons Learned: Using Spark and Microservices
introduction to Windows Comunication Foundation
Clean Architecture @ Taxibeat
Android development

Similar to Reactive programming met Java 8 en Java EE 7 - Martijn Blankestijn (20)

PDF
DZone_RC_RxJS
PPT
Google Web Toolkits
PPTX
Reactive programming every day
PDF
Exploring the continuum between Cordova and React Native
PDF
May 2010 - RestEasy
PDF
An approach to responsive, realtime with Backbone.js and WebSockets
PDF
Introduction to AngularJS
PPTX
4Developers 2015: Programowanie synchroniczne i asynchroniczne - dwa światy k...
PDF
PPTX
Signal r
PDF
Concurrency-5.pdf
PPTX
Practical AngularJS
ODP
Presentation - Course about JavaFX
PDF
Альона Тудан “Microservices: better for Devs or QA’s?”
PDF
MvvmCross Quickstart
PDF
Asynchronous Programming. Talk from ESUG2024
PDF
Js in quick books
PPTX
The Windows Runtime and the Web
PPTX
OpenDaylight and YANG
PDF
softshake 2014 - Java EE
DZone_RC_RxJS
Google Web Toolkits
Reactive programming every day
Exploring the continuum between Cordova and React Native
May 2010 - RestEasy
An approach to responsive, realtime with Backbone.js and WebSockets
Introduction to AngularJS
4Developers 2015: Programowanie synchroniczne i asynchroniczne - dwa światy k...
Signal r
Concurrency-5.pdf
Practical AngularJS
Presentation - Course about JavaFX
Альона Тудан “Microservices: better for Devs or QA’s?”
MvvmCross Quickstart
Asynchronous Programming. Talk from ESUG2024
Js in quick books
The Windows Runtime and the Web
OpenDaylight and YANG
softshake 2014 - Java EE
Ad

More from NLJUG (20)

PPTX
The future of Web-Scale - Johan Tillema, Rene Boere & Chris Quach
PPTX
Speedy perception trumps speedy reception–smart asynchronous interactions - L...
PDF
Decoding the airspace above you with Java and $7 hardware - Bert Jan Schrijver
PPTX
Using Docker to Develop, Test and Run Maven Projects - Wouter Danes
PPTX
Kill the mutants and test your tests - Roy van Rijn
PDF
Real-time user interfaces - sosm gewoon makkelijker - Allard Buijze
PPTX
The end of traditional enterprise IT - ING's journey to the next generation I...
PDF
Performance van Java 8 en verder - Jeroen Borgers
PDF
Introduction to Reactive with Play and Akka - Markus Jura
PPTX
Web-scale op basis van Hadoop en Akka Reactive Streams - Johan Tillema, Rene ...
PDF
Workshop angular dart presentatie - Atos
PDF
Workshop spring boot presentatie - Atos
PDF
Cultivating the jenkins job jungle with groovy - Patrick van Dissel
PDF
Rethink your architecture - Marten Deinum
PPTX
Evolutionary Algorithms: the key to solving complex Java puzzles! - Bas knopper
PDF
Modularity and Domain Driven Design; a killer Combination? - Tom de Wolf & St...
PDF
Apache Wicket: 10 jaar en verder - Martijn Dashorst
PDF
Opening - Bert Ertman
PDF
Returning the right results - Jettro Coenradie
PDF
Event-sourced architectures with Akka - Sander Mak
The future of Web-Scale - Johan Tillema, Rene Boere & Chris Quach
Speedy perception trumps speedy reception–smart asynchronous interactions - L...
Decoding the airspace above you with Java and $7 hardware - Bert Jan Schrijver
Using Docker to Develop, Test and Run Maven Projects - Wouter Danes
Kill the mutants and test your tests - Roy van Rijn
Real-time user interfaces - sosm gewoon makkelijker - Allard Buijze
The end of traditional enterprise IT - ING's journey to the next generation I...
Performance van Java 8 en verder - Jeroen Borgers
Introduction to Reactive with Play and Akka - Markus Jura
Web-scale op basis van Hadoop en Akka Reactive Streams - Johan Tillema, Rene ...
Workshop angular dart presentatie - Atos
Workshop spring boot presentatie - Atos
Cultivating the jenkins job jungle with groovy - Patrick van Dissel
Rethink your architecture - Marten Deinum
Evolutionary Algorithms: the key to solving complex Java puzzles! - Bas knopper
Modularity and Domain Driven Design; a killer Combination? - Tom de Wolf & St...
Apache Wicket: 10 jaar en verder - Martijn Dashorst
Opening - Bert Ertman
Returning the right results - Jettro Coenradie
Event-sourced architectures with Akka - Sander Mak
Ad

Recently uploaded (20)

PPTX
sap open course for s4hana steps from ECC to s4
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Encapsulation theory and applications.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
cuic standard and advanced reporting.pdf
PDF
Approach and Philosophy of On baking technology
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Spectroscopy.pptx food analysis technology
PPTX
Cloud computing and distributed systems.
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPT
Teaching material agriculture food technology
sap open course for s4hana steps from ECC to s4
Building Integrated photovoltaic BIPV_UPV.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Review of recent advances in non-invasive hemoglobin estimation
Encapsulation theory and applications.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Assigned Numbers - 2025 - Bluetooth® Document
NewMind AI Weekly Chronicles - August'25-Week II
cuic standard and advanced reporting.pdf
Approach and Philosophy of On baking technology
A comparative analysis of optical character recognition models for extracting...
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Per capita expenditure prediction using model stacking based on satellite ima...
Reach Out and Touch Someone: Haptics and Empathic Computing
Spectroscopy.pptx food analysis technology
Cloud computing and distributed systems.
Advanced methodologies resolving dimensionality complications for autism neur...
Teaching material agriculture food technology

Reactive programming met Java 8 en Java EE 7 - Martijn Blankestijn