Font Size: a A A

The Design And Implementation Of Distributed Transaction Processing Middleware Based On Service Oriented Architecture

Posted on:2021-11-08Degree:MasterType:Thesis
Country:ChinaCandidate:C HuangFull Text:PDF
GTID:2518306557492874Subject:Software engineering
Abstract/Summary:PDF Full Text Request
The transaction processing mechanism in the application program is a means to ensure data consistency.When a single application is transformed into a service application,the transaction processing scope will extend from a single application transaction to a multiapplication transaction,thereby generating distributed transaction processing problems.This study mainly studied how to ensure data consistency and how to deal with transaction failures,and designed a set of distributed transaction middleware that conform to high availability and scalability of service architecture,which is used to coordinate multiple application transactions and solve problems of distributed transactions.The main contents are as follows:First of all,the study summarized 3 types of conventional technical solutions for distributed transactions by studying the consistency theory: implement distributed transactions using 2-stage commit protocol;implement distributed transactions through reliable message mode;implement distributed transactions through 2-stage compensation mode.After a comparative demonstration,the use of technology must conform to the business scenario.In traditional industries,such as finance and telecommunications,there is a high demand for consistency for transactions.It means that in a client session,the transactions must ensure that the data is updated to the correct state immediately.Therefore,the 2-stage commit protocol technology is selected as the middleware in this study to achieve distributed transaction processing of high consistency.And then,the overall design of middleware is mainly targeted at the coordination and failure processing of transactions.The transaction coordination function associates various services participating in the transaction through the transaction server so that all transaction participants in a session form a transaction chain to facilitate cooperation.The server selects Zookeeper as the transaction server to store transaction data and release related events.The client is designed as a general framework and integrated into the application in the form of a technical package.The coordination function of the client is mainly implemented using the interceptor design pattern,and interception processing is performed when receiving and feedback requests.The transaction management function in the client is used to subscribe to the events of the transaction server.The client joins the transaction processing process as the role of transaction leader or transaction follower.Each service cooperates to complete a highly consistent distributed transaction processing.In terms of the design of transaction failure processing,a program for implementing abnormality recovery programming through service downgrade technology is proposed to reduce the impact scope of distributed transaction failures.The inter-service request information is collected with the request chain tracking technology to provide a complete visualized picture of distributed transaction processing for operation and maintenance work and reduce the difficulty of operation and maintenance under transaction failure.Finally,test the middleware designed and implemented in this study.The middleware can correctly coordinate and complete distributed transaction processing in concurrent testing.The transaction downgrade function can ensure the successful processing of distributed transactions in case of any failure.The middleware is used in the transaction processing system to ensure the high consistency of the order status and amount of data generated in the transaction.The performance test data in the single-example experimental environment shows that the processing performance of the middleware can reach about 500 TPS,which satisfies the target of responding to thousands of concurrent transaction requests during the peak business period.
Keywords/Search Tags:Service-Oriented Architecture, Distributed Transaction, Strict Consistency, Two Phase Commitment
PDF Full Text Request
Related items