Reactor -- Rainer Grimm
Event-driven applications, such as GUIs or servers, often apply the architecture pattern Reactor. A Reactor can accept multiple requests simultaneously and distribute them to different handlers.
Reactor
by Rainer Grimm
From the article:
The Reactor Pattern is an event-driven framework to concurrently demultiplex and dispatch service requests to various service providers. The requests are processed synchronously.
Problem
A server should
- be extendable to support new or improved services
- be performant, stable, and scalable
- answer several client requests simultaneously
The application should be hidden from multi-threading and synchronization challenges
Solution
- Each supported service is encapsulated in a handler
- The handlers are registered within the Reactor
- The Reactor uses an event demultiplexer to wait synchronously on all incoming events
- When the Reactor is notified, it dispatches the service request to the specific handler

Registration is now open for CppCon 2023! The conference starts on October 1 and will be held
Last time I showed a couple of questions about initialization. Try them
Registration is now open for CppCon 2023! The conference starts on October 1 and will be held
In a previous
Registration is now open for CppCon 2023! The conference starts on October 1 and will be held
Every year we run Pure Virtual C++: a free one-day virtual conference for the whole C++ community. Next month we’re doing it again!