Core Idea

Stateless Choreography is a workflow coordination pattern where services in a choreographed system reconstruct workflow state on-demand through queries rather than storing it.

Definition

Stateless Choreography is a workflow coordination pattern where services reconstruct workflow state on-demand through queries rather than storing it. Each service maintains local state within its Bounded-Context but derives overall workflow status by querying other services. This eliminates centralized state storage while preserving choreography’s decentralized nature.

Key Characteristics

  • On-demand state reconstruction: Workflow state built dynamically by querying services, not stored centrally
  • Local state ownership: Each service maintains only its bounded context state
  • No persistent workflow state: No single service tracks complete workflow unlike Front-Controller-Pattern
  • Reduced coupling: Loose coupling through events and query interfaces
  • Eventual consistency: Workflow state view may be temporarily inconsistent

Example

E-commerce order: Order Service queries Payment, Inventory, and Shipping APIs to reconstruct order status—no service stores “order completed” state. Each service owns only its slice; the full picture emerges from composition.

Why It Matters

Stateless choreography enables scalable, fault-tolerant workflows by eliminating centralized state storage bottlenecks and single points of failure. Services scale independently without coordinating state mechanisms. Suits Event-Driven-Architecture-Style and Microservices-Architecture-Style prioritizing loose coupling and autonomous evolution.

Trade-offs: increased network traffic from queries, potential inconsistency due to Eventual-Consistency, and implementation complexity. Best for workflows where state changes are infrequent relative to queries and eventual consistency is acceptable.

Sources

  • Ford, Neal; Richards, Mark; Sadalage, Pramod; Dehghani, Zhamak (2022). Software Architecture: The Hard Parts. O’Reilly Media. ISBN: 9781492086895.

    • Chapter 11: Stateless choreography pattern for workflow state management
  • Filippone, Giulio; Pompilio, Claudio; Autili, Marco (2023). “An architectural style for scalable choreography-based microservice-oriented distributed systems.” Computing, Vol. 105, pp. 1933-1956. DOI: 10.1007/s00607-022-01139-5

  • Takahashi, K.; Ikegaya, T.; Katayanagi, R. (2020). “A Workflow-less Autonomous System Architecture for Assurance Operations using Choreography Architecture.” CNSM 2020, pp. 1-5. DOI: 10.1109/CNSM50862.2020.9269057

  • Barker, Adam (2007). Flexible Service Choreography. PhD Thesis, University of Edinburgh.

  • Microsoft Azure Architecture Center (2024). “Choreography Pattern.” Cloud Design Patterns.

Note

This note was researched and drafted with AI. How these notes are written →