Standalone conceptPatternChapter II · Styles & patterns · Building block 11 of 11

Blackboard

A blackboard coordinates specialised knowledge sources through shared working state that is refined step by step.

  1. Knowledge baseHolds shared working state.
  2. Knowledge sourceContributes based on current state.
  3. Completion ruleDetect when enough knowledge is available.

Context

Why this is important

Distinguish knowledge-based collaboration over shared data from a fixed processing pipeline.

A pattern for problems where contributions and their order emerge from available knowledge.

Shop example · Mapping

Blackboard and pipe and filter

The product recommendation is hypothetical; the existing supplier import remains a linear pipeline.

This is how you read the picture

  1. Knowledge base Blackboard
  2. Knowledge source Component
  3. Completion rule Completion criterion
Blackboard and pipe and filter
AspectFormEffect
OrderKnowledge drives contribution.Pipeline fixes the order.
Shared stateBlackboard gathers evidence.Filters pass intermediate results.
Knowledge-driven contributions differ from fixed steps.

Benefits & limitations

Helps if:

  • Several specialised methods provide complementary evidence.
  • The next suitable action depends on current knowledge.

Boundaries

  • Shared state and competing contributions complicate coordination and debugging.
  • Without a verifiable completion condition, processing remains incomplete or continues indefinitely.

In practice

  1. Define the format of shared knowledge entries and record provenance and validity time. Knowledge sources can then reliably check preconditions and conflicting contributions can be assessed.
  2. Define priority, conflict handling and repeatability for concurrently eligible contributions. Check whether control selects deterministically when preconditions match and keeps progress traceable.
  3. Define a business completion condition and cases with no further contribution. Identify who approves a result and what evidence supports it, so a dead end is not mistaken for a solution.
Read the detailed explanation

Knowledge sources inspect shared state and contribute when their preconditions hold. Control selects which source can contribute next.

Shared state makes contributions visible but requires rules for format, precedence, conflict and completion. The pattern suits knowledge-intensive tasks whose solution path cannot be fully specified in advance.

Pipe and Filter fixes processing steps; blackboard coordinates contributions through shared knowledge. An event-driven style distributes events rather than knowledge contributions.

For linear supplier data, Pipe & Filter remains the suitable comparison.

Check your understanding

Test yourself in three stages

  1. ReadingCheck in the picture

    What shared basis do recommendation components use?

    View the solution with justification

    A knowledge base containing current working state.

  2. ApplyingTransferred to a new situation

    When is the supplier-data pipeline a better fit?

    View the solution with justification

    When parsing, validation and normalisation run in a stable order.

  3. EvaluateWeighing an alternative

    Which rules prevent conflicting contributions?

    View the solution with justification

    Contribution format, precedence, conflict resolution and a verifiable completion condition.

Continue on the learning path

With that, you have Styles & patterns run through. It continues with Data & state.

11 Building blocks

Next areaData & state