Transactional Outbox & Saga Pattern for E-commerce

Prerequisite: Familiarity with the concepts introduced in Part 8 — Phase3 Full Cutover. Review it first if the terminology in this part is unfamiliar. Answer-first: Distributed transaction consistency is achieved using a choreography-based saga paired with a PostgreSQL transactional outbox. Business mutations write to the outbox atomically. Background workers publish events to Dapr PubSub every 500ms, while idempotent consumer handlers process compensation events on failure. When a customer places an order on the Composable Commerce Platform, seven events need to happen in sequence across four independent services: Order created → Payment authorized → Stock reserved → Fulfillment triggered → Notification sent → Loyalty points awarded → Shipping label generated. Any of these can fail. The network can fail. The database can fail. A third-party payment gateway can time out. ...

June 3, 2026 · 16 min · Lê Tuấn Anh

System Design Survival: The Architectural Shield Guide

Prerequisite: Familiarity with the concepts introduced in Part 6 — From Coder To Orchestrator. Review it first if the terminology in this part is unfamiliar. Answer-first: While AI assistants excel at generating localized code functions, they remain blind to holistic distributed system failures, network partition handling, and cascading degradation. System design—encompassing Circuit Breakers, Rate Limiters, Distributed Locks, and CAP theorem trade-offs—serves as the ultimate career survival shield for software engineers. ...

May 13, 2026 · 6 min · Lê Tuấn Anh