2017-06-30 21:41:01 +00:00
|
|
|
---
|
|
|
|
layout: pattern
|
|
|
|
title: CQRS
|
|
|
|
folder: cqrs
|
|
|
|
permalink: /patterns/cqrs/
|
|
|
|
categories: Architectural
|
2021-05-19 10:49:05 -06:00
|
|
|
language: en
|
2017-06-30 21:41:01 +00:00
|
|
|
tags:
|
2020-07-26 11:30:42 +03:00
|
|
|
- Performance
|
|
|
|
- Cloud distributed
|
2017-06-30 21:41:01 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
## Intent
|
2017-07-29 12:04:04 +01:00
|
|
|
CQRS Command Query Responsibility Segregation - Separate the query side from the command side.
|
2017-06-30 21:41:01 +00:00
|
|
|
|
2019-12-07 20:01:13 +02:00
|
|
|
## Class diagram
|
2017-06-30 21:41:01 +00:00
|
|
|

|
|
|
|
|
|
|
|
## Applicability
|
|
|
|
Use the CQRS pattern when
|
|
|
|
|
2020-07-26 11:30:42 +03:00
|
|
|
* You want to scale the queries and commands independently.
|
|
|
|
* You want to use different data models for queries and commands. Useful when dealing with complex domains.
|
|
|
|
* You want to use architectures like event sourcing or task based UI.
|
2017-06-30 21:41:01 +00:00
|
|
|
|
|
|
|
## Credits
|
|
|
|
|
2017-07-29 12:04:04 +01:00
|
|
|
* [Greg Young - CQRS, Task Based UIs, Event Sourcing agh!](http://codebetter.com/gregyoung/2010/02/16/cqrs-task-based-uis-event-sourcing-agh/)
|
|
|
|
* [Martin Fowler - CQRS](https://martinfowler.com/bliki/CQRS.html)
|
2017-06-30 21:41:01 +00:00
|
|
|
* [Oliver Wolf - CQRS for Great Good](https://www.youtube.com/watch?v=Ge53swja9Dw)
|
2020-07-26 11:30:42 +03:00
|
|
|
* [Command and Query Responsibility Segregation (CQRS) pattern](https://docs.microsoft.com/en-us/azure/architecture/patterns/cqrs)
|