Proactor pattern
   HOME

TheInfoList



OR:

Proactor is a
software design pattern In software engineering, a software design pattern is a general, reusable solution to a commonly occurring problem within a given context in software design. It is not a finished design that can be transformed directly into source or machine co ...
for
event handling In programming and software design, an event is an action or occurrence recognized by software, often originating asynchronously from the external environment, that may be handled by the software. Computer events can be generated or triggere ...
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 Synchronization is the coordination of events to operate a system in unison. For example, the conductor of an orchestra keeps the orchestra synchronized or ''in time''. Systems that operate with all parts in synchrony are said to be synchronou ...
reactor pattern The reactor design pattern is an event handling 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 synchronou ...
.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++ C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significan ...
) *
Adaptive Communication Environment The Adaptive Communication Environment (ACE) is an open source software framework used for network programming. It provides a set of object-oriented C++ classes designed to help address the inherent complexities and challenges in network programmi ...
(
C++ C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significan ...
)
RJR
(Ruby)


See also

*
Reactor pattern The reactor design pattern is an event handling 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 synchronou ...
(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 Douglas C. Schmidt (born July 18, 1962) is a computer scientist and author in the fields of object-oriented programming, distributed computing and design patterns. Biography In August 1994 he joined the faculty of Washington University, St. Lo ...
, Thomas D. Jordan, 1997 (pdf 143 kB) Events (computing) Software design patterns {{software-eng-stub