Core Idea

The Fantasy Fiction Saga Pattern coordinates distributed transactions with asynchronous communication, atomic consistency per step, and a central orchestrator that coordinates via message queues without blocking.

The Fantasy Fiction Saga Pattern (AAO) coordinates distributed transactions with three defining properties: Asynchronous communication (orchestrator sends commands via message queues without blocking), Atomic consistency (each step executes as an ACID transaction with immediate consistency), and Orchestrated coordination (a central orchestrator manages workflow state and decides next steps). Named “Fantasy Fiction” because, like a serialized novel whose chapters arrive independently yet follow a coherent arc controlled by a single author, the orchestrator maintains narrative control without synchronously waiting for each step.

How It Works

  • Non-blocking orchestration: Orchestrator publishes a command to a queue and immediately continues; it consumes reply events to advance state and publish the next command
  • Atomic steps: Domain services execute ACID transactions locally before publishing a completion event back to the orchestrator
  • Temporal decoupling with central control: Unlike Epic-Saga-Pattern (SAO), services don’t need simultaneous availability—queued messages buffer commands during transient outages
  • Compensating transactions on failure: Orchestrator asynchronously publishes compensation commands in reverse order (LIFO)

Trade-Offs

Advantages:

  • Higher throughput than Epic Saga—orchestrator coordinates many concurrent sagas without blocking
  • Temporal decoupling—queued messages survive temporary service unavailability
  • Strong consistency per step despite asynchronous transport
  • Centralized error handling, compensation sequencing, and audit trail

Disadvantages:

  • Requires message broker, correlation IDs, reply channels, and idempotent message handling
  • Harder to trace than synchronous patterns—must correlate messages across queues
  • Orchestrator remains a single point of failure; state recovery needed after crash
  • Out-of-order message delivery requires sequence tracking or deduplication logic

Sources

Note

This content was drafted with assistance from AI tools for research, organization, and initial content generation. All final content has been reviewed, fact-checked, and edited by the author to ensure accuracy and alignment with the author’s intentions and perspective.