Font Size: a A A

The Design And Implementation Of A Business Non-intrusive Distributed Message-oriented Middleware System

Posted on:2022-12-02Degree:MasterType:Thesis
Country:ChinaCandidate:H H BuFull Text:PDF
GTID:2518306773997399Subject:Automation Technology
Abstract/Summary:PDF Full Text Request
In recent years,with the rapid development of the mobile Internet,the traditional single application architecture has gradually transformed into a microservice architecture.In a microservice system,different services have their own business databases,and a business request may require multiple databases to participate in a distributed transaction.Regarding traditional distributed transaction solutions,some's performance can not meet high concurrency business scenarios,such as the two-phase commit soluation based on XA protocol,some have intrusion into business code,which increases the complexity and maintenance cost of business code,such as TCC transaction solution and SAGA transaction solution.In response to these problems,the Alibaba technical team proposed the AT transaction model,and open-sourced Seata,a distributed transaction middleware that supports AT transactions in 2019.The data resource lock time of AT transaction is short,so its performance is good,and there is no business invasion.THe Seata is written based on Java,and the root communication layer uses RPC,which consumes a lot of resources.It is only suitable for microservices in the Java language and needs to rely on the registry center for high availability deployment.This paper studies the AT transaction model,and designs and implements an AT transaction middleware system based on Go language and g RPC,which occupies less resources and is suitable for microservices in Go language.It is easier to implement the high availability deployment because it dose not rely on the registry center.This system optimizes the processing flow of the phase2 process of AT transaction,it filters out inactive transactions by means of client connection counting,which saves resources and time for processing global transactions to a certain extent.The system also optimizes the logic of the transaction coordinator lock check.By marking the branch transaction of the SQL insert type,the transaction coordinator skips the lock check and directly locks the resource,saving the time of the lock check.This dissertation takes a typical order microservice as an example,it conducts data consistency test,fault recovery test,performance test and g RPC long connection test to verify the final data consistency of the distributed transaction system and its non-invasiveness to business logic.The performance is very close to the AT mode of the Java version of Seata.The g RPC makes service calls through the service name or host name,so it can be deployed with high availability without relying on the registry center.Finally,this paper looks forward to the future cross-programming language AT transaction system which is called Transaction Mesh.
Keywords/Search Tags:distributed transaction, AT transaction, transaction coordinator, transaction manager, resource manager
PDF Full Text Request
Related items