Tagged articles
distributed transaction
63 articles · Page 1 of 1
This article shows how to replace heavyweight distributed‑transaction frameworks such as Seata with a lightweight, production‑grade SAGA orchestrator built from a Java state machine, MySQL persistence and Spring Boot, covering architecture, state‑machine design, database schema, core orchestration logic, recovery, exception handling and practical deployment tips.
IdempotencyJavaSaga
0 likes · 46 min read

The article outlines six major challenges introduced by database sharding—cross‑database joins, pagination, distributed transactions, global ID generation, data migration, and aggregation—along with practical solutions such as binding tables, cursor pagination, Seata AT mode, Snowflake IDs, dual‑write scaling, and summary tables, providing interview‑ready answers.
PaginationSeataSharding
0 likes · 17 min read

The article explains why a single order operation can involve multiple services and databases, introduces the challenges of distributed transactions, and compares three common solutions—Two‑Phase Commit, TCC, and Saga—detailing their mechanisms, strengths, weaknesses, and suitable scenarios.
2PCConsistencySaga
0 likes · 12 min read

This article explains why single‑database, single‑table architectures hit performance limits at millions of rows, introduces ShardingSphere as the preferred zero‑deployment sharding solution for SpringBoot, and walks through vertical and horizontal splitting, configuration, custom algorithms, read/write splitting, and distributed transactions with practical code examples.
Custom Sharding AlgorithmReadWrite SplittingSeata
0 likes · 14 min read

This article explains why distributed transactions are essential in microservice architectures, introduces Alibaba's open‑source Seata solution, compares its AT, TCC and Saga modes, shows step‑by‑step Docker deployment, provides full Spring Cloud code examples, and lists common pitfalls and debugging tips.
AT modeDocker ComposeMySQL
0 likes · 12 min read

This article breaks down the interview focus points for messaging middleware, explains RocketMQ's "Three High and One Rich" advantages—high throughput, reliability, consistency, and rich features—compares it with Kafka and RabbitMQ, presents six detailed reasons with code samples, a selection decision tree, common interview variants, memory mnemonics, and a concise conclusion for Java developers.
Delayed MessageJava InterviewMessage Queue
0 likes · 15 min read

This article presents a detailed design for a high‑concurrency (10‑100k QPS) distributed transaction solution that integrates RocketMQ transactional messages, an eBay‑style local message table, and XXL‑Job reconciliation to achieve eventual consistency while handling failures, retries, and data‑explosion challenges.
CAP theoremJavaMessage Queue
0 likes · 34 min read

This article explains how to handle distributed consistency when a business operation writes to MySQL and calls external systems, using a financial reimbursement example to illustrate risks, analyzes the root cause, and presents a step‑by‑step solution that splits the large transaction into small, retryable units with code snippets and Spring optimization.
BPMMySQLdistributed transaction
0 likes · 8 min read


Java OneJul 31, 2025 · Backend Development
This tutorial explains how to ensure data consistency across microservices by implementing distributed transactions with Seata, covering architecture, service implementation, configuration, two‑phase commit protocol, transaction modes, and debugging techniques for a complete end‑to‑end solution.
AT modeSeataSpring Cloud
0 likes · 25 min read

The article examines the challenges of achieving distributed consistency when a business operation writes to MySQL and external systems, analyzes failure scenarios, and presents a step‑by‑step solution that splits the large transaction into small, retryable tasks with Spring afterCommit optimization.
BPMJavaMySQL
0 likes · 9 min read

This article provides a comprehensive guide to designing a payment middle platform from zero, covering its definition, classic middle‑platform types, core architecture, functional modules, fault‑tolerance, security measures, distributed‑transaction strategies, and detailed Java pseudocode, offering interview‑ready insights for architects.
architecturedistributed transactionfault tolerance
0 likes · 39 min read

This article examines common interview scenarios involving distributed locks, explains why they are often misused, outlines their proper use cases such as rate limiting, ensuring data consistency, and achieving ordered processing, and compares distributed locks with distributed transactions.
Idempotencybackend architectureconcurrency control
0 likes · 8 min read

This article explains how to build a robust order service using Seata distributed transactions, Redisson distributed locks, CompletableFuture for asynchronous operations, token-based duplicate‑submission prevention, and RabbitMQ delayed queues for automatic order cancellation, with full Java code examples.
Distributed LockOrder ServiceSeata
0 likes · 21 min read

This article explains the accounting equation, double‑entry bookkeeping, and the core account architecture of third‑party payment platforms, covering internal account types, balance, transaction logs and vouchers, performance challenges such as distributed transactions and hotspot accounts, and proposes solutions like pre‑debit/post‑credit, balance simplification, merged posting, and multi‑account designs.
Multi-Accountaccountingbookkeeping
0 likes · 18 min read

The article explains how RocketMQ implements distributed transaction messages using a two‑phase commit model to ensure data consistency across micro‑service subsystems, detailing the workflow from half‑message production, broker handling, local transaction execution, commit/rollback decisions, and periodic status checks.
Message QueueRocketMQTwo-Phase Commit
0 likes · 7 min read

This article explores eight practical use cases for message queues—including asynchronous processing, service decoupling, traffic shaping, delayed tasks, log collection, distributed transactions, remote calls, and broadcast notifications—providing code examples and architectural guidance for building robust backend systems.
Asynchronous ProcessingMessage QueueRocketMQ
0 likes · 13 min read

The article details a high‑concurrency e‑commerce coupon system that separates creation and distribution, uses Redis‑Lua atomic stock deduction with asynchronous replenishment and coupon generation, employs a lightweight distributed‑transaction table, and adds bucket and batch optimizations to safely handle tens of thousands of TPS.
Coupon SystemRedis Luadistributed transaction
0 likes · 11 min read

This article analyzes common data‑inconsistency problems in order‑placement workflows that involve many external services and presents a lightweight final‑consistency architecture with practical design guidelines, retry strategies, and compensation mechanisms to ensure reliable backend processing.
Data ConsistencyOrder Processingbackend architecture
0 likes · 6 min read

This article explores seven classic message‑queue use cases—from asynchronous decoupling and traffic‑shaping to delayed tasks, broadcast consumption, distributed transactions, and using Kafka as a data hub—illustrated with real‑world examples and code snippets.
Asynchronous ProcessingBroadcast ConsumptionDelayed Message
0 likes · 12 min read

This article provides a comprehensive overview of Seata, the Alibaba‑developed distributed transaction solution for Spring Cloud Alibaba, explaining its purpose, core components (TC, TM, RM), architecture, and step‑by‑step workflow that ensures consistency across microservices.
BackendSeataSpring Cloud Alibaba
0 likes · 5 min read

This article explains how to build a TCC‑style distributed transaction layer for Redis using Go, detailing the two‑phase commit workflow, handling of prepare, commit, and rollback phases, the associated consistency challenges, and providing full code examples.
TCCTwo-Phase Commitbackend development
0 likes · 13 min read

This article explains the concept of a local message table, shows how it can be used to achieve reliable distributed transaction consistency with MQ, and provides complete MySQL DDL and Java service code along with a retry mechanism and analysis of failure scenarios.
JavaMySQLRocketMQ
0 likes · 9 min read

This article presents a comprehensive guide to building a payment funds account system, covering core concepts such as account balance, ledger, and voucher, accounting principles like double‑entry bookkeeping, storage choices with TDSQL, security measures using the STRIDE model, consistency guarantees, distributed transactions, high‑availability design, and operational practices such as idempotency, rate limiting, and thorough auditing.
backend architecturedistributed transactionfunds account
0 likes · 37 min read

This guide walks through setting up Seata's configuration and registry centers using Nacos, creating the required config files, initializing the database, and implementing account and storage services in a Spring Boot micro‑service project, complete with code samples and verification steps.
JavaNacosSeata
0 likes · 12 min read

This article explains how Qunar’s ticket ancillary service upgraded from a single-database architecture to a sharded one without downtime, detailing dual-write, transaction handling, mapping-key routing, diff verification, the challenges encountered, and a component-based solution that makes future migrations reusable.
Shardingdistributed transactiondual-write
0 likes · 35 min read


ITPUBJul 1, 2023 · Fundamentals
This article provides a comprehensive overview of core distributed‑system concepts—including the CAP theorem, BASE model, common distributed‑lock implementations, multiple distributed‑transaction patterns such as 2PC, 3PC, TCC, local‑message tables, MQ transactions and Seata, as well as consistency algorithms like Paxos and Raft, idempotency techniques, and rate‑limiting algorithms—explaining their motivations, trade‑offs, and practical usage.
BASECAP theoremIdempotency
0 likes · 30 min read

This article describes the challenges of migrating a long‑running monolithic database to a sharded architecture, presents a two‑stage smooth migration strategy using double‑write, diff verification, and mapping‑key techniques, and details the componentized design, core implementation, and configuration of a reusable sharding framework built on MyBatis and Spring.
Database MigrationMyBatisSharding
0 likes · 34 min read

This tutorial walks through the rapid installation of Nacos in MySQL mode, the configuration of Seata 1.5.0, the creation of required database tables, the development of three micro‑services (stock, order, account) with Spring Cloud Alibaba, and the verification of global transaction rollback using a sample purchase scenario.
MySQLNacosSeata
0 likes · 16 min read

This tutorial walks through the complete environment setup, including rapid installation of Nacos with MySQL mode, configuring Seata 1.5.0 for distributed transactions, creating the required MySQL tables, building micro‑services with Spring Boot, defining Feign clients, enabling global transactions, testing the workflow, and noting important version compatibility issues.
MySQLNacosSeata
0 likes · 15 min read


ITPUBMay 1, 2023 · Backend Development
This article demystifies distributed transactions using Alibaba's Seata, explaining reverse compensation, core concepts (TC, TM, RM), the two‑phase commit protocol, and detailed walkthroughs of AT, TCC, XA, and Saga modes with code examples and step‑by‑step procedures.
AT modeSagaSeata
0 likes · 14 min read

This article explains the concept of distributed transactions, presents typical micro‑service scenarios that generate them, and demonstrates a complete solution using RocketMQ transaction messages together with SQL table definitions and Java code for producers, transaction listeners, and consumers to achieve eventual consistency.
JavaRocketMQSQL
0 likes · 14 min read

This article provides a comprehensive overview of distributed system fundamentals—including CAP and BASE theories—while detailing typical pitfalls and mitigation strategies for message queues, distributed caches, database sharding, and distributed transactions, helping engineers decide when and how to adopt distributed architectures.
BASE modelCAP theoremCaching
0 likes · 23 min read

This article explains why the @Transactional annotation can roll back data when Sharding-JDBC performs cross‑database inserts, outlines the scenarios it truly supports, and details the internal rollback mechanism that distinguishes local from distributed transactions.
@TransactionalJavaSharding-JDBC
0 likes · 8 min read

This article explains why the @Transactional annotation in Sharding-JDBC can roll back across multiple databases in some scenarios, clarifies the cases it truly supports, details the internal rollback implementation, and outlines the situations where local transactions cannot guarantee distributed consistency.
JavaLocal TransactionSharding-JDBC
0 likes · 8 min read

seadt is a Golang‑based TCC distributed‑transaction framework for Shopee Financial Products that lets initiators run multi‑service operations as if they were local DB actions, providing TM, RM, and TC components, automatic proxy generation, and robust handling of empty commits, rollbacks, hanging branches, and concurrency issues.
TCCdistributed transactiongolang
0 likes · 32 min read

This article provides a comprehensive overview of the microservice ecosystem built on Spring Cloud Alibaba, detailing essential modules such as service registration, discovery, load balancing, configuration, messaging, gateway, circuit breaking, distributed tracing, and transaction management, and includes practical code snippets and configuration examples for each component.
Circuit BreakerSpring Cloud Alibabadistributed transaction
0 likes · 21 min read

This article explains the typical problems encountered with message queues, such as message loss, duplicate delivery, and distributed transaction handling, and details various solutions including local message tables, MQ‑based transactions, and the specific mechanisms used by RocketMQ, Kafka, and RabbitMQ to ensure reliability and consistency.
KafkaMQMessage Queue
0 likes · 20 min read


JavaEdgeDec 21, 2021 · Backend Development
This article explains the fundamentals of transactions, compares monolithic and distributed transaction models, and walks through various distributed transaction solutions such as 2PC, 3PC, TCC, local message tables, MQ transactions, max‑effort notifications, Saga, and Seata, highlighting their trade‑offs and practical considerations.
2PC3PCSaga
0 likes · 20 min read


ITPUBDec 6, 2021 · Backend Development
The article explains why the naïve "insert‑then‑publish" pattern can cause data inconsistency in microservice architectures, analyzes failure scenarios, and presents a local message‑table solution that leverages database transactions to achieve eventual consistency while handling duplicate messages.
distributed transactioneventual consistencylocal message table
0 likes · 9 min read

To handle distributed transactions in micro‑service systems, the article compares 2PC, TCC, maximum‑effort notification and reliable messaging, then shows how Spring Boot can use RabbitMQ delayed queues—leveraging dead‑letter exchanges, TTL and routing—to achieve eventual consistency for order‑payment workflows.
2PCRabbitMQTCC
0 likes · 11 min read

This article explains how to use RabbitMQ as a message middleware in a Spring Boot application to achieve distributed transactions between order and dispatch services, detailing environment setup, configuration, code implementation, testing, and verification of data consistency across systems.
JavaMessage QueueMySQL
0 likes · 11 min read

This tutorial demonstrates how to set up a CentOS 7.5 environment, install RabbitMQ, and use Spring Boot to create a distributed transaction system that ensures data consistency across order and dispatch services by leveraging RabbitMQ's confirm and ACK mechanisms, complete with database schema, configuration, and code examples.
JavaMessage QueueMySQL
0 likes · 12 min read

This guide walks through configuring Seata’s registry and configuration centers with Nacos, setting up MySQL storage, defining service modules, writing transactional code with @GlobalTransactional, and verifying rollback behavior in a Spring Boot 2.3 microservice project.
MySQLNacosSeata
0 likes · 12 min read

This article examines common techniques for handling service call failures in micro‑service architectures—blocking retries, asynchronous queues, TCC compensation transactions, local message tables, and MQ transactions—detailing their implementations, pitfalls, and trade‑offs to achieve reliable data consistency.
Data ConsistencyMessage QueueTCC
0 likes · 16 min read

This article explains the X/Open Distributed Transaction Processing model, the XA specification, the two‑phase commit protocol, and demonstrates how to configure and use Atomikos in Java for managing distributed transactions across multiple resources.
AtomikosJavaTwo-Phase Commit
0 likes · 14 min read

This article explains practical techniques for detecting lost messages, ensuring reliable delivery across production, storage, and consumption stages, handling duplicate deliveries with idempotent designs, managing message backlogs through performance tuning, and using transactional messages to achieve distributed transaction consistency.
IdempotencyKafkaMessage Loss
0 likes · 23 min read

This article explains practical techniques for detecting lost messages, guaranteeing reliable production, storage, and consumption stages, handling duplicate deliveries with idempotent designs, managing message backlogs, and implementing distributed transactions using transactional messages in modern message queue systems.
IdempotencyKafkadistributed transaction
0 likes · 18 min read

This guide explains how to achieve transactional consistency across multiple databases in a Spring Boot application by integrating JTA with Atomikos, covering configuration, code implementation, testing, and verification of distributed transactions using multi‑data‑source setups.
AtomikosJTAJava
0 likes · 13 min read

This article explains why monolithic systems need to be split, how to assess business complexity, define service boundaries, perform vertical and horizontal database sharding, adopt global ID generators, migrate data safely, and ensure consistency and stability during cut‑over using stop‑write or dual‑write strategies.
application splittingbackend architecturedatabase sharding
0 likes · 16 min read

Hmily 2.1.1 introduces a completely refactored architecture, new modules, expanded RPC support, configurable storage options, and detailed upgrade guides, enabling developers to build high‑availability, high‑performance distributed transactions with minimal code changes across Spring Boot, Dubbo, and Spring Cloud ecosystems.
HmilyJavadistributed transaction
0 likes · 12 min read

This article systematically explains the fundamental concepts and typical pitfalls of distributed systems—including CAP and BASE theories, message‑queue reliability issues, distributed cache challenges, sharding strategies, and transaction models—while offering practical mitigation techniques for each problem.
CAP theoremShardingdistributed systems
0 likes · 24 min read

This article explains how to implement distributed session management, transaction handling, and locking mechanisms in Java applications, covering Tomcat‑Redis integration, Spring Session with Redis, various distributed transaction patterns, and both Redis and Zookeeper based distributed locks with complete code examples.
ZooKeeperdistributed transactiondistributed-session
0 likes · 24 min read

This article presents a comprehensive design of a flash‑sale system, covering business scenario analysis, high‑concurrency problems such as overselling and malicious requests, and detailed front‑end, Nginx, risk‑control, back‑end, database, and distributed‑transaction solutions to ensure reliability and performance.
distributed transactionflash salehigh concurrency
0 likes · 16 min read

This article details Youku's membership marketing system architecture, covering complex marketing scenarios, high‑availability and low‑latency requirements, rule‑based QL engine, unified marketing framework, multi‑cache storage, multithreaded matching, asynchronous reward distribution, and distributed transaction mechanisms.
BackendCachingHigh Availability
0 likes · 12 min read

This article explains MySQL's support for XA distributed transactions, describes the two‑phase commit process, details the XA syntax, and walks through a complete hands‑on example that transfers money between two databases using XA START, END, PREPARE, RECOVER and COMMIT commands.
MySQLSQLTwo-Phase Commit
0 likes · 11 min read

This article explains RocketMQ's transaction message feature, covering core concepts, the execution flow, and provides complete Java code examples for an order service and a product service that demonstrate how distributed transactions are implemented and verified.
JavaMessage QueueRocketMQ
0 likes · 9 min read

This article explains how database sharding in micro‑service architectures creates transaction consistency problems and demonstrates a RocketMQ‑based solution that uses a two‑phase message workflow, state checks, and a Transaction table to achieve reliable distributed transactions.
RocketMQTransaction Consistencydistributed transaction
0 likes · 8 min read

This article explains Alipay's TCC (Try‑Confirm‑Cancel) distributed transaction model, its two‑phase workflow, a concrete transfer example, common failure scenarios, and the pros and cons of using TCC in backend systems.
Application LayerTCCTwo-Phase Commit
0 likes · 6 min read


AntTechApr 8, 2019 · Backend Development
The article explains the renaming of the open‑source distributed transaction framework Fescar to Seata, outlines the background and evolution of distributed transactions at Alibaba and Ant Financial, and shares recent community milestones and future plans for the project.
AlibabaAnt FinancialSeata
0 likes · 5 min read

This article introduces the "Big Data Mastery" series and outlines practical solutions for three frequent distributed system challenges—distributed locks, distributed transactions, and distributed ID generation—while highlighting open‑source tools and key design requirements.
Distributed Lockdistributed systemsdistributed transaction
0 likes · 3 min read

This article introduces the TCC (Try‑Confirm‑Cancel) distributed transaction model, explains its three phases with real‑world e‑commerce examples, compares it to other solutions, and shows how mature frameworks ensure eventual consistency and automatic rollback in failure scenarios.
TCCdistributed transactiontransaction management
0 likes · 8 min read

This article analyzes the challenges of implementing a generic TCC distributed transaction framework using Spring, emphasizing the need for RM‑local transaction integration, transaction manager takeover, fault recovery, idempotency, and proper handling of Try/Confirm/Cancel operations.
SpringTCCdistributed transaction
0 likes · 16 min read

This article explains MySQL's XA distributed transaction mechanism, covering its 2‑phase commit process, the roles of resource and transaction managers, internal vs. external XA, essential SQL syntax, practical code examples, common pitfalls, performance considerations, and reference resources.
2PCMySQLSQL
0 likes · 11 min read
