Points and Deviations: Pattern Language of Fire Alarm SystemsBy: P. Molin, L. Ohlsson
Published in: PLoPD3
Pages: 431-435
Category: Concurrent Systems, Distributed Systems, Fire Alarm Systems
Summary: Architecture of an object-oriented framework for a family of fire alarm systems.
Pages: 433-435
A fire alarm system must detect extraordinary events. To implement dependencies and information flow between alarm detection and actuators, user interfaces, and other outputs, represent deviations from normal states as a deviation with subclasses alarm, fault, and disturbance. Deviations are the unit of distribution in the system. Deviations are replicated to all control units. The set of deviations defines the system state.
Pages: 435-437
To separate the logical behavior of a fire alarm system from the variation among input sensors and output actuators, define the interface between the logical part and the input/output part as a set of points, InputPoints, or OutputPoints. A point has binary state--active or inactive.
Pages: 437-438
You're using Deviation and need a uniform way of accessing all instances regardless of their distribution on different nodes. To provide a standardized interface, collect all instances in pools--virtual containers that contain all instances of the class. A copy of each pool should be on each node in the system.
Pages: 439-440
You're using Point. Most points have state-dependent behavior. Use State [Gamma+95], but replace the state member variable with a member function. The current state is not stored explicitly but computed when state-dependent behavior is invoked.
Pages: 440-442
To preserve inherent concurrency and meet requirements for performance, demonstrability, and memory efficiency, while still separating scheduling strategies from task behavior, represent each periodic task as a periodic object, where an abstract class defines the pure virtual function tick. Different tasks are implemented as subclasses that define a tick operation. Define scheduling classes to iterate over a collection of periodic objects with different scheduling strategies.
Pages: 442-443
Designate devices as periodic objects. Let them pump/push data to points. Control flow follows data flow, and points are passive, so no buffers are needed between points and devices.