Please note that the content of this book primarily consists of articles
available from Wikipedia or other free sources online. The reactor
design pattern is a concurrent programming pattern for handling service
requests delivered concurrently to a service handler by one or more
inputs. The service handler then demultiplexes the incoming requests and
dispatches them synchronously to the associated request handlers. All
reactor systems are single threaded by definition, but can exist in a
multithreaded environment. The reactor pattern completely separates
application specific code from the reactor implementation, which means
that application components can be divided into modular, reusable parts.
Also, due to the synchronous calling of request handlers, the reactor
pattern allows for simple coarse-grain concurrency while not adding the
complexity of multiple threads to the system