当前位置:网站首页>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
边栏推荐
- Amway by head has this project management tool to improve productivity in a straight line
- Qtoolbutton available signal
- 2022.02.13
- Recursive least square adjustment
- How to write a good title of 10w+?
- Gossip about redis source code 74
- Learning methods of zynq
- Gorilla/mux framework (RK boot): add tracing Middleware
- Analysis of refrigeration and air conditioning equipment operation in 2022 and examination question bank of refrigeration and air conditioning equipment operation
- 2022 chemical automation control instrument examination content and chemical automation control instrument simulation examination
猜你喜欢

How to quickly build high availability of service discovery

Fluent learning (4) listview
![Yyds dry goods inventory [practical] simply encapsulate JS cycle with FP idea~](/img/af/1975b37d81bbdb9709ff181b9a72f9.jpg)
Yyds dry goods inventory [practical] simply encapsulate JS cycle with FP idea~

Enter MySQL in docker container by command under Linux

Tencent interview: can you find the number of 1 in binary?

A preliminary study on the middleware of script Downloader

Hcip day 14 notes

Design of logic level conversion in high speed circuit

The first game of the new year, many bug awards submitted

Learning notes of raspberry pie 4B - IO communication (SPI)
随机推荐
Pyqt5 sensitive word detection tool production, operator's Gospel
IO flow principle and classification
Gossip about redis source code 77
File copy method
[source code] VB6 chat robot
Learning notes of raspberry pie 4B - IO communication (SPI)
Ppt image processing
Pyqt5 sensitive word detection tool production, operator's Gospel
Summary of fluent systemchrome
股票开户最低佣金炒股开户免费,网上开户安全吗
Sort merge sort
2022 examination of safety production management personnel of hazardous chemical production units and examination skills of safety production management personnel of hazardous chemical production unit
How about opening an account at Hengtai securities? Is it safe?
Runtime. getRuntime(). totalMemory/maxMemory()
Deep learning ----- using NN, CNN, RNN neural network to realize MNIST data set processing
Interpretation of corolla sub low configuration, three cylinder power configuration, CVT fuel saving and smooth, safety configuration is in place
I wrote a chat software with timeout connect function
Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?
Unity shader visualizer shader graph
C3p0 connection MySQL 8.0.11 configuration problem