当前位置:网站首页>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
边栏推荐
- A preliminary study on the middleware of script Downloader
- [note] IPC traditional interprocess communication and binder interprocess communication principle
- Blue Bridge Cup -- Mason prime
- File copy method
- 2022 a special equipment related management (elevator) examination questions and a special equipment related management (elevator) examination contents
- Sort merge sort
- The difference between single power amplifier and dual power amplifier
- Day30-t540-2022-02-14-don't answer by yourself
- Deep learning ----- using NN, CNN, RNN neural network to realize MNIST data set processing
- D24:divisor and multiple (divisor and multiple, translation + solution)
猜你喜欢

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

Ppt image processing

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

Flutter internationalized Intl

The interviewer's biggest lie to deceive you, bypassing three years of less struggle

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

Common mode interference of EMC

Shiftvit uses the precision of swing transformer to outperform the speed of RESNET, and discusses that the success of Vit does not lie in attention!

Esp-idf turns off serial port log output.

Meta metauniverse female safety problems occur frequently, how to solve the relevant problems in the metauniverse?
随机推荐
A treasure open source software, cross platform terminal artifact tabby
IO flow principle and classification
炒股開戶傭金優惠怎麼才能獲得,網上開戶安全嗎
SDMU OJ#P19. Stock trading
Unsafe and CAS principle
D29:post Office (post office, translation)
Interpretation of corolla sub low configuration, three cylinder power configuration, CVT fuel saving and smooth, safety configuration is in place
Yyds dry goods inventory [practical] simply encapsulate JS cycle with FP idea~
JarPath
Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?
Gossip about redis source code 74
2022 a special equipment related management (elevator) examination questions and a special equipment related management (elevator) examination contents
Make small tip
What are the securities companies with the lowest Commission for stock account opening? Would you recommend it? Is it safe to open an account on your mobile phone
leetcode-43. String multiplication
Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?
Powerful blog summary
[15th issue] Tencent PCG background development internship I, II and III (OC)
Ramble 72 of redis source code
Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?