SlideShare a Scribd company logo
Reactive Microservices with
Eclipse MicroProfile
Emily Jiang
Java Champion
STSM, IBM
Liberty Microservice Architect, Advocate
Senior Lead for MicroProfile and CDI
@emilyfhjiang
2
Why Reactive?
3
Synchronous calls
Two microservices...
BA
Two microservices...
BA
data/client/test/hello data/service/hello
“hello” “hello”
data/client/test/hello data/service/hello
“hello” “hello”
… Interacting using synchronous calls
7
Asynchronous calls
Asynchronous calls (because it’s trendy)
Microservices are like kids...
Need mudguards
(a)
(b)
(c)
(a)
(b)
(c)
MicroProfile Fault-Tolerance
Sorry, I’m out of context...
I’ve lost my thread locals!
(User, Transaction, Correlation
Id…)
MicroProfile Context Propagation
Restore the
context
Capture the
context
MicroProfile Context Propagation
Most asynchronous things
AREN’T non-blocking.
You need
asynchrony + non-blocking
to use resources
efficiently
… Is this what you want?
Non-Blocking IOAsynchronous,
Fault-Tolerance
Context
Propagation
… And they lived together happily ever after.
???
!!!
19
Reactive
20
What Reactive?
System eXtensions
Programming
Manifesto
Streams
Asynchrony
Back-Pressure
Resilience
Elasticity
Spreadsheets
Actor
Data Flows
Observable
Events
Messages ReactorRX JavaResponsiveness
Fibers
Non-Blocking
MicroProfile
Spring
RSocket
Reactive all the things ???
22
System eXtensions
Programming
Manifesto
Streams
Asynchrony
Back-Pressure
Resilience
Elasticity
Spreadsheets
Actor
Data Flows
Observable
Events
Messages ReactorRX JavaResponsiveness
Fibers
Non-Blocking
MicroProfile
Spring
RSocket
Reactive all the things ???
23
Reactive Programming
Data
Streams
Propagation
of changes
24
Reactive Extensions
Data
Streams
Propagation
of changes
25
Reactive Streams
Data
Streams
Propagatio
n of
changes
Back
Pressure
Protocol
26
Reactive Streams - Java 9+ edition
Observable Stream of <T>
Stream Observer
On new item
On failure
On completion
27
Reactive Streams - Java 9+ edition
The contract between the
observer and the stream
Stop the observation
Request items
28
Reactive Streams - How does that work?
Subscriber Publisher
(1)subscribe
(2) onSubscribe(sub)
29
Reactive Streams - How does that work?
Subscriber Publisher
(3) request(x)
(4) onNext(i1)
(5) onNext(i2)
(6) onComplete()
30
Reactive Streams - How does that work?
Subscriber Processor Publisher
subscribe
request(x)
subscribe
request(x)
31
http://www.reactivemanifesto.org/
Reactive Systems
32
How Reactive?
Applying reactive to microservices
Temporal
decoupling
Back-Pressure
Protocol
Using messages to achieve decoupling
BA
Sent to virtual addresses
Can be durable (temporal
decoupling)
Use non-blocking IO
Messaging / Streaming
MicroProfile
Application Code
Container Host / Operating System
Async HTTP Messaging
MicroProfile
Application Code
Container Host / Operating System
MicroProfile Reactive Messaging
MicroProfile
Reactive Messaging
36
MicroProfile Reactive Messaging
37
MicroProfile Reactive Messaging
Connector
configuration
(protocol specific)
38
MicroProfile Reactive Messaging
Reactive
Streams
Reactive architecture
BA
Decoupling, Elasticity, Resilience,
Back-Pressure, Asynchrony, Non-Blocking
https://github.com/Emily-Jiang/reactive-service-a
https://github.com/Emily-Jiang/reactive-service-b
40
Example
Thank you
41
Emily Jiang
STSM, Liberty Microservice Architect and Advocate
Java Champion
—
emijiang@uk.ibm.com

More Related Content

Similar to Reactive Microservice With MicroProfile | Community Day, EclipseCon Europe 2019

Fronteers 20131205 the realtime web
Fronteers 20131205   the realtime webFronteers 20131205   the realtime web
Fronteers 20131205 the realtime web
Bert Wijnants
 

Similar to Reactive Microservice With MicroProfile | Community Day, EclipseCon Europe 2019 (20)

Being Reactive with Spring
Being Reactive with SpringBeing Reactive with Spring
Being Reactive with Spring
 
Virtual Classroom
Virtual ClassroomVirtual Classroom
Virtual Classroom
 
Netflix Play API: Why we built an evolutionary architecture
Netflix Play API: Why we built an evolutionary architectureNetflix Play API: Why we built an evolutionary architecture
Netflix Play API: Why we built an evolutionary architecture
 
Reddirt2011
Reddirt2011Reddirt2011
Reddirt2011
 
Micro profile and istio
Micro profile and istioMicro profile and istio
Micro profile and istio
 
JavaOne 2007 - TS4721
JavaOne 2007 - TS4721 JavaOne 2007 - TS4721
JavaOne 2007 - TS4721
 
Fronteers 20131205 the realtime web
Fronteers 20131205   the realtime webFronteers 20131205   the realtime web
Fronteers 20131205 the realtime web
 
Introduction to EJB
Introduction to EJBIntroduction to EJB
Introduction to EJB
 
MunichJS - 2011-04-06
MunichJS - 2011-04-06MunichJS - 2011-04-06
MunichJS - 2011-04-06
 
EJB.docx
EJB.docxEJB.docx
EJB.docx
 
&lt;x> Rails Web App Security Title
&lt;x> Rails Web App Security Title&lt;x> Rails Web App Security Title
&lt;x> Rails Web App Security Title
 
Apply best parts of microservices to serverless
Apply best parts of microservices to serverlessApply best parts of microservices to serverless
Apply best parts of microservices to serverless
 
EJB et WS (Montreal JUG - 12 mai 2011)
EJB et WS (Montreal JUG - 12 mai 2011)EJB et WS (Montreal JUG - 12 mai 2011)
EJB et WS (Montreal JUG - 12 mai 2011)
 
Software punk
Software punkSoftware punk
Software punk
 
Messages, Instances and Initialization
Messages, Instances and InitializationMessages, Instances and Initialization
Messages, Instances and Initialization
 
Meetup Microservices Commandments
Meetup Microservices CommandmentsMeetup Microservices Commandments
Meetup Microservices Commandments
 
Exploring .NET memory management (iSense)
Exploring .NET memory management (iSense)Exploring .NET memory management (iSense)
Exploring .NET memory management (iSense)
 
Monitoring distributed (micro-)services
Monitoring distributed (micro-)servicesMonitoring distributed (micro-)services
Monitoring distributed (micro-)services
 
Stability anti patterns in cloud-native applications
Stability anti patterns in cloud-native applicationsStability anti patterns in cloud-native applications
Stability anti patterns in cloud-native applications
 
Tasks: you gotta know how to run them
Tasks: you gotta know how to run themTasks: you gotta know how to run them
Tasks: you gotta know how to run them
 

More from Jakarta_EE

More from Jakarta_EE (20)

Applied Domain-Driven Design Blueprints for Jakarta EE
Applied Domain-Driven Design Blueprints for Jakarta EEApplied Domain-Driven Design Blueprints for Jakarta EE
Applied Domain-Driven Design Blueprints for Jakarta EE
 
Contributors Guide to the Jakarta EE 10 Galaxy
Contributors Guide to the Jakarta EE 10 GalaxyContributors Guide to the Jakarta EE 10 Galaxy
Contributors Guide to the Jakarta EE 10 Galaxy
 
Shorten All URLs
Shorten All URLsShorten All URLs
Shorten All URLs
 
The Eclipse Transformer Project
The Eclipse Transformer Project The Eclipse Transformer Project
The Eclipse Transformer Project
 
Eclipse Transformer
Eclipse TransformerEclipse Transformer
Eclipse Transformer
 
Eclipse GlassFish 6.0.0-M1
Eclipse GlassFish 6.0.0-M1Eclipse GlassFish 6.0.0-M1
Eclipse GlassFish 6.0.0-M1
 
Jakarta EE 9 Platform Project
Jakarta EE 9 Platform ProjectJakarta EE 9 Platform Project
Jakarta EE 9 Platform Project
 
Jakarta EE 9 Milestone Release Party - Overview
Jakarta EE 9 Milestone Release Party - OverviewJakarta EE 9 Milestone Release Party - Overview
Jakarta EE 9 Milestone Release Party - Overview
 
Jakarta EE 9 Platform Report
Jakarta EE 9 Platform ReportJakarta EE 9 Platform Report
Jakarta EE 9 Platform Report
 
Cloud Native Java: Present and Future at Eclipse Foundation
Cloud Native Java: Present and Future at Eclipse FoundationCloud Native Java: Present and Future at Eclipse Foundation
Cloud Native Java: Present and Future at Eclipse Foundation
 
Building 12-factor Cloud Native Microservices
Building 12-factor Cloud Native MicroservicesBuilding 12-factor Cloud Native Microservices
Building 12-factor Cloud Native Microservices
 
JakartaOne Livestream CN4J: Driving Jakarta EE Success
JakartaOne Livestream CN4J: Driving Jakarta EE SuccessJakartaOne Livestream CN4J: Driving Jakarta EE Success
JakartaOne Livestream CN4J: Driving Jakarta EE Success
 
JakartaOne Livestream CN4J: Cloud Native Runtimes - Revolution or Evolution?
JakartaOne Livestream CN4J: Cloud Native Runtimes - Revolution or Evolution?JakartaOne Livestream CN4J: Cloud Native Runtimes - Revolution or Evolution?
JakartaOne Livestream CN4J: Cloud Native Runtimes - Revolution or Evolution?
 
JakartaOne Livestream CN4J: Bringing Reactive to Enterprise Developers
JakartaOne Livestream CN4J: Bringing Reactive to Enterprise DevelopersJakartaOne Livestream CN4J: Bringing Reactive to Enterprise Developers
JakartaOne Livestream CN4J: Bringing Reactive to Enterprise Developers
 
JakartaOne Livestream CN4J: Eclipse MicroProfile - Your Cloud-Native Companion
JakartaOne Livestream CN4J: Eclipse MicroProfile - Your Cloud-Native CompanionJakartaOne Livestream CN4J: Eclipse MicroProfile - Your Cloud-Native Companion
JakartaOne Livestream CN4J: Eclipse MicroProfile - Your Cloud-Native Companion
 
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
 
Jakarta for dummEEs | JakartaOne Livestream
Jakarta for dummEEs | JakartaOne LivestreamJakarta for dummEEs | JakartaOne Livestream
Jakarta for dummEEs | JakartaOne Livestream
 
Jakarta EE Meets NoSQL at the Cloud Age | JakartaOne Livestream
Jakarta EE Meets NoSQL at the Cloud Age | JakartaOne LivestreamJakarta EE Meets NoSQL at the Cloud Age | JakartaOne Livestream
Jakarta EE Meets NoSQL at the Cloud Age | JakartaOne Livestream
 
Turbocharged Java with Quarkus | JakartaOne Livestream
 Turbocharged Java with Quarkus | JakartaOne Livestream Turbocharged Java with Quarkus | JakartaOne Livestream
Turbocharged Java with Quarkus | JakartaOne Livestream
 
Building Interoperable Microservices With Eclipse MicroProfile| JakartaOne Li...
Building Interoperable Microservices With Eclipse MicroProfile| JakartaOne Li...Building Interoperable Microservices With Eclipse MicroProfile| JakartaOne Li...
Building Interoperable Microservices With Eclipse MicroProfile| JakartaOne Li...
 

Recently uploaded

Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
Alluxio, Inc.
 

Recently uploaded (20)

First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Kraków
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
Breaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfBreaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdf
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
 
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 

Reactive Microservice With MicroProfile | Community Day, EclipseCon Europe 2019