官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 张北县| 城口县| 寿光市| 阿合奇县| 罗田县| 高台县| 高清| 迁安市| 阜宁县| 阿荣旗| 兴隆县| 洪洞县| 乌拉特中旗| 竹山县| 马公市| 马公市| 宁明县| 安阳市| 讷河市| 敖汉旗| 镇巴县| 古蔺县| 会昌县| 昔阳县| 衡南县| 九台市| 井陉县| 浏阳市| 新绛县| 科尔| 浦东新区| 临猗县| 晋江市| 博罗县| 富源县| 丹东市| 定远县| 双鸭山市| 郓城县| 武隆县| 洱源县|