Double-Entry Ledger: Immutable Schema & Concurrency

Prerequisite: This is the starting part of the series — no prior part is required. Later parts assume the concepts introduced here. Answer-first: A production-grade double-entry ledger enforces immutable, append-only transaction logs decoupled from balance state updates. By using fixed-size C-aligned memory structs or PostgreSQL check constraints and triggers, the schema guarantees strict debit-credit mathematical invariants, prevents hot-row lock contention, and eliminates double-spend risks in high-concurrency core banking architectures. ...

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

Part 5: ISO 8583 & ISO 20022 Core Banking Standards

Answer-first: Integrating legacy ATM/POS networks (ISO 8583 bitmap protocols) with modern real-time gross settlement systems (ISO 20022 XML/pacs.008 and pacs.009 schemas) requires high-performance Go parser pipelines. In-memory bitwise parsing ensures sub-5ms message translation across payment gateways while preserving full financial audit trails. Prerequisite: Part 4: Modern Event-Driven Core Architecture on event-sourcing structures. Why are international standards important? Answer-first: International messaging standards ensure interoperability across global banking networks, card acquirers, and central bank clearing systems. ...

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

Distributed Transactions in Go with Temporal Saga Pattern

Distributed Transactions in Go with Temporal Saga Pattern Distributed transactions in Go microservices are commonly implemented using the Temporal Saga pattern: replacing blocking Two-Phase Commit (2PC) locks with imperative workflow orchestration, dynamic reverse compensations (saga.AddCompensation), and PostgreSQL idempotency tables to keep financial event consistency during network partitions. This guide covers: The Zombie Activity Pitfall: Why setting StartToCloseTimeout without database-level idempotency locks causes phantom debits during prolonged TCP network partitions. Dynamic Compensation Registration: How to structure workflow.NewSaga in Go so that partial failures (e.g., debit succeeds, fraud check passes, but ledger credit fails) only execute compensation for steps that actually mutated state. Handling Non-Compensable External Side-Effects: Practical design patterns for handling third-party banking APIs (e.g., SWIFT/ACH wires) that cannot be programmatically rolled back. Workflow Determinism Invariants: How to write Go workflows that use Temporal signals and queries without triggering fatal non-deterministic replay panic errors. Section 1: FinTech Distributed Transaction Mechanics: 2PC vs Saga & Dual-Entry Accounting Invariants In modern distributed financial systems, microservice architectures decompose monoliths into autonomous domains: Account Management, Fraud Detection, Core Ledger, Payment Gateway Integration, and Customer Notifications. While this decomposition provides organizational velocity and independent database scaling, it shatters the traditional ACID guarantees provided by single-instance relational databases. ...

July 23, 2026 · 23 min · Lê Tuấn Anh

PayPay Architecture: Scaling Payments to 70M Users

PayPay Architecture: Scaling to 70M Users & 100k Peak TPS PayPay launched in October 2018 and grew to 10 million users in just 3 months — a growth rate that no Japanese fintech had ever seen. By 2025, the platform had crossed 70 million registered users and processed 7.8 billion payments per year. Behind this growth is an engineering team that has had to scale not just their infrastructure, but their entire engineering culture: from service standardization and GitOps-driven deployments to chaos engineering and AI-powered fraud detection. ...

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

Microfinance Core Banking: Architecture & Engineering Guide

Microfinance Core Banking: Architecture & Engineering Guide Building a Core Banking System (CBS) for a Microfinance Institution (MFI) presents a radically different set of engineering challenges compared to traditional retail banking. While commercial banks focus heavily on individual credit scores and card networks, microfinance operates on high-frequency, low-value transactions, group-based lending, and offline field collections. If you are an engineer or Business Analyst transitioning into fintech, understanding the architectural nuances of platforms like Apache Fineract (Mifos X) or Musoni is critical. This guide we will break down the 5 must-have modules of a Microfinance CBS, providing the database schemas, mathematical formulas, double-entry mappings, and the actual Product Requirements Document (PRD) snippets you need to build them. ...

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