Skip to content

3) CQRS

Filipe Augusto Lima de Souza edited this page Oct 28, 2019 · 2 revisions

✂️ CQRS

Segregation between Commands and Queries, with isolated databases and different models

⬇️ Command Stack

Has direct access to business rules and is responsible for only writes in the application.

Below you can find a basic interaction between components in the Command Stack:

⬆️ Query Stack

Responsible to provide data to consumers of your application, containing a simplified and more suitable model for reading, with calculated data, aggregated values and materialized structures.

The fallowing image contains the basic interaction between components in the Query Stack:

✉️ Message Broker

Given the physical isolation of data stores, Command Stack and Query Stack must communicate to synchronize data. This is done here using a Message Broker.

Clone this wiki locally