CQRS Explained in 5 MINUTES | What is CQRS?

preview_player
Показать описание
CQRS stands for Command and Query Responsibility Segregation. The term was introduced by Greg Young in 2010 to describe a pattern that advocates for clear code separation between the state mutation and data retrieval. If we imagine a traditional layered architecture, CQRS slices our core application logic vertically, creating two models: one used for reads and the other used for writes.

When compared to CRUD, Read operations map to Queries, while Create, Update and Delete operations are replaced by Commands.

In its strict definition: a command is not data centric. It is not about creating, updating or deleting a single record on our database. A Command represents the intention to perform a task. It maps more closely to a complex business operation like generating an invoice, booking a hotel room, or provisioning a bare metal server.

CQRS can also help satisfy high performance and scalability requirements, especially when combined with a microservices architecture and asynchronous processing.

📅 *Let's have a 1:1 Call to discuss anything you wish* 📅

🤓 There's more on my website! (articles, scripts, code snippets, etc...): 🤓

🤝 Connect with me: 🤝

👌Get a CodeCrafter Discount 👌

#systemdesign #softwarearchitecture #softwaredevelopment
Рекомендации по теме
Комментарии
Автор

Have you ever used CQRS or Event Sourcing in a professional setup?

MarcoLenzo
Автор

One challenge I recall from working with CQRS is the eventually consistent nature of the materialized views. It felt that in order to refactor an existing system, the front-end implementation would suffer unless portions of the API and frontend get modified to leverage things like Websockets. In more API-centric products, I wonder whether an impediment towards the adoption of CQRS would be the need to introduce potentially breaking changes in existing APIs. Would love to hear what others think about this topic.

Once again well done on the content, keep it up!

ClaytonTaboneMT
Автор

Thank you for this great explanation... especially the example...

muh
Автор

Thank you for clarifying CQRS. I subbed to learn more from you.
PS: Could you please reduce the volume of music.

tassisto
Автор

How about a video explainer of Event Sourcing?

alan-
Автор

Please can you do video on SAGA( ditribution transaction) and its implementation using orchestration and chroeography

ollySun
Автор

Very unprecise and rough explanation, it should be explained in much more detail what is cqrs, in this way this is very confusing. This is my feedback for your future videos.

jovangrgur
Автор

like, but need to work on pronunciation

OleksandrAndrushchenko