← 返回起始笔记位置

知识卡片

普通读书笔记卡 · 1971.o.1.b.4.d.1.c.4.a.3.a.7.a.2

缓存细分推导要承担数据同步成本

理解等级:中级

若销售系统在远端,原书假设每次分配检查有两次跨机交互:推导 Enterprise Segment 与查询是否接受。前者依赖相对稳定的数据和行为,理论上可缓存并迁到 Allocation Checker 所在服务器;后者仍须问销售系统。这样可能减少一次消息往返,但复制数据要保持更新,设计复杂度上升。原书提出的是性能调优选项,没有测得延迟或证明一定更快。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 原书第07章|Introducing a New Feature: Allocation Checking · 查看原书依据

      But the first message, which derives the Enterprise Segment for a cargo, is based on relatively static data and behavior compared to the allocation decisions themselves. One design option would be to cache this information so that it could be relocated on the server with the Allocation Checker, reducing messaging overhead by half. There is a price for this flexibility. The design is more complicated and the duplicated data must now be kept up to date somehow.

    参考来源

    - 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第59章《原书第07章|Introducing a New Feature: Allocation Checking》(源文件:_epub-src/0321125215_ch07lev1sec11.html) - 结论依据:原文区分不可省的接受决策调用与可缓存的细分推导,随后指出重复数据的维护成本。 - 原始内容:But the first message, which derives the Enterprise Segment for a cargo, is based on relatively static data and behavior compared to the allocation decisions themselves. One design option would be to cache this information so that it could be relocated on the server with the Allocation Checker , reducing messaging overhead by half. There is a price for this flexibility. The design is more complicated and the duplicated data must now be kept up to date somehow.