This pattern's name is somewhat inexpressive. The group that created this software pattern must have assumed that their model was the way to structure software. A better name, I think, would be something like Synchronizer, since that is its main function.

Examples

  • Flight Simulator

Where does it come from?

Starting in 1986, the software pattern was developed to deal with flight simulators that became ever more complex and impossible to maintain.

When should you use it?

The pattern is used in complex time-critical systems. Use it when you need to combine both periodic and aperiodic flows of control. When your modules need to be updated regularly, and also send messages to each other, causing others to change state.

How does it work?

The core of the pattern is a control loop that runs at fixed periods of time, called time intervals or time frames.

The pattern contains an application specific part, called Application Level and a generic part, called Executive Level.


Picture: Structrural Model

A component models, implements, or simulates a low-level part of the system. In a flight simulator it can be a pump, a valve or a switch. Small parts. These components can be updated periodically or be modified by handling events. The component may not communicate directly with other components.

A subsystem controller is a cohesive, meaningful collection of components. Subsystem controllers can be updated periodically or be modified by handling events. An example in the domain of flight simulators: a hydrolics system. Subsystem controllers may communicate with other subsystem controllers via export areas.

An export area is a shared data repository. It has a single subsystem as an owner/writer and may have many subsystems as readers.

The event handler passes all events to the addressed subsystems.

The periodic sequencer updates all subsystem controllers at rates that can be defined per subsystem.It also synchonizes the exchange of data via the export areas.

The timeline synchonizer synchronizes the cyclic frames that form the time unit of simulation. It initiates the synchronized exchange of data between subsystem controllers and invokes the periodic sequencer and the event handler.

Links