Upgrade to Pro — share decks privately, control downloads, hide ads and more …

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.

B937ab5ebe4923869c0da0d3c1b58778?s=128

Eder Ignatowicz

October 11, 2016
Tweet

Transcript

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

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

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

    3
  4. Reactive Systems

  5. Responsive

  6. Resilient

  7. Elastic

  8. Message Driven

  9. Responsive Message Driven Elastic Resilient Reactive Systems

  10. Vert.x

  11. Application Platform

  12. Runs on JVM

  13. Asynchronous APIs

  14. Polyglot

  15. Simple

  16. Why?

  17. APIs

  18. Hello World

  19. Verticles

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

    @Override public void start( Future<Void> 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" ) );} ); } }
  21. Threading Model Event Loops

  22. Event Loops vs Blocking APIs

  23. Hybrid Threading Model

  24. Scaling

  25. Distributed Event Bus

  26. Extended to the browser

  27. Demo

  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
  29. System 1 … System n R E S T A

    P I OpenShift
  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
  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
  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
  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
  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
  35. Join developers.redhat.com @ederign

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