当前位置:网站首页>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
边栏推荐
- After the Lunar New Year and a half
- D26: the nearest number (translation + solution)
- Blue Bridge Cup -- guess age
- Hcip day 12 notes
- "Learning notes" recursive & recursive
- Tencent interview: can you pour water?
- JarPath
- Get current JVM data
- Enter MySQL in docker container by command under Linux
- How to make recv have a little temper?
猜你喜欢

2022 Guangdong Provincial Safety Officer a certificate third batch (main person in charge) simulated examination and Guangdong Provincial Safety Officer a certificate third batch (main person in charg

The difference between single power amplifier and dual power amplifier

How to quickly build high availability of service discovery

Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?

C deep anatomy - the concept of keywords and variables # dry inventory #

Analysis of refrigeration and air conditioning equipment operation in 2022 and examination question bank of refrigeration and air conditioning equipment operation
![[MySQL] classification of multi table queries](/img/96/2e51ae8d52ea8184945e0540ce18f5.jpg)
[MySQL] classification of multi table queries

Cgb2201 preparatory class evening self-study and lecture content

Enter MySQL in docker container by command under Linux

Hcip day 12 notes
随机推荐
JDBC Technology
Shell script three swordsman awk
Hcip day 16 notes
Get current JVM data
The interviewer's biggest lie to deceive you, bypassing three years of less struggle
Hcip day 12 notes
Op amp related - link
Open 2022 efficient office, starting from project management
How to quickly build high availability of service discovery
Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?
Mongoose the table associated with the primary key, and automatically bring out the data of another table
Gossip about redis source code 82
Gossip about redis source code 81
2.14 summary
Flutter internationalized Intl
Summary of fluent systemchrome
How to prevent malicious crawling of information by one-to-one live broadcast source server
The difference between single power amplifier and dual power amplifier
ADB command to get XML
How to make recv have a little temper?