Seata初步学习一

初步把官网核心概念先录下来,关键是这几张图得理解

Seata is just a solution to the problem mentioned above.

 

 

There are three roles in Seata Framework:

  • Transaction Coordinator(TC): Maintain status of global and branch transactions, drive the global commit or rollback.
  • Transaction Manager(TM): Define the scope of global transaction: begin a global transaction, commit or rollback a global transaction.
  • Resource Manager(RM): Manage resources that branch transactions working on, talk to TC for registering branch transactions and reporting status of branch transactions, and drive the branch transaction commit or rollback.

 

 

 

A typical lifecycle of Seata managed distributed transaction:

  1. TM asks TC to begin a new global transaction. TC generates an XID representing the global transaction.
  2. XID is propagated through microservices' invoke chain.
  3. RM registers local transaction as a branch of the corresponding global transaction of XID to TC.
  4. TM asks TC for committing or rollbacking the corresponding global transaction of XID.
  5. TC drives all branch transactions under the corresponding global transaction of XID to finish branch committing or rollbacking.

 

posted @ 2021-10-15 15:10  只要努力就不晚  阅读(41)  评论(0编辑  收藏  举报