32 lines
1.0 KiB
Markdown
Raw Permalink Normal View History

---
layout: pattern
title: CQRS
folder: cqrs
permalink: /patterns/cqrs/
categories: Architectural
language: en
tags:
2020-07-26 11:30:42 +03:00
- Performance
- Cloud distributed
---
## Intent
2017-07-29 12:04:04 +01:00
CQRS Command Query Responsibility Segregation - Separate the query side from the command side.
## Class diagram
![alt text](./etc/cqrs.png "CQRS")
## 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.
## 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)
* [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)