5. Control

Control patterns deal with control of execution and selecting the right methods at the right time.

Blackboard

Purpose: dynamically decide which transformers ("knoweldge sources") to apply to a shared data structure.

Flexibility: add/replace transformers; replace controller

Implementation: Has the following components: shared data structure, set of transformers, controller that selects transformers.

See also: Repository

Command (Command Processor)

Purpose: separate composition of a request from the time it is executed.

Flexibility: multiple commands; add functionality such as undo/redo, scheduling.

Implementation: encapsulate command with additional state (the object(s) on which to operate); add command processor.

Chain of Responsibility

Purpose: pass a request down a chain of objects until an object handles it.

Flexibility: a) decoupling: handler of request is not known a priori (determined dynamically); b) extensibility: add new handlers.

Implementation: common interface for handlers, delegation along chain.

Note: could also be listed under decoupling.

Strategy

See Strategy under Variant Management. Though strategy has to do with control (choosing the right algorithm), it fits more naturally under variants.

Control State (State)

Purpose: choose behavior according to state of an object.

Flexibility: add/remove states.

Implementation: distributed form of a finite state machine: uniform interface for actions; each state object implements behavior appropriate for given state.

Master/Slave

Purpose: dynamically distributes work over several subordinate .processes (slaves) protocol for distributing work.

Flexibility: add/remove slaves, e.g. to scale parallelism

Implementation: master process creates slave processes, supplies request(s), waits for completion, then may destroy slaves.

Process Control

Purpose: regulate a physical (continuous) process.

Flexibility: adjust/replace controller.

Implementation: controller, process variables, input variables, controlled variables, manipulated variables, sensors, set point.

Variations:

Previous group Next group Back to the top