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

The Reactor Pattern

The Reactor Pattern

Ef3b48913ea26665c25b2ad78e449d16?s=128

Luram Archanjo

October 02, 2019
Tweet

Transcript

  1. Reactor Pattern vs Thread-based(pool) Pattern The Battle of Concurrency Patterns

  2. Thread-based(pool) Pattern

  3. Thread-based(pool) Pattern CLIENT 1 CLIENT 2 CLIENT 3 CLIENT 4

    CLIENT 5 CLIENT 6 THREAD POOL THREAD 1 THREAD 2 THREAD 3 THREAD 4 THREAD 5
  4. Reactor Pattern

  5. The reactor pattern describes that a single thread runs in

    a loop to deliver the events to the handlers
  6. Reactor Pattern

  7. Never blocks the Event Loop

  8. Performance

  9. Demo

  10. What are the disadvantages?

  11. What are the advantages of using Reactor Pattern?

  12. Debug (Callback)

  13. https://github.com/larchanjo /poc-vertx-grpc

  14. Questions?

  15. Thanks a million! /larchanjo /luram-archanjo