SlideShare a Scribd company logo
Streaming to a new Jakarta EE
@myfear
Streaming to a New Jakarta EE
Jakarta EE Technical Directions
Eclipse Foundation survey of over 1800 developers
Top
3
Critical areas cited for improvement:
1. Better support for microservices
2. Native integration with Kubernetes
3. A faster pace of innovation
Top Frameworks for building microservices include: Jersey,
Spring, Eclipse MicroProfile, Node.js & Kubernetes
67% Currently building microservices or planning to <1 yr
40%
Say large memory requirements most challenging
aspect of working with Java EE
#1 Reason Java EE chosen for Java applications is stability
60%
Say Foundation should prioritize better support for
microservices
https://jakarta.ee/news/2018/04/24/jakarta-ee-community-survey/
5
Oracle
GlassFish 5.X
Eclipse
GlassFish 5.1
Eclipse
GlassFish “Next”
Java EE 8
Java EE 8 Jakarta EE 8
Sources,
TCKs
Jakarta EE Next
High Level Roadmap for Jakarta EE
https://blogs.eclipse.org/post/tanja-obradovic/how-eclipse-foundation-specification-process-efsp-different-java-community
JakartaEE The New Home of Cloud Native Java
https://www.youtube.com/watch?v=1Amshn3s-hg
Ivar Grimstad (Cybercom Sweden)
Dimitris Andreadis (Red Hat)
Dmitry Kornilov (Oracle)
Gaël Blondelle (Eclipse Foundation)
Kevin Sutter (IBM)
Markus Eisele (@lightbend )
Ondro Mihályi (Payara)
Monoliths have allowed us to take
consistency for granted
With a single database, the world is easy
Transactions give us an illusion of a single, consistent,
current state
• We can think of our data as a static thing
• It sits there at rest, waiting for our operation
• Failure is handled
• No partial updates
• Consistency is enforced
• Concurrency is handled
• No uncommitted reads
Monoliths
Monoliths
Transaction 1
Transaction 2
In microservices, our consistent view of the
world breaks down
Microservices
Many databases, the world is hard
There are now many states, all constantly changing
• Different services have different ideas of current state
• Our data is in motion, not at rest, not static
• Failure is not handled for us
• Partial updates likely
• No enforcement of consistency
• Concurrency is inherent
• Operations take time to propagate
C
F
A
B
G
E
D
Microservices
??
? ?
?
?
What worked in monoliths will not work
in microservices
What worked in monoliths
CRUD
• Depends on consistent single state
Relying on transactions
• Depends on a single database
REST
• Depends on failure and consistency being handled in the
database
What worked in monoliths
What’s needed for microservices
Events
• Events convey facts
• Facts remain true regardless of what else happens in the system
At least once messaging
• Ensures events can be reliably propagated throughout the system
Stream-centric view
• Our data is the events
• Some may be at rest, some are in motion
• No single state
• Rather, system is constantly converging, propagating
• Control this, using streams
Streams
A B
By modelling a system using streams, we
embrace events, no longer need a single
state, and can take eventual consistency
for granted
Enter Reactive Streams
http://www.reactive-streams.org
Reactive Streams
Allows streaming between multiple technologies
Not for end users, rather it’s the glue that connects things
• Created by Lightbend and others (Netflix, Red Hat, etc. 2013)
• Allows asynchronous propagation of messages, with asynchronous
backpressure
• Backpressure necessary to control resource usage
• Tens of compatible, TCK verified implementations
• Added to JDK9 as the java.util.concurrent.Flow API
• Requires a high level API for end user control and manipulation of
streams
https://developer.lightbend.com/blog/2017-08-18-introduction-to-reactive-streams-for-java-developers/index.html
But there are already APIs for that?!
• InputStream and OutputStream in the JDK
• NIO Channel’s
• Servlet 3.1 ReadListener and WriteListener
extensions
• JDBC ResultSet
• JSR 356 @OnMessage annotations,
• Message Driven Beans and JMS,
• CDI events using @Observes
• Java collection Stream and Iterator based APIs
• JDK9 Flow API.
Reactive Streams
22
Kafka
myTopic
.subscribe()
Akka Streams
.map(kafkaMessage ->
new WebSocketMessage(
kafkaMessage.getPayload()
)
)
WebSocket
response
.send(publisher)
Reactive
Streams
Reactive
Streams
Messages
Backpressure
https://developer.lightbend.com/blog/2018-02-06-reactive-streams-ee4j/index.html
https://www.lightbend.com/blog/in-support-of-jakarta-ees-quest-to-accelerate-cloud-native-java
What can Reactive Streams offer Jakarta EE?
MicroProfile
Working with Reactive Streams requires a high level library like Akka Streams
MicroProfile Reactive Streams Operators
• Provides specification for a set of operators for Reactive Streams manipulation
• map, filter, flatMap, etc.
• Heavily draws on Akka Streams, RxJava 2 and Reactor
• Uses java.util.stream for inspiration in naming and scope
• 1.0-RC2 recently released
• Long term hope is for inclusion in the JDK
• Three implementations under active development
https://github.com/eclipse/microprofile-reactive-streams
MicroProfile Reactive Messaging
• API for connecting to common messaging sources
• Kafka, AMQP, JMS, WebSockets
• Based on MicroProfile Reactive Streams Operators
• Uses annotations on CDI Beans to declare message subscribers and
publishers
• API and TCK currently under development
• Two implementations being simultaneously developed
• Aiming for inclusion in MicroProfile 2.2
https://github.com/eclipse/microprofile-reactive-messaging
https://github.com/jroper/streaming-new-
jakartaee
Online Auction
Demo app is an ebay clone.
This technology doesn’t exist in a usable form yet, but…
• Lagom, a Reactive Microservices framework, implements
these principles
• James Roper implemented support for the specs in their
current state on top of Lagom
• The online auction demo app has been ported to use the
new specs
Summary
• Monoliths have allowed us to take consistency for granted
• In cloud native microservices, our consistent view of the world breaks down
• What worked in monoliths will not work in microservices
• By modelling a system using streams, we
• Embrace events
• No longer need a single state
• Can take eventual consistency for granted
• Lightbend is working with Eclipse MicroProfile to:
• Build new specs for streaming
• Make streaming architectures standard
Next Steps! Learn more!
Project Site:
http://www.microprofile.io
Reactive Streams:
http://www.reactive-streams.org
Demo GitHub Repo:
https://github.com/jroper/streaming-new-jakartaee
Wanna learn more about
Streaming Architectures?
http://bit.ly/fast-data-architecture
Written for architects and developers that must
quickly gain a fundamental understanding of
microservice-based architectures, this free O’Reilly
report explores the journey from SOA to
microservices, discusses approaches to
dismantling your monolith, and reviews the key
tenets of a Reactive microservice:
• Isolate all the Things
• Act Autonomously
• Do One Thing, and Do It Well
• Own Your State, Exclusively
• Embrace Asynchronous Message-Passing
• Stay Mobile, but Addressable
• Collaborate as Systems to Solve Problems
http://bit.ly/ReactiveMicroservice
The detailed example in this report is based on
Lagom, a new framework that helps you follow the
requirements for building distributed, reactive
systems.
• Get an overview of the Reactive Programming
model and basic requirements for developing
reactive microservices
• Learn how to create base services, expose
endpoints, and then connect them with a
simple, web-based user interface
• Understand how to deal with persistence, state,
and clients
• Use integration technologies to start a
successful migration away from legacy systems
http://bit.ly/DevelopReactiveMicroservice
http://bit.ly/SustainableEnterprise
• Understand the challenges of starting a greenfield
development vs tearing apart an existing brownfield
application into services
• Examine your business domain to see if microservices
would be a good fit
• Explore best practices for automation, high availability,
data separation, and performance
• Align your development teams around business
capabilities and responsibilities
• Inspect design patterns such as aggregator, proxy,
pipeline, or shared resources to model service
interactions
Streaming to a New Jakarta EE

More Related Content

PDF
Voxxed Athens 2018 - Java EE is dead Long live jakarta EE!
Voxxed Athens
 
PDF
Bootstraping real world Jakarta EE/MicroProfile microservices with Maven Arch...
Víctor Leonel Orozco López
 
PDF
How Class Data Sharing Can Speed up Your Jakarta EE Application Startup
Rudy De Busscher
 
PDF
Writing Java EE microservices using WildFly Swarm
Comsysto Reply GmbH
 
PDF
Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014
Arun Gupta
 
PDF
Taking the friction out of microservice frameworks with Lagom
Markus Eisele
 
PDF
Microservices with Spring Cloud
Daniel Eichten
 
PDF
Microservices with WildFly Swarm - JavaSI 2016
Charles Moulliard
 
Voxxed Athens 2018 - Java EE is dead Long live jakarta EE!
Voxxed Athens
 
Bootstraping real world Jakarta EE/MicroProfile microservices with Maven Arch...
Víctor Leonel Orozco López
 
How Class Data Sharing Can Speed up Your Jakarta EE Application Startup
Rudy De Busscher
 
Writing Java EE microservices using WildFly Swarm
Comsysto Reply GmbH
 
Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014
Arun Gupta
 
Taking the friction out of microservice frameworks with Lagom
Markus Eisele
 
Microservices with Spring Cloud
Daniel Eichten
 
Microservices with WildFly Swarm - JavaSI 2016
Charles Moulliard
 

What's hot (20)

PPTX
JavaEE Microservices platforms
Payara
 
PPTX
Developing Java EE applications with NetBeans and Payara
Payara
 
PPTX
Deploying Elastic Java EE Microservices in the Cloud with Docker
Payara
 
PPTX
JPA 2.1 on Payara Server
Payara
 
PPTX
Reactive Web Development with Spring Boot 2
Mike Melusky
 
PDF
Should i break it?
Gal Marder
 
PPT
Packing It In: Images, Containers and Config Management
Michael Goetz
 
PDF
Introduction to Micronaut - JBCNConf 2019
graemerocher
 
PDF
Gradual migration to MicroProfile
Rudy De Busscher
 
PDF
Micronaut Deep Dive - Codeone 2019
graemerocher
 
PPT
Spring Boot. Boot up your development. JEEConf 2015
Strannik_2013
 
PDF
How would ESBs look like, if they were done today.
Markus Eisele
 
PDF
EJB 3.2 - Java EE 7 - Java One Hyderabad 2012
Jagadish Prasath
 
PDF
Monitor Micro-service with MicroProfile metrics
Rudy De Busscher
 
PDF
Micronaut Deep Dive - Devoxx Belgium 2019
graemerocher
 
PPTX
High performance java ee with j cache and cdi
Payara
 
PPTX
Introduction to ASP.NET 5
mbaric
 
PDF
Java one kubernetes, jenkins and microservices
Christian Posta
 
PDF
Stay productive while slicing up the monolith
Markus Eisele
 
PDF
Architecting for failure - Why are distributed systems hard?
Markus Eisele
 
JavaEE Microservices platforms
Payara
 
Developing Java EE applications with NetBeans and Payara
Payara
 
Deploying Elastic Java EE Microservices in the Cloud with Docker
Payara
 
JPA 2.1 on Payara Server
Payara
 
Reactive Web Development with Spring Boot 2
Mike Melusky
 
Should i break it?
Gal Marder
 
Packing It In: Images, Containers and Config Management
Michael Goetz
 
Introduction to Micronaut - JBCNConf 2019
graemerocher
 
Gradual migration to MicroProfile
Rudy De Busscher
 
Micronaut Deep Dive - Codeone 2019
graemerocher
 
Spring Boot. Boot up your development. JEEConf 2015
Strannik_2013
 
How would ESBs look like, if they were done today.
Markus Eisele
 
EJB 3.2 - Java EE 7 - Java One Hyderabad 2012
Jagadish Prasath
 
Monitor Micro-service with MicroProfile metrics
Rudy De Busscher
 
Micronaut Deep Dive - Devoxx Belgium 2019
graemerocher
 
High performance java ee with j cache and cdi
Payara
 
Introduction to ASP.NET 5
mbaric
 
Java one kubernetes, jenkins and microservices
Christian Posta
 
Stay productive while slicing up the monolith
Markus Eisele
 
Architecting for failure - Why are distributed systems hard?
Markus Eisele
 
Ad

Similar to Streaming to a New Jakarta EE (20)

PDF
Streaming to a new Jakarta EE / JOTB19
Markus Eisele
 
PDF
Reactive Integrations - Caveats and bumps in the road explained
Markus Eisele
 
PDF
Migrating from Java EE to cloud-native Reactive systems
Markus Eisele
 
PDF
Migrating From Java EE To Cloud-Native Reactive Systems
Lightbend
 
PDF
Java in the age of containers - JUG Frankfurt/M
Markus Eisele
 
PDF
170215 msa intro
Sonic leigh
 
PDF
Case Study: Migrating Hyperic from EJB to Spring from JBoss to Apache Tomcat
VMware Hyperic
 
PPT
Cloud compiler - Minor Project by students of CBPGEC
vipin kumar
 
PPTX
Do You Need A Service Mesh?
NGINX, Inc.
 
PPTX
Do I Need A Service Mesh.pptx
PINGXIONG3
 
PDF
Java in the Age of Containers and Serverless
Markus Eisele
 
PDF
Meteor + React
Taggart Bowen-Gaddy
 
PDF
oraclewls-jrebel
Gabriel Torres
 
PDF
Utilizing JSF Front Ends with Microservices
Josh Juneau
 
PPTX
Decomposing the Monolith using Microservices that don't give you pain
Dennis Doomen
 
PDF
SCaLE 16x - Application Monitoring And Tracing In Kubernetes
David vonThenen
 
PDF
Stay productive_while_slicing_up_the_monolith
Markus Eisele
 
PDF
03 monoliths to microservices with java ee and spring boot
Ram Maddali
 
PPT
TransitioningToMicroServonDocker_MS
Lana Kalashnyk
 
PDF
The Meteor Framework
Damien Magoni
 
Streaming to a new Jakarta EE / JOTB19
Markus Eisele
 
Reactive Integrations - Caveats and bumps in the road explained
Markus Eisele
 
Migrating from Java EE to cloud-native Reactive systems
Markus Eisele
 
Migrating From Java EE To Cloud-Native Reactive Systems
Lightbend
 
Java in the age of containers - JUG Frankfurt/M
Markus Eisele
 
170215 msa intro
Sonic leigh
 
Case Study: Migrating Hyperic from EJB to Spring from JBoss to Apache Tomcat
VMware Hyperic
 
Cloud compiler - Minor Project by students of CBPGEC
vipin kumar
 
Do You Need A Service Mesh?
NGINX, Inc.
 
Do I Need A Service Mesh.pptx
PINGXIONG3
 
Java in the Age of Containers and Serverless
Markus Eisele
 
Meteor + React
Taggart Bowen-Gaddy
 
oraclewls-jrebel
Gabriel Torres
 
Utilizing JSF Front Ends with Microservices
Josh Juneau
 
Decomposing the Monolith using Microservices that don't give you pain
Dennis Doomen
 
SCaLE 16x - Application Monitoring And Tracing In Kubernetes
David vonThenen
 
Stay productive_while_slicing_up_the_monolith
Markus Eisele
 
03 monoliths to microservices with java ee and spring boot
Ram Maddali
 
TransitioningToMicroServonDocker_MS
Lana Kalashnyk
 
The Meteor Framework
Damien Magoni
 
Ad

More from J On The Beach (20)

PDF
Massively scalable ETL in real world applications: the hard way
J On The Beach
 
PPTX
Big Data On Data You Don’t Have
J On The Beach
 
PPTX
Acoustic Time Series in Industry 4.0: Improved Reliability and Cyber-Security...
J On The Beach
 
PDF
Pushing it to the edge in IoT
J On The Beach
 
PDF
Drinking from the firehose, with virtual streams and virtual actors
J On The Beach
 
PDF
How do we deploy? From Punched cards to Immutable server pattern
J On The Beach
 
PDF
Java, Turbocharged
J On The Beach
 
PDF
When Cloud Native meets the Financial Sector
J On The Beach
 
PDF
The big data Universe. Literally.
J On The Beach
 
PDF
The TIPPSS Imperative for IoT - Ensuring Trust, Identity, Privacy, Protection...
J On The Beach
 
PDF
Pushing AI to the Client with WebAssembly and Blazor
J On The Beach
 
PDF
Axon Server went RAFTing
J On The Beach
 
PDF
The Six Pitfalls of building a Microservices Architecture (and how to avoid t...
J On The Beach
 
PDF
Madaari : Ordering For The Monkeys
J On The Beach
 
PDF
Servers are doomed to fail
J On The Beach
 
PDF
Interaction Protocols: It's all about good manners
J On The Beach
 
PDF
A race of two compilers: GraalVM JIT versus HotSpot JIT C2. Which one offers ...
J On The Beach
 
PDF
Leadership at every level
J On The Beach
 
PDF
Machine Learning: The Bare Math Behind Libraries
J On The Beach
 
PDF
Getting started with Deep Reinforcement Learning
J On The Beach
 
Massively scalable ETL in real world applications: the hard way
J On The Beach
 
Big Data On Data You Don’t Have
J On The Beach
 
Acoustic Time Series in Industry 4.0: Improved Reliability and Cyber-Security...
J On The Beach
 
Pushing it to the edge in IoT
J On The Beach
 
Drinking from the firehose, with virtual streams and virtual actors
J On The Beach
 
How do we deploy? From Punched cards to Immutable server pattern
J On The Beach
 
Java, Turbocharged
J On The Beach
 
When Cloud Native meets the Financial Sector
J On The Beach
 
The big data Universe. Literally.
J On The Beach
 
The TIPPSS Imperative for IoT - Ensuring Trust, Identity, Privacy, Protection...
J On The Beach
 
Pushing AI to the Client with WebAssembly and Blazor
J On The Beach
 
Axon Server went RAFTing
J On The Beach
 
The Six Pitfalls of building a Microservices Architecture (and how to avoid t...
J On The Beach
 
Madaari : Ordering For The Monkeys
J On The Beach
 
Servers are doomed to fail
J On The Beach
 
Interaction Protocols: It's all about good manners
J On The Beach
 
A race of two compilers: GraalVM JIT versus HotSpot JIT C2. Which one offers ...
J On The Beach
 
Leadership at every level
J On The Beach
 
Machine Learning: The Bare Math Behind Libraries
J On The Beach
 
Getting started with Deep Reinforcement Learning
J On The Beach
 

Recently uploaded (20)

PDF
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
PPTX
Presentation about variables and constant.pptx
kr2589474
 
PPTX
Presentation about variables and constant.pptx
safalsingh810
 
PDF
lesson-2-rules-of-netiquette.pdf.bshhsjdj
jasmenrojas249
 
PPT
Activate_Methodology_Summary presentatio
annapureddyn
 
PPTX
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
PPTX
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
PDF
49785682629390197565_LRN3014_Migrating_the_Beast.pdf
Abilash868456
 
PDF
Teaching Reproducibility and Embracing Variability: From Floating-Point Exper...
University of Rennes, INSA Rennes, Inria/IRISA, CNRS
 
PPTX
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
PDF
49784907924775488180_LRN2959_Data_Pump_23ai.pdf
Abilash868456
 
PPTX
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
PDF
Adobe Illustrator Crack Full Download (Latest Version 2025) Pre-Activated
imang66g
 
PDF
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
PPTX
Maximizing Revenue with Marketo Measure: A Deep Dive into Multi-Touch Attribu...
bbedford2
 
PDF
Key Features to Look for in Arizona App Development Services
Net-Craft.com
 
PDF
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
PPTX
Role Of Python In Programing Language.pptx
jaykoshti048
 
PDF
Bandai Playdia The Book - David Glotz
BluePanther6
 
PPTX
The-Dawn-of-AI-Reshaping-Our-World.pptxx
parthbhanushali307
 
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
Presentation about variables and constant.pptx
kr2589474
 
Presentation about variables and constant.pptx
safalsingh810
 
lesson-2-rules-of-netiquette.pdf.bshhsjdj
jasmenrojas249
 
Activate_Methodology_Summary presentatio
annapureddyn
 
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
49785682629390197565_LRN3014_Migrating_the_Beast.pdf
Abilash868456
 
Teaching Reproducibility and Embracing Variability: From Floating-Point Exper...
University of Rennes, INSA Rennes, Inria/IRISA, CNRS
 
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
49784907924775488180_LRN2959_Data_Pump_23ai.pdf
Abilash868456
 
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
Adobe Illustrator Crack Full Download (Latest Version 2025) Pre-Activated
imang66g
 
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
Maximizing Revenue with Marketo Measure: A Deep Dive into Multi-Touch Attribu...
bbedford2
 
Key Features to Look for in Arizona App Development Services
Net-Craft.com
 
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
Role Of Python In Programing Language.pptx
jaykoshti048
 
Bandai Playdia The Book - David Glotz
BluePanther6
 
The-Dawn-of-AI-Reshaping-Our-World.pptxx
parthbhanushali307
 

Streaming to a New Jakarta EE

  • 1. Streaming to a new Jakarta EE
  • 4. Jakarta EE Technical Directions Eclipse Foundation survey of over 1800 developers Top 3 Critical areas cited for improvement: 1. Better support for microservices 2. Native integration with Kubernetes 3. A faster pace of innovation Top Frameworks for building microservices include: Jersey, Spring, Eclipse MicroProfile, Node.js & Kubernetes 67% Currently building microservices or planning to <1 yr 40% Say large memory requirements most challenging aspect of working with Java EE #1 Reason Java EE chosen for Java applications is stability 60% Say Foundation should prioritize better support for microservices https://jakarta.ee/news/2018/04/24/jakarta-ee-community-survey/
  • 5. 5 Oracle GlassFish 5.X Eclipse GlassFish 5.1 Eclipse GlassFish “Next” Java EE 8 Java EE 8 Jakarta EE 8 Sources, TCKs Jakarta EE Next High Level Roadmap for Jakarta EE
  • 7. JakartaEE The New Home of Cloud Native Java https://www.youtube.com/watch?v=1Amshn3s-hg Ivar Grimstad (Cybercom Sweden) Dimitris Andreadis (Red Hat) Dmitry Kornilov (Oracle) Gaël Blondelle (Eclipse Foundation) Kevin Sutter (IBM) Markus Eisele (@lightbend ) Ondro Mihályi (Payara)
  • 8. Monoliths have allowed us to take consistency for granted
  • 9. With a single database, the world is easy Transactions give us an illusion of a single, consistent, current state • We can think of our data as a static thing • It sits there at rest, waiting for our operation • Failure is handled • No partial updates • Consistency is enforced • Concurrency is handled • No uncommitted reads Monoliths
  • 11. In microservices, our consistent view of the world breaks down
  • 12. Microservices Many databases, the world is hard There are now many states, all constantly changing • Different services have different ideas of current state • Our data is in motion, not at rest, not static • Failure is not handled for us • Partial updates likely • No enforcement of consistency • Concurrency is inherent • Operations take time to propagate
  • 14. What worked in monoliths will not work in microservices
  • 15. What worked in monoliths CRUD • Depends on consistent single state Relying on transactions • Depends on a single database REST • Depends on failure and consistency being handled in the database What worked in monoliths
  • 16. What’s needed for microservices Events • Events convey facts • Facts remain true regardless of what else happens in the system At least once messaging • Ensures events can be reliably propagated throughout the system Stream-centric view • Our data is the events • Some may be at rest, some are in motion • No single state • Rather, system is constantly converging, propagating • Control this, using streams
  • 18. By modelling a system using streams, we embrace events, no longer need a single state, and can take eventual consistency for granted
  • 20. Reactive Streams Allows streaming between multiple technologies Not for end users, rather it’s the glue that connects things • Created by Lightbend and others (Netflix, Red Hat, etc. 2013) • Allows asynchronous propagation of messages, with asynchronous backpressure • Backpressure necessary to control resource usage • Tens of compatible, TCK verified implementations • Added to JDK9 as the java.util.concurrent.Flow API • Requires a high level API for end user control and manipulation of streams https://developer.lightbend.com/blog/2017-08-18-introduction-to-reactive-streams-for-java-developers/index.html
  • 21. But there are already APIs for that?! • InputStream and OutputStream in the JDK • NIO Channel’s • Servlet 3.1 ReadListener and WriteListener extensions • JDBC ResultSet • JSR 356 @OnMessage annotations, • Message Driven Beans and JMS, • CDI events using @Observes • Java collection Stream and Iterator based APIs • JDK9 Flow API.
  • 22. Reactive Streams 22 Kafka myTopic .subscribe() Akka Streams .map(kafkaMessage -> new WebSocketMessage( kafkaMessage.getPayload() ) ) WebSocket response .send(publisher) Reactive Streams Reactive Streams Messages Backpressure
  • 24. MicroProfile Working with Reactive Streams requires a high level library like Akka Streams MicroProfile Reactive Streams Operators • Provides specification for a set of operators for Reactive Streams manipulation • map, filter, flatMap, etc. • Heavily draws on Akka Streams, RxJava 2 and Reactor • Uses java.util.stream for inspiration in naming and scope • 1.0-RC2 recently released • Long term hope is for inclusion in the JDK • Three implementations under active development https://github.com/eclipse/microprofile-reactive-streams
  • 25. MicroProfile Reactive Messaging • API for connecting to common messaging sources • Kafka, AMQP, JMS, WebSockets • Based on MicroProfile Reactive Streams Operators • Uses annotations on CDI Beans to declare message subscribers and publishers • API and TCK currently under development • Two implementations being simultaneously developed • Aiming for inclusion in MicroProfile 2.2 https://github.com/eclipse/microprofile-reactive-messaging
  • 27. Online Auction Demo app is an ebay clone. This technology doesn’t exist in a usable form yet, but… • Lagom, a Reactive Microservices framework, implements these principles • James Roper implemented support for the specs in their current state on top of Lagom • The online auction demo app has been ported to use the new specs
  • 28. Summary • Monoliths have allowed us to take consistency for granted • In cloud native microservices, our consistent view of the world breaks down • What worked in monoliths will not work in microservices • By modelling a system using streams, we • Embrace events • No longer need a single state • Can take eventual consistency for granted • Lightbend is working with Eclipse MicroProfile to: • Build new specs for streaming • Make streaming architectures standard
  • 29. Next Steps! Learn more! Project Site: http://www.microprofile.io Reactive Streams: http://www.reactive-streams.org Demo GitHub Repo: https://github.com/jroper/streaming-new-jakartaee
  • 30. Wanna learn more about Streaming Architectures? http://bit.ly/fast-data-architecture
  • 31. Written for architects and developers that must quickly gain a fundamental understanding of microservice-based architectures, this free O’Reilly report explores the journey from SOA to microservices, discusses approaches to dismantling your monolith, and reviews the key tenets of a Reactive microservice: • Isolate all the Things • Act Autonomously • Do One Thing, and Do It Well • Own Your State, Exclusively • Embrace Asynchronous Message-Passing • Stay Mobile, but Addressable • Collaborate as Systems to Solve Problems http://bit.ly/ReactiveMicroservice
  • 32. The detailed example in this report is based on Lagom, a new framework that helps you follow the requirements for building distributed, reactive systems. • Get an overview of the Reactive Programming model and basic requirements for developing reactive microservices • Learn how to create base services, expose endpoints, and then connect them with a simple, web-based user interface • Understand how to deal with persistence, state, and clients • Use integration technologies to start a successful migration away from legacy systems http://bit.ly/DevelopReactiveMicroservice
  • 33. http://bit.ly/SustainableEnterprise • Understand the challenges of starting a greenfield development vs tearing apart an existing brownfield application into services • Examine your business domain to see if microservices would be a good fit • Explore best practices for automation, high availability, data separation, and performance • Align your development teams around business capabilities and responsibilities • Inspect design patterns such as aggregator, proxy, pipeline, or shared resources to model service interactions