当前位置:网站首页>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
边栏推荐
- D23:multiple of 3 or 5 (multiple of 3 or 5, translation + solution)
- 股票開戶傭金最低的券商有哪些大家推薦一下,手機上開戶安全嗎
- "Learning notes" recursive & recursive
- Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?
- Alibaba cloud container service differentiation SLO hybrid technology practice
- Simple solution of m3u8 file format
- How to solve the "safe startup function prevents the operating system from starting" prompt when installing windows10 on parallel desktop?
- D25:sequence search (sequence search, translation + problem solving)
- Recursion and recursion
- X Opencv feature point detection and matching
猜你喜欢

I wrote a chat software with timeout connect function

2022 a special equipment related management (elevator) examination questions and a special equipment related management (elevator) examination contents

Analysis of refrigeration and air conditioning equipment operation in 2022 and examination question bank of refrigeration and air conditioning equipment operation

Scratch uses runner Py run or debug crawler

Alibaba cloud container service differentiation SLO hybrid technology practice

Format cluster and start cluster

Weekly leetcode - nc9/nc56/nc89/nc126/nc69/nc120

2022 chemical automation control instrument examination content and chemical automation control instrument simulation examination

Hcip 13th day notes

Alibaba cloud container service differentiation SLO hybrid technology practice
随机推荐
Design of logic level conversion in high speed circuit
Day30-t540-2022-02-14-don't answer by yourself
Creation of the template of the password management software keepassdx
How to make recv have a little temper?
Weekly leetcode - nc9/nc56/nc89/nc126/nc69/nc120
In VS_ In 2019, scanf and other functions are used to prompt the error of unsafe functions
[MySQL] classification of multi table queries
Pandaoxi's video
Qtoolbutton available signal
How to prevent malicious crawling of information by one-to-one live broadcast source server
2.14 summary
Esp-idf turns off serial port log output.
Loop compensation - explanation and calculation of first-order, second-order and op amp compensation
NPM script
Gossip about redis source code 78
Gorilla/mux framework (RK boot): add tracing Middleware
Subset enumeration method
Gossip about redis source code 74
Idea integrates Microsoft TFs plug-in
leetcode-43. String multiplication