当前位置:网站首页>Alipay DTS architecture
Alipay DTS architecture
2022-07-23 11:06:00 【Road of Kings 001】
lately , Busy doing a task , It's strange to find the business behind the scenes , Payment and cancellation are not in the same transaction .
According to my theory , Payment and write off are database businesses , Obviously, it should be in a transaction , To ensure the consistency of data .
After communicating with the person in charge of the backstage , Tell me that payment and cancellation are really two processes . As a software manufacturer , I can only be responsible for the consistency of my own affairs , However, the consistency of software services provided by other manufacturers cannot be guaranteed .
This statement , It seems to convince me , But it doesn't seem to be the best solution .
Theoretically , The above transactions belong to distributed transactions . Distributed transactions , Generally, it adopts two stages (2PC); That is, the first paragraph is submitted , Then submit the second paragraph . But this way , It will cause all stages to be in the blocking stage , Cause the whole computer to go wrong .
Later, it was found that Alipay has a distributed transaction mechanism , Worth learning .
Distributed transaction service (Distributed Transaction Service, abbreviation DTS) Is a distributed transaction framework , To ensure the final consistency of transactions in a large-scale distributed environment .DTS From the perspective of Architecture xts-client and xts-server Two parts , The former is an embedded client application Jar package , Mainly responsible for writing and processing transaction data ; The latter is an independent system , Mainly responsible for the recovery of abnormal transactions .
in other words ,DTS Is characterized by :
1) Final agreement : In the course of a transaction , There will be brief inconsistencies , But by restoring the system , Reach final agreement .
2) Simple protocol : It defines something like 2PC Standard two-phase interface for , You can use DTS Transactional function .
3) And RPC It's not about the service agreement : hold DB Operation is defined as service, Nothing to do with the underlying protocol .
4) Independent of the underlying transaction implementation : DTS It's an abstraction based on Service The concept of layers , Independent of the underlying transaction implementation , That is to say DTS Within the scope of , Either a relational database MySQL,Oracle, still KV Storage MemCache, Or column storage database HBase, As long as its operation is packaged as DTS Participants , You can access DTS Within the scope of business .
Exactly ,DTS It's a flexible business , That is to pursue the final consistency .
of DTS Documents , Please look at this information :https://github.com/nyankosama/slidesShare/blob/master/%E5%A4%A7%E8%A7%84%E6%A8%A1SOA%E7%B3%BB%E7%BB%9F%E4%B8%AD%E7%9A%84%E5%88%86%E5%B8%83%E4%BA%8B%E5%8A%A1%E5%A4%84%E4%BA%8B_%E7%A8%8B%E7%AB%8B.pdf
边栏推荐
猜你喜欢
随机推荐
超链接去掉下划线代码
Redis source code and design analysis -- 12. Collection objects
Data Lake: introduction to delta Lake
Concepts et différences de bits, bits, octets et mots
Deploy storageclass trample record
adb常用命令
十年架构五年生活-02第一份工作
使用pytorch实现基于VGG 19预训练模型的鲜花识别分类器,准确度达到97%
EntityManagerFactory和EntityManager的一个用法探究
Error in na.fail. default(list(Purchase = c(“CH“, “CH“, “CH“, “MM“, “CH“, : missing values in obj
9、光线追踪
“我最想要的六种编程语言!”
8. Surface geometry
Heidelberg CP2000 circuit board maintenance printer host controller operation and maintenance precautions
vim常用命令总结
Why does MySQL index use b+ tree?
C#的partial用法
Meyer burger Siemens industrial computer maintenance and machine tool maintenance
MySql语句查询某一级节点的所有子节点
Meyer Burger梅耶博格西门子工控机维修及机床养护








