- Azure for Architects
- Ritesh Modi
- 253字
- 2021-07-08 09:33:38
The Command and Query Responsibility Segregation (CQRS) pattern
CQRS is a generic pattern that has applicability in any scenario that has data stored in a data store and it should be accessed in a way to increase the overall performance and responsiveness of the application.
Data operations can broadly be classified into read and write operations. There are multiple ways to read and write to the data store and there is often a data access layer and component responsible for carrying out these operations. This data access component has information about connecting the data store and performs both read and write operations. Performing both operations from within a single interface can be challenging from performance perspective especially if the data is large and the read-write ration is skewed.
Command and Query Responsibility Segregation (CQRS) is a pattern that helps in implementing read and write operations using different interfaces. It means the components implementing the read operations are separate from write operations and can be individually deployed on a separate instance. This helps in providing dedicated resource capacity to them. This pattern also helps in scenarios where execution time for read and write operations is significantly large and consume more resources
CQRS not only helps in improving the performance of the application, but it also helps in design and implementation between multiple teams. Due to its nature of using separate models. CQRS pattern is not a great fit if using model and scaffolding generation tools.

- Java程序設計與開發
- JSP網絡編程(學習筆記)
- 微信公眾平臺與小程序開發:從零搭建整套系統
- 差分進化算法及其高維多目標優化應用
- TradeStation交易應用實踐:量化方法構建贏家策略(原書第2版)
- 領域驅動設計:軟件核心復雜性應對之道(修訂版)
- 深度學習:Java語言實現
- Visual Basic程序設計教程
- Android應用開發深入學習實錄
- Maker基地嘉年華:玩轉樂動魔盒學Scratch
- HTML5+CSS3+jQuery Mobile APP與移動網站設計從入門到精通
- Arduino可穿戴設備開發
- ActionScript 3.0從入門到精通(視頻實戰版)
- JavaScript從入門到精通(視頻實戰版)
- ASP.NET 4.0 Web程序設計