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

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.