Anurag Agarwal 9c8ad4485b Resolves checkstyle errors for patterns starting with letter r (#1072)
* Reduces checkstyle errors in reactor

* Reduces checkstyle errors in reader-writer-lock

* Reduces checkstyle errors in repository

* Reduces checkstyle errors in resource-acquisition-is-initialization

* Reduces checkstyle errors in retry
2019-11-10 19:42:26 +02:00
..
2017-11-28 20:55:52 +02:00
2019-10-12 20:05:54 +03:00
2017-11-28 21:28:53 +02:00

layout, title, folder, permalink, pumlformat, categories, tags
layout title folder permalink pumlformat categories tags
pattern Reactor reactor /patterns/reactor/ svg Concurrency
Java
Difficulty-Expert
I/O

Intent

The Reactor design pattern handles service requests that are delivered concurrently to an application by one or more clients. The application can register specific handlers for processing which are called by reactor on specific events. Dispatching of event handlers is performed by an initiation dispatcher, which manages the registered event handlers. Demultiplexing of service requests is performed by a synchronous event demultiplexer.

Reactor

Applicability

Use Reactor pattern when

  • a server application needs to handle concurrent service requests from multiple clients.
  • a server application needs to be available for receiving requests from new clients even when handling older client requests.
  • a server must maximize throughput, minimize latency and use CPU efficiently without blocking.

Real world examples

Credits