Fescar

2019 年 1 月,阿里巴巴中间件团队发起了开源项目 Fescar(Fast & EaSy Commit And Rollback),和社区一起共建开源分布式事务解决方案。

Fescar 的愿景是让分布式事务的使用像本地事务的使用一样,简单和高效,并逐步解决开发者们遇到的分布式事务方面的所有难题。

Fescar 开源后,蚂蚁金服加入 Fescar 社区参与共建,并在 Fescar 0.4.0 版本中贡献了 TCC 模式。

Seata

为了打造更中立、更开放、生态更加丰富的分布式事务开源社区,经过社区核心成员的投票,大家决定对 Fescar 进行品牌升级,并更名为 Seata。

意为:Simple Extensible Autonomous Transaction Architecture,是一套一站式分布式事务解决方案。

Seata 融合了阿里巴巴和蚂蚁金服在分布式事务技术上的积累,并沉淀了新零售、云计算和新金融等场景下丰富的实践经验,但要实现适用于所有的分布式事务场景的愿景,仍有很长的路要走。

因此,我们决定建立一个完全中立的分布式事务组织,希望更多的企业、开发者能够加入我们,一起打造 Seata。

DTX

Distributed Transaction Problem in Microservices

Let’s imagine a traditional monolithic application.

Its business is built up with 3 modules.

They use a single local data source.

Naturally, data consistency will be guaranteed by the local transaction.

Things have changed in microservices architecture. The 3 modules mentioned above are designed to be 3 services on top of 3 different data sources (Pattern: Database per service). Data consistency within every single service is naturally guaranteed by the local transaction.

But how about the whole business logic scope?

How Seata do?

Seata is just a solution to the problem mentioned above.

Firstly, how to define a Distributed Transaction?

We say, a Distributed Transaction is a Global Transaction which is made up with a batch of Branch Transaction, and normally Branch Transaction is just Local Transaction.

basic components

There are 3 basic components in Seata 大专栏  Seata-一站式分布式事务解决方案:

Transaction Coordinator(TC): Maintain status of global and branch transactions, drive the global commit or rollback.

Transaction Manager(TM): Define the scope of global transaction: begin a global transaction, commit or rollback a global transaction.

Resource Manager(RM): Manage resources that branch transactions working on, talk to TC for registering branch transactions and reporting status of branch transactions, and drive the branch transaction commit or rollback.

执行过程

A typical lifecycle of Seata managed distributed transaction:

  1. TM asks TC to begin a new global transaction. TC generates an XID representing the global transaction.

  2. XID is propagated through microservices’ invoke chain.

  3. RM register local transaction as a branch of the corresponding global transaction of XID to TC.

  4. TM asks TC for committing or rollbacking the corresponding global transaction of XID.

  5. TC drives all branch transactions under the corresponding global transaction of XID to finish branch committing or rollbacking.

拓展阅读

hmily

参考资料

seata

Seata-一站式分布式事务解决方案的更多相关文章

  1. [转帖]深度剖析一站式分布式事务方案 Seata-Server

    深度剖析一站式分布式事务方案 Seata-Server https://www.jianshu.com/p/940e2cfab67e 金融级分布式架构关注 22019.04.10 16:59:14字数 ...

  2. SpringCloudAlibaba分布式事务解决方案Seata实战与源码分析-上

    概述 定义 Spring Cloud Alibaba Seata 官网地址 https://seata.io/zh-cn/ 最新版本1.5.2 Spring Cloud Alibaba Seata 文 ...

  3. 分布式事务解决方案,中间件 Seata 的设计原理详解

    作者:张乘辉 前言 在微服务架构体系下,我们可以按照业务模块分层设计,单独部署,减轻了服务部署压力,也解耦了业务的耦合,避免了应用逐渐变成一个庞然怪物,从而可以轻松扩展,在某些服务出现故障时也不会影响 ...

  4. 分布式事务解决方案Seata

    Seata全称是Simple Extensible Autonomous Transaction Architecture,是由阿里巴巴开源的具有高性能和易用性的分布式事务解决方案. 微服务中的分布式 ...

  5. SpringCloudAlibaba分布式事务解决方案Seata实战与源码分析-中

    事务模式 概述 在当前的技术发展阶段,不存一个分布式事务处理机制可以完美满足所有场景的需求.一致性.可靠性.易用性.性能等诸多方面的系统设计约束,需要用不同的事务处理机制去满足. 目前使用的流行度情况 ...

  6. 微服务痛点-基于Dubbo + Seata的分布式事务(AT)模式

    前言 Seata 是一款开源的分布式事务解决方案,致力于提供高性能和简单易用的分布式事务服务.Seata 将为用户提供了 AT.TCC.SAGA 和 XA 事务模式,为用户打造一站式的分布式解决方案. ...

  7. 微服务痛点-基于Dubbo + Seata的分布式事务(TCC模式)

    前言 Seata 是一款开源的分布式事务解决方案,致力于提供高性能和简单易用的分布式事务服务.Seata 将为用户提供了 AT.TCC.SAGA 和 XA 事务模式,为用户打造一站式的分布式解决方案. ...

  8. Spring Cloud Alibaba 使用Seata解决分布式事务

    为什么会产生分布式事务? 随着业务的快速发展,网站系统往往由单体架构逐渐演变为分布式.微服务架构,而对于数据库则由单机数据库架构向分布式数据库架构转变.此时,我们会将一个大的应用系统拆分为多个可以独立 ...

  9. 阿里微服务架构下分布式事务解决方案-GTS

    虽然微服务现在如火如荼,但对其实践其实仍处于初级阶段.即使互联网巨头的实践也大多是试验层面,鲜有核心业务系统微服务化的案例.GTS是目前业界第一款,也是唯一的一款通用的解决微服务分布式事务问题的中间件 ...

随机推荐

  1. "finally block does not complete normally"警告解决

    转载地址:http://www.cnblogs.com/interdrp/p/4095846.html java里面不是可以保证finally一定会执行的么,为什么不可以在finally块做retur ...

  2. Codeforces 1295E Permutation Separation

    题目链接 link Solution 暴力一眼就可以看出来,枚举分界点,然后左右两边统计答案即可,但复杂度是我们无法接受的 然后我们看我们可以优化哪一部分 \(1^0\) 枚举:这部分没有办法优化 \ ...

  3. shell_常规小脚本

    shell 1.检查Mysql的健康状态 #!/bin/bashpgrep -x mysqld &> /dev/nullif [ $? -ne 0 ]thenecho “At time: ...

  4. (一)Thread的run() 和 start() 方法

    Java多线程在实际开发中会遇到很多问题,对于这种争抢CPU时间片段的选手,我们或许有很多困惑,捉摸不透.即便如此,它也是可以被我们控制的. 最近在看Java多线程的书籍,里面有好多我曾经不怎么注意的 ...

  5. 在Myeclipse10中配置tomcat后新建工程

    1.配置tomcat6.0 这里不在细说,和eclipse配置是一模一样的. 2.新建动态网站项目 3.配置显示服务器窗口 4.把项目与服务器链接 5.运行项目

  6. 三十三、www服务apache软件

    1.前面提到:www服务是一种网页服务,但是网页服务也是需要软件来支撑的,通过软件的形式展示需要的网页,返回给浏览器. www服务软件排名:http://w3techs.com/technologie ...

  7. docker容器中安装中文字体

    在项目中用到pdf导出功能,需要安装中文字体,项目使用docker部署,为了方便决定在将字体安装在镜像中. 1.在dockerfile文件中添加字体copy语句(本次用是的宋体,字体源文件放在dock ...

  8. PAT甲级——1019 General Palindromic Number

    A number that will be the same when it is written forwards or backwards is known as a Palindromic Nu ...

  9. Linux中vim的基本操作

    Vim三种模式之间的相互转换: 1.拷贝当前行 yy,拷贝当前行的向下五行 5yy,粘贴使用p: 2.删除当前行 dd,删除当前行的向下五行 5dd: 3.在文件中查找某个单词[命令行模式下  /关键 ...

  10. 学习C++之前要先学习C语言吗?

    C++ 读作“C加加”,是“C Plus Plus”的简称.顾名思义,C++ 是在C语言的基础上增加新特性,玩出了新花样,所以叫“C Plus Plus”,就像 iPhone 7S 和 iPhone ...