V2EX  ›  英汉词典
Enqueued related words: CQS, DDD, Read Model, Write Model

CQRS

定义 Definition

CQRS 是一种软件架构/设计模式,全称 Command Query Responsibility Segregation(命令与查询职责分离):把“写入/修改数据”的操作(Command)与“读取数据”的操作(Query)分开建模与实现,以便分别优化性能、可扩展性与复杂业务规则。(在实践中常与 Event Sourcing 事件溯源 搭配,但并非必须。)

发音 Pronunciation (IPA)

/ˌsiː kjuː ɑːr ˈɛs/

例句 Examples

We used CQRS to separate writes from reads in our service.
我们使用 CQRS 将服务中的写入与读取分离。

In a high-traffic system, CQRS can improve scalability by optimizing the command model and the query model independently.
在高并发系统中,CQRS 可以通过分别优化命令模型与查询模型来提升可扩展性。

词源 Etymology

CQRS 是一个首字母缩略词,来自 Command Query Responsibility Segregation。其思想与更早的概念 CQS(Command–Query Separation,命令-查询分离) 有关联:CQS 强调“命令不返回数据、查询不改变状态”,而 CQRS 更进一步,主张在架构层面将读写职责拆开(甚至使用不同的数据模型与存储)。

相关词 Related Words

文学/作品示例 Literary Works

  • Martin Fowler(博客/术语页)《CQRS》(bliki)
  • Greg Young(论文/讲稿)《CQRS and Event Sourcing》相关资料
  • Microsoft Docs《CQRS pattern》(Azure Architecture Center / patterns & practices)
  • Vaughn Vernon《Implementing Domain-Driven Design》(涉及 CQRS/事件驱动相关实践)
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   1820 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 16ms · UTC 07:49 · PVG 15:49 · LAX 23:49 · JFK 02:49
♥ Do have faith in what you're doing.