Slide 1

Slide 1 text

Bring Reactive to Enterprise Java Developers Julien Ponge, PhD Principal Software Engineer @jponge julien.ponge@redhat.com 1

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

Responsiveness MessageS Resilience Back-Pressure Streams System Manifesto Asynchrony Elasticity Data Flows Programming eXtensions Spreadsheets Events RX Java Reactor Spring Actor Fibers Non-Blocking MicroProfile REACTIVE ALL THE THING! 3

Slide 4

Slide 4 text

4 REACTIVE SOFTWARE - A DEFINITION reactive | rēˈaktiv | adjective showing a response to a stimulus: pupils are reactive to light. • acting in response to a situation rather than creating or controlling it: a proactive rather than a reactive approach. • having a tendency to react chemically: nitrogen dioxide is a highly reactive gas. • Software - code reacting to stimuli such as user inputs, messages and failures

Slide 5

Slide 5 text

5 REACTIVE SOFTWARE - A DEFINITION reactive | rēˈaktiv | adjective showing a response to a stimulus: pupils are reactive to light. • acting in response to a situation rather than creating or controlling it: a proactive rather than a reactive approach. • having a tendency to react chemically: nitrogen dioxide is a highly reactive gas. • Software - code reacting to stimuli such as user inputs, messages and failures Remain responsive under all conditions: load + failures

Slide 6

Slide 6 text

6 ASYNCHRONOUS ALL THE THINGS! Events Messages Failures JVM Async toolkit Modern Distributed Systems

Slide 7

Slide 7 text

7

Slide 8

Slide 8 text

-50% MICHELIN50 8

Slide 9

Slide 9 text

VERT.X DEMO (data streaming) 9

Slide 10

Slide 10 text

10 GATE

Slide 11

Slide 11 text

LET’S TALK “EE” 11 Eclipse MicroProfile Eclipse JakartaEE

Slide 12

Slide 12 text

12 FROM JAVA EE TO JAKARTA EE ‘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

Slide 13

Slide 13 text

13 JAVA EE - A FOOT IN THE PAST CRUD DATABASE DEVELOPMENT MODEL CDI JAX-RS EJB EXECUTION MODEL SERVLETS 1 THREAD PER REQUESTS TYPICAL USE CASE Cloud-friendLY REACTIVE

Slide 14

Slide 14 text

14 INTRODUCING REACTIVE TO EE Without breaking everything… Vert.x Ecosystem Reactive Streams Operators Reactive Messaging Concurrency

Slide 15

Slide 15 text

15 REACTIVE AT MICROPROFILE Reactive Streams Operators Add reactive to other specs (Rest client, Fault Tolerance…) REACTIVE MESSAGING Creates, Manipulates and consumes reactive streams return ReactiveStreams .of("h", "e", "l", "l", “a") .map(s -> s.toUpperCase()) .distinct() .build(); }

Slide 16

Slide 16 text

CONNECTED RABBIT DEMO * no rabbits were harmed in the making of this.

Slide 17

Slide 17 text

17 RestEasy, server-sent events and reactive streams STEP #1 Server

Slide 18

Slide 18 text

18 MicroProfile Reactive Messaging STEP #2 Server State HEALTH HEARTBEAT

Slide 19

Slide 19 text

19 MicroProfile Reactive Streams Operators STEP #3 Server State HEALTH HEARTBEAT SNAPSHOT SERVICE HTTP HTTP

Slide 20

Slide 20 text

20 Introducing connectors STEP #4 Server State HEALTH HEARTBEAT SNAPSHOT SERVICE HTTP HTTP MQTT

Slide 21

Slide 21 text

PROCESSING LEAPS 21 Event-Driven Microservices STEP #5 State HEALTH HEARTBEAT SNAPSHOT SERVICE HTTP HTTP MQTT GATEWAY KAFKA SSE TEmperature

Slide 22

Slide 22 text

22

Slide 23

Slide 23 text

-50% MICHELIN50 23

Slide 24

Slide 24 text

plus.google.com/+RedHat linkedin.com/company/red-hat youtube.com/user/RedHatVideos facebook.com/redhatinc twitter.com/RedHat Q&A 24