知识卡片
分布式事务看资源参与者
多个服务不等于多个事务资源:若都协调到同一个数据库,只有一个事务感知参与者,协议开销可较小。多个数据库或消息代理等资源参与时,事务管理器通常要执行分布式提交协调,成本和复杂度增加。客户、物流等未参与资源也无法被自动回滚,应先区分服务边界、资源边界和外部业务边界。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 保持状态一致 · 查看原书依据
If we use a single database for all data, although we use a transaction manager, overhead is limited. The reason is that, behind the curtain, there is only one transaction-aware participant (the database in the transaction). This is a common scenario.
参考来源
- 位置:《Software Architecture and Decision-Making》第07章《保持状态一致》(来源项目:book-sources;源文件:extracted/Software Architecture and Decision-Making Leveraging Leadership, Technology, and Product Management to Build Great Products… (Srinath Perera)/_epub-src/ch07.xhtml)
- 结论依据:所引连续原文给出本卡机制或取舍;条件与示例结合本节已读上下文解释。
- 原始内容:If we use a single database for all data, although we use a transaction manager, overhead is limited. The reason is that, behind the curtain, there is only one transaction-aware participant (the database in the transaction). This is a common scenario.