Font Size: a A A

The Design And Implementation Of Distributed Transaction Processing System Based On TCC

Posted on:2019-07-14Degree:MasterType:Thesis
Country:ChinaCandidate:F XieFull Text:PDF
GTID:2348330545975734Subject:Engineering
Abstract/Summary:PDF Full Text Request
The large e-commerce platform is characterized by large data volume,high concurrency and complex business.Therefore,the database is usually splitted into separate tables to speed up data access,and applications are also micro-serviced to meet rapid demand iterations.However,these measures will cause that data resources and service resources are on different nodes,introducing distributed transaction problems.In this way,local transactions will no longer guarantee the consistency of system data.The e-commerce platform needs to process distributed transactions to ensure data consistency.Based on the above requirements,this thesis designed and implemented a distributed transaction processing system to ensure the ultimate consistency of the data of the large e-commerce platform.The system,which relies on the Spring framework,generates transaction interceptors which coordinates and processes global transactions based on Spring's AOP,and utilizes Spring's IOC to manage dependencies between system components.In the process of transaction processing,the JAVA reflection mechanism is used to perform the Confirm/Cancel operation of the transaction participants.At the same time,the MyBatis framework is used to simplify transaction persistence operations.In the transaction recovery process,the system uses the Quartz framework to resume interrupted transactions.The system is based on the TCC transaction model for distributed transaction processing,which divides the global transaction into multiple independent local transactions.The submission of local transactions in each node does not affect each other,which prevents data resources from being locked for a long time and improves the performance of transaction processing.The system is finally implemented as a general framework.Before processing distributed transaction,the business side,who does not need to understand any details of transaction processing,should introduce the Jar package of the framework,define interface according to the specifications and make the appropriate configuration.Then the framework will automatically process distributed transaction based on the TCC transaction model.The intrusion of the system to the service code is reduced,and the use complexity is also reduced.This thesis conducted data consistency test and transaction throughput test on the system,it is verified that the system can guarantee the ultimate consistency of the data.At the same time,according to the experimental data,the transaction throughput rate of the system in the test environment is 4.996×103tps/s.It shows that the system has a high transaction throughput rate and can be applied to high-concurrency application scenarios.
Keywords/Search Tags:Transaction, Distributed Transaction, TCC, Data Consistency
PDF Full Text Request
Related items