8000 求解答关于DTM架构的问题 · Issue #551 · dtm-labs/dtm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

求解答关于DTM架构的问题 #551

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mooneal opened this issue Mar 28, 2025 · 1 comment
Open

求解答关于DTM架构的问题 #551

mooneal opened this issue Mar 28, 2025 · 1 comment

Comments

@mooneal
Copy link
mooneal commented Mar 28, 2025

“AP-应用程序:AP是一个应用服务,负责全局事务的编排,他会注册全局事务,注册子事务,调用RM接口。例如在前面的这个SAGA事务中,发起步骤1的是AP,它编排了一个包含TransOut、TransIn的全局事务,然后提交给TM”

这个架构里是说,如果我要用的话,我必须有一个全局事务的编排服务吗? 以一个典型的分布式事务的例子:
创建订单:需要在订单表中创建订单,唯一键为订单ID
扣减库存:需要给用户下单的商品扣减库存
扣减优惠券:用户在下单前,选择了可使用的优惠券,提交订单时,则扣减这部分优惠券
创建支付单:提交订单后,需要创建支付单,最后告诉用户跳转到支付页

我理解通常来说对外的接口都是订单服务提供的,订单服务能当ap吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@mooneal and others
0