Architectureevent choreographyevent-driven coordination

Choreography

Definition

In choreography, participants subscribe to each other's events and decide locally what to do, so the overall workflow emerges from the chain of events rather than a central definition.

In practice

Services stay loosely coupled: a new participant subscribes to an existing event without changing the publisher, and there is no central component to fail or bottleneck. It fits short flows with few steps.

The flow exists only implicitly across many services, so understanding or changing it means reading all of them, and cyclic dependencies between events creep in. Monitoring needs correlation ids and tracing to answer "where is order 81?". As flows grow, orchestration is usually easier to manage.

Example

Orders publishes OrderPlaced; Inventory reserves stock and publishes StockReserved; Payments charges on that event and publishes PaymentFailed if declined, which Inventory handles by releasing stock.