Font Size: a A A

Research And Implementation Of Distributed Transactions In Microservices Architecture

Posted on:2022-01-01Degree:MasterType:Thesis
Country:ChinaCandidate:J LiuFull Text:PDF
GTID:2518306539998339Subject:Engineering
Abstract/Summary:PDF Full Text Request
With rapid upgrading of Internet technology,software backend systems by the original single application into the application of micro service gradually,the service is to advocate the application of the service of bloated multifarious one-piece split into multiple features simple,single,micro service with low coupling,so can reduce the development difficulty,reduce the cost of development,Enhance the scalability and reusability of microservices,and facilitate agile development.Microservices are distributed,and each service is an independent program.In this distributed architecture,transactions completed by remote calls between multiple micro-services through the network will cause data inconsistency problems.Therefore,the implementation of distributed transactions to ensure data consistency is the key to the successful landing of micro-service projects.In this paper,through the analysis of the distributed transaction generation scenario and theory under micro-service,and studies the common distributed transaction solutions such as 2PC scheme,TCC scheme,reliable message final consistency scheme,maximum effort notification scheme.It provides a theoretical basis for the design and implementation of distributed transactions in the intelligent oilfield application integration system project by understanding the design idea and execution process of each solution.In the development process of micro-servitization of intelligent oilfield application integration system,the micro-service business process in the project is analyzed,and solutions are analyzed for low-concurrency and time-efficient transactions,high-concurrency and time-efficient transactions,high-concurrency and weak-concurrency transactions related to distributed transactions.The distributed transactions of 2PC scheme,TCC scheme and reliable message final consistency scheme were designed and implemented respectively.Through data consistency test and transaction throughput test,the distributed transactions of optimal solution were selected for each business while ensuring data consistency.Finally,the advantages and disadvantages of each solution are studied through the application situation in the project,and how to select distributed transactions in high concurrent projects is analyzed.The design and implementation of the TCC scheme and the final consistency scheme of reliable messages used in the intelligent oilfield application integration system project are presented.In the TCC optimization scheme,by optimizing the local transaction and asynchronous call of the transaction initiator,the overhead of network call between the transaction initiator and the transaction coordinator can be reduced,and the overhead of the transaction coordinator registering the branch transaction of the transaction initiator can be reduced.At the same time,the amount of development is reduced,the time complexity of the whole system is reduced,and the performance is improved by 19%.In the final consistency scheme of reliable message,the number of interactions between the data source service and Rocket MQ is reduced by the optimization based on asynchronous message.The development workload is reduced by the code transformation of asynchronous message.The asynchronous message receives the return signal from another thread without synchronous blocking,and the performance of the system is improved by 7%.
Keywords/Search Tags:Micro-service, Distributed transaction, Data consistency, Performance optimization
PDF Full Text Request
Related items