$30 off During Our Annual Pro Sale. View Details »

Bringing Reactive to Enterprise Java Developers

Julien Ponge
February 14, 2019

Bringing Reactive to Enterprise Java Developers

Julien Ponge

February 14, 2019
Tweet

More Decks by Julien Ponge

Other Decks in Programming

Transcript

  1. Bring Reactive to
    Enterprise Java Developers
    Julien Ponge, PhD
    Principal Software Engineer
    @jponge [email protected]
    1

    View Slide

  2. View Slide

  3. 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

    View Slide

  4. 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

    View Slide

  5. 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

    View Slide

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

    View Slide

  7. 7

    View Slide

  8. -50%
    MICHELIN50
    8

    View Slide

  9. VERT.X DEMO
    (data streaming)
    9

    View Slide

  10. 10
    GATE

    View Slide

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

    View Slide

  12. 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

    View Slide

  13. 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

    View Slide

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

    View Slide

  15. 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();
    }

    View Slide

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

    View Slide

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

    View Slide

  18. 18
    MicroProfile Reactive Messaging
    STEP #2
    Server
    State HEALTH
    HEARTBEAT

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  22. 22

    View Slide

  23. -50%
    MICHELIN50
    23

    View Slide

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

    View Slide