Comparison
Blackboard patternvsMediator pattern
Blackboard pattern
several independent components read from and write to one shared workspace, and no one of them owns the answer.
An architecture for problems with no deterministic solution path: independent knowledge sources contribute partial results to a shared structure until a solution emerges, coordinated by a control component. Speech recognition and sensor fusion are the traditional cases. It is in this corpus because it appears in architecture exams and reading lists, and because its shared mutable centre is a useful contrast with pipes and filters.
Full entry →Mediator pattern
the six components stopped calling each other and all called one object in the middle instead.
Replacing many-to-many references between colleagues with a single object that coordinates them. It turns a tangle into a hub, which is a genuine improvement in the tangle and a genuine risk in the hub — the mediator is the class most likely to grow into a god object. It differs from an observer in direction: an observer broadcasts a change outward, a mediator receives events and decides what everyone should do.
Full entry →