Shang Silicon Valley—Cloud—Seata handles distributed transactions (138~148)

One: Distributed transaction problem:
Two: Seata Introduction:
Three: Seata-Server installation:
Four: Order/inventory/account business database preparation:
Five: Order/inventory/account business microservice preparation:
Six: Test:


One: Distributed transaction issues:

1) Before distributed:
                           a: Stand-alone single library does not have this problem:
                           b: From 1:1 --> 1:N --> N:N




              2) After distributed




              3) One sentence:
                           a: A business operation requires Cross multiple data sources or need to cross multiple systems to make remote calls, which will cause distributed transaction problems;
                           b: Distributed transactions: to ensure: global data consistency;

2: Introduction to Seata:

1) What is:
                           a: Seata is an open source distributed transaction solution dedicated to providing high-performance and easy-to-use distributed transaction services. Seata will provide users with AT, TCC, SAGA and XA transaction modes to create a one-stop distributed solution for users.

              2) What can you do:
                           a: A typical distributed transaction process: (1 with 3) (Unique ID of the distributed transaction process + three component models)


                             RM: It is the resource, which is the database in


              plain terms ; 3) Where to go :
                           A: https://github.com/seata/seata/releases

              4) How to play:
                           a: Local transaction: @Transactional
                           b: Global transaction: @GlobalTransactional
                                      -SEATA's distributed transaction solution




Three: Seata-Server installation:

1) Official website: http://seata.io/zh-cn/index.html
              2) Download version: 1.0
              3) Unzip seat-server-1.0.zip to the specified directory, and modify the file.conf configuration file in the conf directory ;
                           A: first backup: file.conf file
                           B: main Review: defined transaction log stores transaction group name + information DB + mode connection database;
                           C: file.conf:
                                        --Service module;


                                       - store: module:



              . 4) Mysql 5.7 Database, create a new database seate;
              5) Create a table in the seata database; Under the conf file, db file, generate three tables
              6) Modify the seat-server-1.0/seate/conf directory and find the registry.conf configuration file: ( Default --> Nacos)
                        seata can be registered to:




              7) First start Nacos port number 8848;
              8) Start seata-server; see if it is successfully registered to Nacos


Four: Order/stock/account business database preparation:

1) Official website:
              2)
              3)
              4)
              5)
              6)

Five: Order/inventory/account business microservice preparation:

1) Official website:
              2)
              3)
              4)
              5)
              6)

Six: Test:

1) Official website:
              2)
              3)
              4)
              5)
              6)

Seven:

1) Official website:
              2)
              3)
              4)
              5)
              6)