知识卡片
CQRS分开读写职责
CQRS把修改状态的命令与读取数据的查询分开,使读写路径能够采用不同接口或模型,并分别优化。电商的下单与浏览负载不同,读模型可由写模型异步更新;若采用这种实现,就必须明确允许的读延迟,不能把过期展示当成最新交易事实。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Distributed Systems Fundamentals · 查看原书依据
Command Query Responsibility Segregation (CQRS) is a design pattern in software architecture that separates the responsibilities of reading and updating data into distinct interfaces. This separation allows for more specialized, efficient, and scalable handling of operations in a system.
参考来源
- 位置:《Building Distributed Systems Designing scalable architectures with microservices, event-driven patterns, and robust deployment…》第01章《Distributed Systems Fundamentals》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Building Distributed Systems Designing scalable architectures with microservices, event-driven patterns, and robust deployment…/_epub-src/OPS/ch01.xhtml)
- 结论依据:原文通过相关定义、应用情境及扩展约束支撑本卡;对自动获得性能或可靠性的说法保留条件,不扩大原文保证。
- 原始内容:Command Query Responsibility Segregation (CQRS) is a design pattern in software architecture that separates the responsibilities of reading and updating data into distinct interfaces. This separation allows for more specialized, efficient, and scalable handling of operations in a system.