Distributed SQL ACID Latency: TiDB, CockroachDB & Spanner

Prerequisite: Familiarity with the concepts introduced in Part 1 — Double Entry Ledger Schema. Review it first if the terminology in this part is unfamiliar. Answer-first: Distributed SQL engines preserve multi-region ACID serializability by combining Raft/Paxos consensus with bounded clock synchronization protocols such as Spanner TrueTime, CockroachDB HLC, or TiDB Percolator TSO. Selecting optimal commit-wait delays and timestamp allocation strategies minimizes two-phase commit overhead, achieving low transaction latencies across cross-region core banking nodes. ...

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

Double-Entry Bookkeeping: Core Banking Ledger Guide

Answer-first: Double-entry bookkeeping in core banking guarantees that every transaction records equal Debit and Credit entries across sub-ledgers. Enforcing $\sum \text{Debits} = \sum \text{Credits}$ at the database schema level via atomic PostgreSQL transactions and Go ledger validation engines prevents financial imbalance, race conditions, and audit compliance failures. Prerequisite: Read the Executive Summary for the high-level roadmap of core banking evolution. Why does a developer need to learn accounting? Answer-first: Developers must understand accounting principles to design software ledgers that correctly enforce balance invariants and immutable journal logs. ...

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

ACID Transactions & Isolation Levels in Core Banking

Answer-first: Enforcing ACID isolation levels in core banking prevents lost updates and dirty reads during high-concurrency transfers. Using PostgreSQL REPEATABLE READ or pessimistic row locking (SELECT FOR UPDATE) combined with Go connection pooling guarantees transactional integrity. Spanner and CockroachDB provide linearizable distributed ACID transactions across microservices using Paxos consensus and Hybrid Logical Clocks. Prerequisite: Part 2: CASA & Lending Domain Logic on transaction parameters. The Core Problem: Concurrency Answer-first: High-concurrency banking transfers risking race conditions and lost updates require strict database lock isolation to protect ledger state. ...

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