With the complexity of the system, the single system is increasingly unable to meet the needs of development, so the distributed system came into being. However, this creates the problem of distributed transactions for developers, making uniformity on a single machine as easy to implement as on a polymorphic machine. Here are some distributed transaction frameworks encapsulated by open source enthusiasts:

1.tcc-transaction

Making address: github.com/changmingxi…

Source analysis: www.iocoder.cn/categories/…

2.myth

Making address:

github.com/yu199195

Source code analysis: juejin.cn/post/684490…

3.happylifeplat tcc

Github address: github.com/yu199195/hm…

Source analysis: yu199195. Making. IO/categories /…

4.FESCAR: Alibaba’s flagship open source distributed transaction solution

FESCAR name: Fast & EaSy Commit And Rollback

Principle:

A typical FESCAR maintained distributed transaction has the following lifecycle:

TM requests TC to start a global transaction, and TC generates an XID, a unique ID representing the global transaction.

The XID is broadcast out through the invocation chain of the microservice (green line);

RM registers a local transaction with TC under the distributed transaction represented by XID (red arrow);

TM asks TC whether to commit or roll back the global transaction represented by XID;

TC driver all branch transactions under the global transaction represented by XID, complete commit or scroll back.

Github address: github.com/alibaba/fes…

We hope that you can actively participate in the development of distributed transactions, to provide excellent solution implementation!

Welcome to follow my official account to learn about distributed transactions: