ShoppingMall — lossless event sourcing

OrderId owner Spot · sequential code with no orchestration layer

ShoppingMall — lossless event sourcing OrderId owner Spot · sequential code with no orchestration layer web client · Architecture component web client CommerceApi · HTTP · validate · query · Architecture component CommerceApi HTTP · validate · query OrderWorkflowSpot · one per order · OrderWorkflow node ×2 OrderWorkflowSpot one per order event stream · Architecture component event stream read model · Architecture component read model start order · query status Spot message addressed by OrderId append · replay update query OrderWorkflow node ×2

owner Spot processing

  • • web client → CommerceApi handles HTTP endpoint·validation·queries
  • • CommerceApi sends a Spot message addressed by OrderId (emphasis) — one OrderWorkflowSpot per order
  • • the OrderWorkflow node runs ×2, with a per-order Spot living on top

event sourcing (CQRS)

  • • the Spot appends·replays to the event stream and updates the read model
  • • CommerceApi queries the read model directly — sequential code that's safe under retry and interruption, with no orchestration layer