知识卡片

普通读书笔记卡 · 1973.ah.1.f

按强一致性缩小聚合

理解等级:中级

聚合只容纳业务决策必须读取强一致状态的数据,其余数据放在边界外并按ID引用。例如工单是否自动转派取决于消息是否已读,延迟的已读信息会导致错误转派,所以消息应属于工单聚合;客户和产品可只保存ID。聚合过大会增加竞争与扩展成本,因此在满足不变量前提下尽量小。

相关:[[聚合划定事务边界]]。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 应对复杂业务逻辑 · 查看原书依据

      The consistency of the data can be a convenient guiding principle for designing an aggregate’s boundaries. Only the information that is required by the aggregate’s business logic to be strongly consistent should be a part of the aggregate. All information that can be eventually consistent should reside outside of the aggregate’s boundary; for example, as

    参考来源

    - 位置:《Learning Domain-Driven Design》第6章《应对复杂业务逻辑》(来源项目:book-sources;源文件:extracted/Learning Domain-Driven Design/_epub-src/OEBPS/ch06.html) - 结论依据:原文围绕本卡所述机制给出定义、适用条件及相关取舍,以下摘录为直接依据。 - 原始内容:The consistency of the data can be a convenient guiding principle for designing an aggregate’s boundaries. Only the information that is required by the aggregate’s business logic to be strongly consistent should be a part of the aggregate. All information that can be eventually consistent should reside outside of the aggregate’s boundary; for example, as