Bringing Reactive to Enterprise Java Developers
Julien Ponge, Thomas Segismont and Clement Escoffier Red Hat
Bringing Reactive to Enterprise Java Developers Julien Ponge, - - PowerPoint PPT Presentation
Bringing Reactive to Enterprise Java Developers Julien Ponge, Thomas Segismont and Clement Escoffier Red Hat Hello! We work on Eclipse Vert.x , a toolkit for writing asynchronous and reactive applications on the JVM 2 Reactive Summit 2018
Bringing Reactive to Enterprise Java Developers
Julien Ponge, Thomas Segismont and Clement Escoffier Red Hat
Reactive Summit 2018 2
Reactive Summit 2018 3
50% off with mlponge code
Reactive Summit 2018 4
Reactive Summit 2018 5
Vert.x MicroProfile Jakarta EE
...without breaking everything!
Reactive Summit 2018 7
‘14
Java EE 8
‘17
‘13
Java EE 7
‘07
JAX-RS
‘09
CDI (Java EE 6) Microservices Docker Kubernetes Reactive manifesto
‘12
Vert.x Node.js MVC 1.0
‘11
Kafka Serverless
Reactive Summit 2018 8
Typical use-case
CRUD Database with ORM
Development model
CDI (injection) JAX-RS (REST API) JPA, Bean Validation, JTA, Management...
Execution model
Servlets 1 thread per request
Reactive Summit 2018 9
Based on the concept of application server ➔ 1 server = many applications Does not fit the “cloud model” ➔ Small, lightweight applications ➔ Each service in its own process
Reactive Summit 2018 10
Most of the model is synchronous except
Also: ➔ No stream support ➔ No back-pressure
Reactive Summit 2018 11
MicroProfile - the rogue child ➔ A new set of specs ➔ Microservice-friendly ➔ Very iterative ➔ Reactive working group! Jakarta EE ➔ New spec model ➔ Faster processes ➔ Growing interest for reactive
Reactive Summit 2018 13
Traction from: Lightbend, Red Hat, Oracle, IBM
Reactive Streams Operators Reactive Messaging Concurrency
Reactive Summit 2018 14
S t r e a m d a t a a s S S E
Reactive Summit 2018 15
Reactive Summit 2018 16
M a n u e l , p r e a n d p
t p r
e s s i n g
Reactive Summit 2018 17
C
p
e a n d t r a n s f
m
* no rabbits were harmed in the making of this.
Reactive Summit 2018 19
RestEasy, server-sent events and reactive streams Server {sleeping, awake, eating}
Reactive Summit 2018 20
Introducing MicroProfile Reactive Messaging HealthDataBean (temperature, heartbeat, pressure) Neo (sleeping, awake, eating) Processor state Health data Heartbeat
Reactive Summit 2018 21
Introducing MicroProfile Reactive Streams Operators HealthDataBean (temperature, heartbeat, pressure) Processor Health data Heartbeat HTTP Client (Vert.x) Snapshot service (latest data) Health data Health data 1 2
Reactive Summit 2018 22
Health data comes from MQTT Processor Health data Heartbeat HTTP Client (Vert.x) Snapshot service (latest data) Health data Health data 1 2 MQTT
Reactive Summit 2018 23
Event-driven and asynchronous microservices MQTT Kafka Collector service Snapshot service Web application Health data Events split by topic SSE HTTP Events
Reactive Summit 2018 25
Reactive Summit 2018 26
JAX-RS
Vert.x CDI (Weld) RestEasy
Reactive Messaging
Vert.x-powered MQTT Apache Kafka Apache Camel AMQP 1.0
Reactive Stream Ops
Vert.x + RxJava2
Reactive Summit 2018 27
○ Approaching 1.0 ○ Starting to infuse in the other MicroProfile specifications ○ Integration in the next MicroProfile release (February 2019)
○ Data streaming and Event-driven microservice ○ Integration in the next MicroProfile release (February 2019)
○ Async context propagation
Reactive Summit 2018 28
50% off with mlponge code
@jponge @tsegismont @clementplop
plus.google.com/+RedHat linkedin.com/company/red-hat youtube.com/user/RedHatVideos facebook.com/redhatinc twitter.com/RedHat