Reactor

Concurrency Pattern

Schmidt95

Intent

  • Handles service requests that are delivered concurrently to an application by one or more clients.

Context

  • A server application of a distributed system that receives concurrent events from one or more clients.

Forces

  • Availability: the server must be available to handle requests.

  • Efficiency: the server must minimize latency, maximize processing capacity and avoid using the processor unnecessarily.

  • Simplicity: the server must be designed to simplify the use of different strategies of competition.

  • Adaptability: the creation of new services should not change the format of messages.

Solution

  • Use an event dispatcher as the system core.

Structure

reactor structure

Consequences

  • Non-preemptive

  • Hard to debug

Know uses

  • InterViews

  • ACE

  • CORBA ORB

  • Apache XML Cocoon

Back to main presentation