4 seata-golang 分布式事务框架
微信号: scottlewis 分布式事务框架 Seata-Golang 刘晓敏 H3C ⽬ 录 Demo 演示 01 Seata 原理 02 Mysql driver 原理 03 Mysql driver 接⼊ 04 TODO & QA 05 分布式事务就是指事务的参与者、⽀持事务的服务器、资源服务器以及事务管理器分别位于不同的分布式系 统的不同节点之上。简单的说,就是 整体机制: • ⼀阶段:业务数据和回滚⽇志记录在同⼀个本地事务中提交,释放本地锁和连接资源。 • ⼆阶段: • 提交异步化,⾮常快速地完成。 • 回滚通过⼀阶段的回滚⽇志进⾏反向补偿。 Seata 原理 AggregationSvc TM OrderSvc RM DB ProductSvc RM DB RootSessionManager AsyncCommittingSessionManager 注册中⼼配置中⼼⽀持 PostgreSQL ⽀持 GRPC ⽀持 https://github.com/opentrx/seata-golang https://github.com/opentrx/mysql https://github.com/opentrx/seata-go-samples https://github.com/apache/dubbo-getty https://github0 码力 | 14 页 | 3.23 MB | 1 年前3Apache ShardingSphere v5.5.0 document
. . . . . . . . . . . . . . . . . . . 558 12.5.3 Seata BASE transaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558 Init Seata Engine . . . . . . . . . . . . . . . . . . . . . taking SEATA as the flexible transaction. The fol‐ lowing table can be used for comparison to help developers choose the suitable technology. LOCAL XA BASE Business transf ormation None None Seata Server transaction: defaultType: BASE providerType: Seata Build a Seata Server, add relevant configuration files and Seata dependencies, see ShardingSphere In‐ tegrates Seata Flexible Transactions Encryption Background0 码力 | 602 页 | 3.85 MB | 1 年前3Apache ShardingSphere v5.5.0 中文文档
514 提交或回滚事务 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515 12.5.3 Seata 柔性事务 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515 引擎初始化 . . . . . 它们的最大长处。Apache ShardingSphere 集成了 SEATA 作为柔性事务的使用方案。可通过下表详细对 比它们之间的区别,以帮助开发者进行技术选型。 8.2. 分布式事务 32 Apache ShardingSphere document LOCAL XA BASE 业务改造 无 无 需要 Seata Server 一致性 不支持 支持 最终一致 隔离性 不支持 支持 yaml 配置文件内容如下: transaction: defaultType: BASE providerType: Seata 搭建 Seata Server,添加相关配置文件,和 Seata 依赖,具体步骤参考 ShardingSphere 集成 Seata 柔性事 务 数据加密 背景信息 数据加密 YAML 配置方式具有非凡的可读性,通过 YAML 格式,能够快速地理解加密规则之间的依赖关0 码力 | 557 页 | 4.61 MB | 1 年前3Apache ShardingSphere 5.0.0-alpha Document
. 61 XA Transaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 Seata BASE transaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 3.2.5 Principle . 62 XA Transaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Seata BASE transaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 3.2.6 Use Norms 66 ii XA transaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Seata BASE transaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 3.3 Replica query0 码力 | 311 页 | 2.09 MB | 1 年前3Apache ShardingSphere 5.2.0 Document
. . . . . . . . . . . . . . . . . . . 390 7.5.3 Seata BASE transaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390 Init Seata Engine . . . . . . . . . . . . . . . . . . . . . taking SEATA as the flexible transaction. The fol‐ lowing table can be used for comparison to help developers choose the suitable technology. LOCAL XA BASE Business transf ormation None None Seata server other isolation level except RC. To Be Optimized • SQL parsed twice by Apache ShardingSphere and SEATA. 3.2.9 Appendix with SQL operator Unsupported SQL: • RAL and RDL operations of DistSQL are used0 码力 | 483 页 | 4.27 MB | 1 年前3Apache ShardingSphere 中文文档 5.0.0-alpha
. . . 56 XA 两阶段事务 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Seata 柔性事务 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 3.2.5 实现原理 . . . . . 57 XA 两阶段事务 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Seata 柔性事务 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 3.2.6 使用规范 . . . 60 ii XA 两阶段事务 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 Seata 柔性事务 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 3.3 读写分离 . . .0 码力 | 301 页 | 3.44 MB | 1 年前3Apache ShardingSphere 5.2.1 Document
. . . . . . . . . . . . . . . . . . . 417 7.5.3 Seata BASE transaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417 Init Seata Engine . . . . . . . . . . . . . . . . . . . . . taking SEATA as the flexible transaction. The fol‐ lowing table can be used for comparison to help developers choose the suitable technology. LOCAL XA BASE Business transf ormation None None Seata server TRANSACTION defaultType: BASE providerType: Seata Build a Seata Server, add relevant configuration files and Seata dependencies, see ShardingSphere In‐ tegrates Seata Flexible Transactions HA Background0 码力 | 523 页 | 4.51 MB | 1 年前3Apache ShardingSphere 中文文档 5.2.0
358 提交或回滚事务 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 7.5.3 Seata 柔性事务 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 引擎初始化 . . . . . 它们的最大长处。Apache ShardingSphere 集成了 SEATA 作为柔性事务的使用方案。可通过下表详细对 比它们之间的区别,以帮助开发者进行技术选型。 3.2. 分布式事务 27 Apache ShardingSphere document, v5.2.0 LOCAL XA BASE 业务改造 无 无 需要 seata server 一致性 不支持 支持 最终一致 隔离性 不支持 undo 快照进行事务回滚; • 支持服务宕机后的,自动恢复提交中的事务。 不支持项 • 不支持除 RC 之外的隔离级别。 待优化项 • Apache ShardingSphere 和 SEATA 重复 SQL 解析。 3.2.9 附录 不支持的 SQL: • 事务中使用 DistSQL 里的 RAL、RDL 操作; • XA 事务中使用 DDL 语句。 3.3 读写分离 3.30 码力 | 449 页 | 5.85 MB | 1 年前3Apache ShardingSphere 5.4.1 Document
. . . . . . . . . . . . . . . . . . . 529 12.5.3 Seata BASE transaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529 Init Seata Engine . . . . . . . . . . . . . . . . . . . . . taking SEATA as the flexible transaction. The fol‐ lowing table can be used for comparison to help developers choose the suitable technology. LOCAL XA BASE Business transf ormation None None Seata server transaction: defaultType: BASE providerType: Seata Build a Seata Server, add relevant configuration files and Seata dependencies, see ShardingSphere In‐ tegrates Seata Flexible Transactions Encryption Background0 码力 | 572 页 | 3.73 MB | 1 年前3Apache ShardingSphere 5.0.0 Document
. . . . . . . . . . . . . . . . . . . 265 7.2.3 Seata BASE transaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265 Init Seata Engine . . . . . . . . . . . . . . . . . . . . . data rollback. SEATA implements SQL reverse operation automatically, so that BASE transaction can be used without the intervention of developers. Apache ShardingSphere integrates SEATA as solution of other isolation level except RC. To Be Optimized • SQL parsed twice by Apache ShardingSphere and SEATA. 4.4 Readwrite-splitting 4.4.1 Background Database throughput has faced the bottleneck with increasing0 码力 | 403 页 | 3.15 MB | 1 年前3
共 22 条
- 1
- 2
- 3