← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 2285.ac

事件投影换取时间解耦

理解等级:高级

消费者订阅库存变化并维护本地库存视图,可在库存服务不可用时回答查询,也降低热点远程访问负载。代价是额外存储与最终一致性:事件尚未处理时,界面可能承诺已经售罄商品的快速交付。这适合可容忍短暂陈旧的查询,不能把本地投影误当实时库存承诺。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 平衡编排与协同 · 查看原书依据

      In the event-driven alternative (shown here on the right) the inventory service publishes any change to the amount of in-stock items as an event. For example, these events may be broadcast to a company-wide event bus. The checkout service can listen to these events and use that information to calculate and store the current amount

    参考来源

    - 位置:《Practical Process Automation》第8章《平衡编排与协同》(来源项目:book-sources;源文件:extracted/Practical Process Automation (Bernd Ruecker)/_epub-src/OEBPS/ch08.xhtml) - 结论依据:原文给出的机制、实例与边界支持本卡的解释。 - 原始内容:In the event-driven alternative (shown here on the right) the inventory service publishes any change to the amount of in-stock items as an event. For example, these events may be broadcast to a company-wide event bus. The checkout service can listen to these events and use that information to calculate and store the current amount