当前位置:网站首页>Distributed transaction -- middleware of TCC -- selection / comparison
Distributed transaction -- middleware of TCC -- selection / comparison
2022-07-03 23:31:00 【It blade out of sheath】
Original website : Distributed transactions --TCC Middleware -- The selection / contrast _IT A blog with a sharp blade -CSDN Blog
brief introduction
explain
This article introduces the TCC Some of the middleware . Include :Seata,TCC-transaction、ByteTCC、Himly、EasyTransaction、LCN
Why use TCC middleware
Perceive the implementation of each stage and push forward the next stage of these things , It's impossible to do it by hand , It's too complicated .
Middleware introduction
Middleware name | Github Address | star Number | brief introduction |
Seata | 18.3K | Ali .TCC Mode only supports dubbo, I won't support it feign. | |
tcc-transaction | 4.9K | personal . I won't support it SpringBoot!! | |
LCN | 3.9K | CodingApi The team . Too much dependence :Redis、Zookeeper、Consul; at present (2021.02.24) Not yet TCC Pattern . | |
Hmily | 3.5K | Country garden . Well documented ,SpringCloud And SpringBoot support , There is a lot of information on the Internet . | |
ByteTCC | 2.5K | Beijing Xinao Group | |
EasyTransaction | 2.2K | personal .( Lack of information 、 Fewer documents ) |
forecast : Hmily Of star The number will gradually equal and surpass LCN and tcc-transaction.
Functional comparison
Frame name | Idempotency | Nested calls | RPC Framework support | SpringBoot Support | Supported transaction logs |
Seata | Dubbo.(springcloud:AT Mode support ,TCC Mode not supported ) | Support | file、DB、redis | ||
tcc-transaction | I won't support it | I won't support it | Uncoupled RPC frame . namely : The bottom layer uses any RPC Fine . But actually : Yes. dubbo Support . | I won't support it | file、DB、redis、ZK |
LCN | I won't support it | I won't support it | Support .( Need to be 5.0 Above version ) | ||
Hmily | I won't support it | I won't support it | Dubbo、motan、springcloud | file、DB、redis、mongodb、ZK | |
ByteTCC | I won't support it | I won't support it | Dubbo、springcloud | file | |
EasyTransaction | Support | Support | Dubbo、SpringCloud、Ribbon/Eureka | DB、Redis |
explain : It doesn't matter whether idempotent and nested calls are supported . reason :
- In our business, we usually deal with idempotence by ourselves ( Whether or not the framework supports idempotence );
- If the framework does not support nested calls , We don't nest calls .
LCN
explain
LCN TXC TCC Three transaction modes , And mixed support .
LCN It's essentially a BestEffors 1PC Framework : Most of the time , As long as the application does not Crash It will not lead to inconsistency .
advantage
- Excellent performance
- High reliability
- The code is less intrusive
In all the frameworks of this comparison ,LCN Implementation of distributed transaction processing mode , The coding complexity and the amount of intrusion code are the lowest .
- Additional deployment required tx-manager Service node .
- Because of the need to lock Resources are handled in this way , If you update some popular products ,LCN The performance degradation of is greater than TCC Pattern .
- Service timeout , It will cause the resources of other services to be locked , For example, in the process of payment service timeout , The inventory of relevant goods will always be inoperable .
- It can easily lead to inconsistent data : For data inconsistency , Conditions that must be repaired
- We have to write the corresponding repair program . This is actually similar to TCC/ Compensation and other workload are the same
- Use BestEffors1PC When data exceptions occur in the business code written , There is no guarantee that its subsequent compensation is enforceable .
- for instance , Transfer accounts , There's money for others , But the data that he didn't deduct money was abnormal , At this point, the two customers may immediately withdraw their money and use it
EasyTransaction
advantage
- Multi thread concurrent processing mode is adopted for remote calls , Better performance optimization
- High reliability
- Simple integration , There is no need to deploy additional transaction management nodes
shortcoming
- Compared to other frameworks , The intrusion and coding amount are too large
- RPC Request timeout processing has not been implemented
hmily
explain
“ use disruptor The framework reads and writes transaction logs asynchronously .
advantage
Declare in the form of annotations TCC Of course confirm And cancel Method , The code is less intrusive .
shortcoming
- The locking mechanism of multithreading needs to be optimized .
- In distributed transactions RPC Request serial processing , The response time of the request is long
- unreliable : Writing the transaction log asynchronously is equal to TCC It's not reliable
easy-transaction
advantage
- Really high performance , Yes IO A lot of optimization , When multiple independent third-party companies evaluate the distributed transaction framework horizontally , The performance is the best under the same scenario and the same reliability guarantee ( Self validating test )
- Theoretically, as long as the external components do not lose data , stay ET There will be no incomplete transactions inside ( Relative to the above frameworks , Its principle is not reliable , Abnormal operation is inevitable )
- Supports frame idempotent , Business processes no longer need to take over idempotent 、 Call tedious and repetitive logic such as timing disorder processing ( This is a tedious and repetitive work , It seems that there is only ET This item is fully supported )
- Implementation based on extension , Instead of a modified implementation , Easier to understand , Less risk , More powerful
- Support multiple transaction forms (TCC, compensate , Reliable information ,SAGAs etc. ) A mixture of , The most appropriate transaction form can be selected according to the most suitable business ( At this time ET The concept and characteristics at the beginning of its establishment , It is also a feature that other frameworks do not have )
shortcoming
- There are few documents
边栏推荐
- 炒股开户佣金优惠怎么才能获得,网上开户安全吗
- Open 2022 efficient office, starting from project management
- Creation of the template of the password management software keepassdx
- Scratch uses runner Py run or debug crawler
- SDMU OJ#P19. Stock trading
- How about opening an account at Hengtai securities? Is it safe?
- Pointer concept & character pointer & pointer array yyds dry inventory
- Deep learning ----- using NN, CNN, RNN neural network to realize MNIST data set processing
- IO flow review
- 2/14 (regular expression, sed streaming editor)
猜你喜欢
Summary of fluent systemchrome
2022.02.13
How to solve the "safe startup function prevents the operating system from starting" prompt when installing windows10 on parallel desktop?
Analysis of refrigeration and air conditioning equipment operation in 2022 and examination question bank of refrigeration and air conditioning equipment operation
Blue Bridge Cup -- guess age
Exclusive download! Alibaba cloud native brings 10 + technical experts to bring "new possibilities of cloud native and cloud future"
Meta metauniverse female safety problems occur frequently, how to solve the relevant problems in the metauniverse?
Hcip day 12 notes
The difference between single power amplifier and dual power amplifier
How to write a good title of 10w+?
随机推荐
Meta metauniverse female safety problems occur frequently, how to solve the relevant problems in the metauniverse?
Fashion cloud interview questions series - JS high-frequency handwritten code questions
SDMU OJ#P19. Stock trading
Blue Bridge Cup -- Mason prime
SQL data update
[MySQL] classification of multi table queries
Qtoolbutton available signal
2022 t elevator repair registration examination and the latest analysis of T elevator repair
D27:mode of sequence (maximum, translation)
How to make icons easily
Fluent learning (5) GridView
How to solve the "safe startup function prevents the operating system from starting" prompt when installing windows10 on parallel desktop?
Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?
33 restrict the input of qlineedit control (verifier)
ADB related commands
[15th issue] Tencent PCG background development internship I, II and III (OC)
Alibaba cloud container service differentiation SLO hybrid technology practice
Xiangong intelligent obtained hundreds of millions of yuan of b-round financing to accelerate the process of building non-standard solutions with standardized products
Go error collection | talk about the difference between the value type and pointer type of the method receiver
[source code] VB6 chat robot