Object-Oriented Design Patterns in Reactive Systems


By: A. Aarsten, G. Menga, L. Mosconi

Control of reactive and event-driven systems, with emphasis on evolution from simulation to a real system. An extension of G++: A Pattern Language for Computer-Integrated Manufacturing [Aarsten+95]. Summarizes the G++ pattern language, the result of 10 years' experience in developing concurrent and distributed control systems and an application involving cooperative autonomous mobile robots.

Published in: PLoPD2
Pages: 537-548
Category: Concurrent Systems, Event-Driven Systems, Reactive and Real-Time Systems

Control of reactive and event-driven systems, with emphasis on evolution from simulation to a real system. An extension of [Aarsten+95]. Summarizes the G++ pattern language, the result of 10 years' experience in developing concurrent and distributed control systems and an application involving cooperative autonomous mobile robots.

Related patterns: Visibility and Communication between Control Modules [Aarsten+95], Objects and Concurrency, From Prototype to Reality, Distribution of Control Modules [Aarsten+95], Remote Control,

Pattern: Object-Oriented Simulation

Pages: 540-542

You're developing software to control a reactive, event-driven system. You want to separate logical and physical design but also want to exploit an evolutionary development process. What architecture do you select for the logical design, and move from prototype to reality? Maintain two representations of the objects that will later interface to the external system so changes made during evolution remain local. To perform the transition from prototype to reality, replace the simulated objects of the prototype with the objects that will interface to the external system.

Pattern: Objectify the Events

Pages: 542-543

You're applying Object-Oriented Simulation. Objects in the prototype communicate by exchanging events and method calls. To associate the external event objects with the logical events in the prototype, create a class Event to wrap real-system events.

Pattern: Objectify System State

Pages: 543-544

You're applying Object-Oriented Simulation. In the simulation, variables that characterize the external system state are implemented as usual programming language variables. Create a class for each type of data with get and set methods for the variable it wraps. Each class should know how to convert its own data type between the internal and external formats.

Pattern: Objects with Remote Control

Pages: 545-546

You're using Objectify the Events and Objectify System State. The software control objects must be interfaced to the external entities they control. Define a new class with a callback method.

Pattern: Event-Driven RPC

Pages: 547

You're using Object-Oriented Simulation. You need to make distributed method calls through the external system. For each object that will receive remote method calls, define a compatible stub class. In the stub class, define two Events for each method, one to represent the call and the other for method return.

Category: Concurrent Systems, Event-Driven Systems, Reactive and Real-Time Systems, Distributed Systems