Font Size: a A A

Design And Implementation Of Microservice Transaction System Based On Transaction Message

Posted on:2022-04-24Degree:MasterType:Thesis
Country:ChinaCandidate:D S LiuFull Text:PDF
GTID:2518306338467984Subject:Computer technology
Abstract/Summary:PDF Full Text Request
With the trend of microservice and containerization of applications,it is more and more difficult for a single database to support the whole application service.The solution of one microservice corresponding to one database has gradually become an industry trend,which makes the distributed transaction problem in microservice become a research hotspot.At present,there are many problems in distributed transaction processing system,such as it is difficult to deal with the decline of system throughput caused by single point of failure and long-term occupation of resources,or it is difficult to access the service due to too much intrusion.The introduction of transactional message queue and the idea of distributed system base theory are expected to solve these problems.This paper dives deep some existing distributed transaction solutions and transaction message mechanism,analyzes the advantages and disadvantages of the existing distributed transaction solutions,and then deeply studies the transaction message mechanism and transaction message queue,and discusses the possibility of using transaction message queue to optimize the distributed transaction solutions in micro service architecture.On this basis,a micro service transaction solution based on transaction message is proposed,and the corresponding system is designed and implemented.The system uses transactional message queue to split distributed transaction into multiple local transactions.It can support normal execution of distributed transaction,rollback of execution failure of distributed transaction,rollback of timeout of distributed transaction and other functions.It supports synchronous and asynchronous call mode,supports various management operations of transaction by client,and has timed tasks to maintain the state of transaction,which can be used to manage transaction To discover transactions that have timed out in real time.After that,a simple e-commerce order system is designed,tested and developed to verify the function and performance of the system,and further optimize it.The final implementation of the distributed transaction system can ensure the final consistency of distributed transactions in the scenarios of normal transaction execution,execution failure and service downtime,and support asynchronous call mode,which can achieve very high transaction throughput.
Keywords/Search Tags:distributed transaction, message queue, distributed transaction system, microservice
PDF Full Text Request
Related items