Decision spaceChapter II · Communication · Building block 7 of 9

Orchestration & choreography

Orchestration brings sequence decisions together in one coordinator. Choreography distributes reactions to events via participating building blocks.

  1. CoordinatorCentral expiration decision.
  2. ChoreographyReactions distribute the flow.
  3. Summary of flowsVisibility versus distribution.

Context

Why this is important

Where process knowledge lies, determines who is asked for changes and errors. If it is scattered, the overall process is difficult to see. Compensation of a distributed sequence handles the saga.

This building block compares two forms of sequence control. For compensations of a distributed sequence see saga.

At a glance · Central control or choreography

In orchestration, an orchestra calls the services in sequence; in choreography, services themselves respond to events in the channel.
Shop example · Playing through scenarios

Delay knowledge for reservation and payment

Variant: Warehouse and payment are independent services. The team compares an order orchestration with an event-driven choreography; the payment provider remains external.

This is how you read the picture

  1. Coordinator In the case of orchestration, the order bears the marking “Expiry knowledge sits here”.
  2. Choreography In choreography, payment responds to Reserved and Warehouse to Rejected Payment.
  3. Summary of flows The key figure flow chart: distributed in the coordinator visibly opposite over event contracts.
Control system
Case
  • carries the flowOrderCoordinator: Workflow knowledge sits here
  • ParticipantsInventoryReserved on command
  • ParticipantsPaymentPaying on orders

Visible in the coordinatorSummary of flows

The coordinator sends first the reserve command, then the payment order. The whole flow is in one place.

Select the control and the case. You can see which building block knows the flow and who reacts when payment is refused.

Benefits & limitations

Helps if:

  • A flow with several steps and error states receives a centrally traceable sequence through orchestration.
  • A process coordinator stores progress and the next step to provide authoritative status information.
  • Autonomous reactions of the participants distribute the control via choreography.

Boundaries

  • A central coordinator becomes additional runtime and change dependency; its availability and state migration must be secured.
  • Distributed choreography makes overall progress difficult to see; correlation and status aggregation are necessary.
  • Orchestration does not provide global atomicity; Saga and Partial Failures address compensation and unknown outcomes.

In practice

  1. Record permissible steps, transitions and those responsible for the process. A central controller stores the progress and decides based on explicit answers.
  2. Make state transitions permanent and resumable. After restarting, the process must neither forget a confirmed step nor double-run a step uncontrollably.
  3. Choose orchestration or choreography according to change and diagnostic needs. Saga describes distributed local steps; Partial Failures addresses unknown outcomes.
Read the detailed explanation

Orchestration records process progress at a controlling point and selects the next step from responses and failure states. Choreography distributes decisions among participants that react to events.

Central control makes status and ordering easier to query but introduces another dependency. Distributed reactions reduce central control while making the overall path harder to see. Both approaches need durable progress and failure states.

Saga organises distributed local changes and possible compensations; Partial Failures explains why process state must represent unknown outcomes.

Check your understanding

Test yourself in three stages

  1. ReadingCheck in the picture

    Who Reacts to PaymentRejected in Choreography?

    View the solution with justification

    The camp. It releases the reservation itself.

  2. ApplyingTransferred to a new situation

    The order should change: first payment, then reservation. Where is the effort smaller?

    View the solution with justification

    In the case of orchestration: the coordinator is changed. In choreography, several reactions must be coordinated.

  3. EvaluateWeighing an alternative

    The team wants to choose choreography instead of orchestration. How do you weigh up?

    View the solution with justification

    Choreography loosely couples services over events, but makes the overall process more difficult to see. Orchestration bundles the workflow knowledge in one place, but gives the coordinator more responsibility.