Orchestrated Saga Pattern with Temporal: Building Durable Distributed Transactions in Go

The Pain of Distributed Transactions in Core Banking In a traditional monolithic architecture, ensuring the ACID (Atomicity, Consistency, Isolation, Durability) properties of a financial transaction is remarkably straightforward. You simply open a Database Transaction, execute multiple SQL statements (debit account A, credit account B, insert an audit log), and finally issue a COMMIT. If any step fails, you issue a ROLLBACK, and the database engine magically reverts everything to its pristine state. ...

July 17, 2026 · 8 min · Lê Tuấn Anh

Saga Pattern in Go — Temporal, Outbox Pattern & Debezium

Answer-first: The Saga Pattern coordinates distributed transactions across microservices by decomposing a large transaction into a sequence of local transactions. If any step fails, the system automatically executes compensating transactions in reverse order to undo completed steps. Each local transaction must be idempotent. Prerequisite: Part 8 of the System Design Masterclass. Read Part 7: Idempotent API Design first — compensating transactions in Saga must be idempotent. What You’ll Learn That AI Won’t Tell You Temporal Workflow Determinism: How Temporal’s event sourcing workflow engine replays Go code, and why random functions or time sleeps crash workers. Debezium EventRouter Tuning: The exact JSON configuration keys needed to customize Kafka routing keys and prevent partition ordering issues. Pivot State Analysis: Identifying the “point of no return” in a distributed saga where compensations are no longer allowed. What Are the Problems with 2PC in Microservices? Key Concept: Two-Phase Commit (2PC) is a blocking protocol with a coordinator single point of failure. If the coordinator crashes between the Prepare and Commit phases, all participants are blocked indefinitely with locks held — a catastrophic failure mode in microservices. These are the same core banking distributed transaction challenges seen in legacy systems. ...

June 18, 2026 · 8 min · Lê Tuấn Anh

Composable Banking Architecture: Monolith to Modular

Answer-first: Composable banking replaces rigid legacy cores with modular Go microservices. The transition uses the Strangler Fig pattern to decouple domains, while distributed Sagas manage eventual consistency across transaction engines, and NewSQL databases provide horizontal scaling without sacrificing ACID compliance. What You’ll Learn That AI Won’t Tell You Strangler fig patterns for core banking systems that prevent data corruption. How to bridge legacy COBOL records into dynamic JSON streams using Go middleware. Legacy core banking systems were designed in a different era. Temenos T24, Finacle, and Flexcube shared one defining assumption: the bank’s entire product catalogue — deposits, lending, payments, trade finance — would live inside a single, tightly coupled application and a single, shared database. That assumption held when banking moved at human speed. It breaks completely when product releases need to go from months to days, when a single fraud engine update must not risk a payments outage, and when engineers on a COBOL codebase are retiring faster than they can be replaced. ...

June 10, 2026 · 19 min · Lê Tuấn Anh

Banking Microservices in Go: Saga & Event Sourcing

Answer-first: A modern banking microservices architecture replaces legacy monolithic ledgers (like T24 or Flexcube) using Go for high-throughput transaction routing. The system achieves distributed consistency without two-phase commit (2PC) by combining Event Sourcing (immutable ledger streams), Saga Orchestration (using Temporal or Dapr), the Transactional Outbox pattern, and PostgreSQL unique constraints for API idempotency. What You’ll Learn That AI Won’t Tell You How to implement transactional outbox pattern to guarantee eventual consistency. Saga Orchestration patterns that handle transient payment gateway timeouts gracefully. 1. Introduction: Deconstructing the Legacy Core For decades, banks relied on monolithic core systems like Temenos T24 or Oracle FLEXCUBE. While robust, these systems present severe bottlenecks for modern digital banking. They were designed for overnight batch processing, not real-time, API-first global transactions. ...

June 1, 2026 · 12 min · Lê Tuấn Anh