知识卡片

普通读书笔记卡 · 5386

读写分离还需事件版本

理解等级:高级

CQRS把写入与查询分别实现,写侧把更新传给读侧构建适合查询的模型。写侧减少读锁与随机查找影响,可侧重追加吞吐;读侧则需要维持投影和处理传播延迟。若恢复依靠重放事件,代码升级改变解释逻辑可能重建出不同状态,需保留事件与代码版本的对应语义。它是复杂度交换,不是所有服务的默认模板。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 服务端架构 · 查看原书依据

      This approach creates a service for read operations and a service for write operations, each backed by its own database. As in Figure 11.7, all writes are directly written and sent to the read service, which constructs a model for use in the read service while responding to any queries.

    参考来源

    - 位置:《Software Architecture and Decision-Making》第11章《Server Architectures》(来源项目:book-sources;源文件:extracted/Software Architecture and Decision-Making Leveraging Leadership, Technology, and Product Management to Build Great Products… (Srinath Perera)/_epub-src/ch11.xhtml) - 结论依据:摘录说明CQRS把写入与查询分别实现,写侧把更新传给读侧构建适合查询的模型。其余条件结合本章相邻例子与取舍说明,数字示例不作当前性能承诺。 - 原始内容:This approach creates a service for read operations and a service for write operations, each backed by its own database. As in Figure 11.7, all writes are directly written and sent to the read service, which constructs a model for use in the read service while responding to any queries.