知识卡片

普通读书笔记卡 · 4364.c

CQRS让读写模型分别适配需求

理解等级:中级

当读写流量、安全或性能要求明显不同,CQRS将写入与读取分到不同数据存储或模型:写端处理变更,再把数据同步给读端。这样可分别优化读写特征,但若同步为异步,读端可能暂时落后写端。原书展示的是可选的通信与数据模式,并未说所有读写都应拆开;采用前要明确读后立即可见的业务要求。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Architectural Patterns · 查看原书依据

      CQRS isolates writes into one datastore (usually a database; sometimes another infrastructure, such as a durable message queue), which synchronizes the data to another database (usually asynchronously), which services read requests.

    参考来源

    - 位置:《Fundamentals of Software Architecture》原书第20章《Architectural Patterns》(阅读计划第23项,单元06;源文件:`OEBPS/ch20.html`) - 结论依据:原书图20-3说明CQRS分离写端与读端、通常异步同步并可用不同数据模型;暂时落后与读后可见性是异步机制的推断。 - 原始内容:CQRS isolates writes into one datastore (usually a database; sometimes another infrastructure, such as a durable message queue), which synchronizes the data to another database (usually asynchronously), which services read requests.