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

Go Reactive with Vert.x

Go Reactive with Vert.x

Digging into the microservices world? Considering reactive programming? Then you should learn more about Vert.x, a lightweight, fast, modular, high-performance, and unopinionated toolkit for building reactive applications on the JVM. Come to this session to see how we can use Vert.x to solve common business use cases for enterprises and how to deploy Vert.x applications packaged as containers in OpenShift.

Eder Ignatowicz

October 11, 2016
Tweet

More Decks by Eder Ignatowicz

Other Decks in Programming

Transcript

  1. Domando a Programação Reativa
    com Vert.x
    Eder Ignatowicz
    Senior Software Engineer
    @ederign

    View Slide

  2. “Now, every company is a software company”
    — Forbes

    View Slide

  3. INSERT DESIGNATOR, IF NEEDED (EDIT ON MASTER SLIDE)
    Join developers.redhat.com
    3

    View Slide

  4. Reactive
    Systems

    View Slide

  5. Responsive

    View Slide

  6. Resilient

    View Slide

  7. Elastic

    View Slide

  8. Message Driven

    View Slide

  9. Responsive
    Message Driven
    Elastic Resilient
    Reactive Systems

    View Slide

  10. Vert.x

    View Slide

  11. Application
    Platform

    View Slide

  12. Runs on JVM

    View Slide

  13. Asynchronous
    APIs

    View Slide

  14. Polyglot

    View Slide

  15. Simple

    View Slide

  16. Why?

    View Slide

  17. APIs

    View Slide

  18. Hello World

    View Slide

  19. Verticles

    View Slide

  20. Join developers.redhat.com
    20
    public class HelloWorldVerticle extends AbstractVerticle {

    @Override
    public void start( Future fut ) {
    vertx.setPeriodic( 1000, l -> {
    vertx.eventBus()
    .publish( "hello-bus",
    new JsonObject(
    Json.encodePrettily(
    new Message( "HelloWorld Message: " + new Date() ))));} );
    vertx.eventBus()
    .consumer( "hello-bus",
    m -> {
    JsonObject json = ( JsonObject ) m.body();
    logger.info( "Receiving "
    + json.getString( "id" )
    + " : "
    + json.getString( "name" ) );} );
    }
    }

    View Slide

  21. Threading Model
    Event Loops

    View Slide

  22. Event Loops
    vs
    Blocking APIs

    View Slide

  23. Hybrid Threading
    Model

    View Slide

  24. Scaling

    View Slide

  25. Distributed
    Event Bus

    View Slide

  26. Extended to the
    browser

    View Slide

  27. Demo

    View Slide

  28. System 1

    System n
    OpenShift
    R
    E
    S
    T
    A
    P
    I
    Vert.x Cluster
    R
    E
    S
    T
    C
    L
    I
    E
    N
    T
    Distributed Event Bus
    system.process.in
    Processor
    Verticle
    system.process.in
    system.process.out.x
    system.process.out.no_system
    Audit
    Verticle
    system.process.out.x
    system.process.out.no_system
    External System
    processing
    JS Bridge
    Verticle
    system.process.out.x
    system.process.in
    system.process.out.x
    system.process.in
    Log
    Verticle
    system.process.in

    View Slide

  29. System 1

    System n
    R
    E
    S
    T
    A
    P
    I
    OpenShift

    View Slide

  30. System 1

    System n
    R
    E
    S
    T
    A
    P
    I
    Vert.x Cluster
    R
    E
    S
    T
    C
    L
    I
    E
    N
    T
    Distributed Event Bus
    system.process.in
    OpenShift

    View Slide

  31. System 1

    System n
    R
    E
    S
    T
    A
    P
    I
    Vert.x Cluster
    R
    E
    S
    T
    C
    L
    I
    E
    N
    T
    Distributed Event Bus
    system.process.in
    Processor
    Verticle
    system.process.in
    system.process.out.x
    system.process.out.no_system
    OpenShift

    View Slide

  32. System 1

    System n
    R
    E
    S
    T
    A
    P
    I
    Vert.x Cluster
    R
    E
    S
    T
    C
    L
    I
    E
    N
    T
    Distributed Event Bus
    system.process.in
    Processor
    Verticle
    system.process.in
    system.process.out.x
    system.process.out.no_system
    Audit
    Verticle
    system.process.out.x
    system.process.out.no_system
    External System
    processing
    OpenShift

    View Slide

  33. System 1

    System n
    R
    E
    S
    T
    A
    P
    I
    Vert.x Cluster
    R
    E
    S
    T
    C
    L
    I
    E
    N
    T
    Distributed Event Bus
    system.process.in
    Processor
    Verticle
    system.process.in
    system.process.out.x
    system.process.out.no_system
    Audit
    Verticle
    system.process.out.x
    system.process.out.no_system
    External System
    processing
    JS Bridge
    Verticle
    system.process.out.x
    system.process.in
    system.process.out.x
    system.process.in
    OpenShift

    View Slide

  34. System 1

    System n
    R
    E
    S
    T
    A
    P
    I
    Vert.x Cluster
    R
    E
    S
    T
    C
    L
    I
    E
    N
    T
    Distributed Event Bus
    system.process.in
    Processor
    Verticle
    system.process.in
    system.process.out.x
    system.process.out.no_system
    Audit
    Verticle
    system.process.out.x
    system.process.out.no_system
    External System
    processing
    JS Bridge
    Verticle
    system.process.out.x
    system.process.in
    system.process.out.x
    system.process.in
    Log
    Verticle
    system.process.in
    OpenShift

    View Slide

  35. Join
    developers.redhat.com
    @ederign

    View Slide

  36. plus.google.com/+RedHat
    linkedin.com/company/red-hat
    youtube.com/user/RedHatVideos
    facebook.com/redhatinc
    twitter.com/RedHatNews
    Thank you!

    View Slide