Proactor pattern
   HOME

TheInfoList



OR:

Proactor is a
software design pattern In software engineering, a software design pattern or design pattern is a general, reusable solution to a commonly occurring problem in many contexts in software design. A design pattern is not a rigid structure to be transplanted directly into s ...
for
event handling In computing, an event is a detectable occurrence or change in the system's state, such as user input, hardware interrupts, system notifications, or changes in data or conditions, that the system is designed to monitor. Events trigger responses or ...
in which long running activities are running in an asynchronous part. A ''completion handler'' is called after the asynchronous part has terminated. The proactor pattern can be considered to be an asynchronous variant of the synchronous reactor pattern.Pattern-Oriented Software Architecture, Volume 2, Schmidt et al., Jon Wiley & Sons, Ltd, 2000


Interaction

Operation specific actors: * The ''Proactive Initiator'' starts the asynchronous operation via the Asynchronous Operation Processor and defines the Completion Handler * ''Completion Handler'' is a call at the end of the operation from the Asynchronous Operation Processor * ''Asynchronous Operation'' Standardized actors * The ''Asynchronous Operation Processor'' controls the whole asynchronous operation * The ''Completion Dispatcher'' handles the call, depending on the execution environment.


Implementations


Proactor and Boost.Asio
( C++) * Adaptive Communication Environment ( C++)
RJR
(Ruby)


See also

* Reactor pattern (a pattern that also asynchronously queues events, but demultiplexes and dispatches them synchronously)


References


External links


Proactor - An Object Behavioral Pattern for Demultiplexing and Dispatching Handlers for Asynchronous Events
Irfan Pyarali, Tim Harrison, Douglas C. Schmidt, Thomas D. Jordan, 1997 (pdf 143 kB) Events (computing) Software design patterns {{software-eng-stub