Skip to content

Files

Latest commit

65e1cae · Apr 11, 2018

History

History
This branch is 2159 commits behind iluwatar/java-design-patterns:master.

reactor

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Nov 28, 2017
Apr 11, 2018
Nov 28, 2017
Mar 31, 2018
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