How CQRS can contribute to more scalable applications

I have read a lot lately about the CQRS architecture. One of the key points indicating why CQRS should be used is scalability.

Now I do not quite understand how this can work.

Say you have your typicalCQRS app design .

  • Two data stores
  • One for the command side.
  • One for the request side
  • When the command has been processed, an event is dispatched that can update the second data store

It has often been pointed out that having a data warehouse for queries and one for processing commands will make your application more scalable. But how can this work if the second data store, which stores the event data, must respond to requests, and it is also constantly necessary to update it based on incoming events?

Why not have one data warehouse where the commands are stored and where the query side can reuse the stored data to get the result data?

+4
source share
2 answers

You might find it interesting to read this old blog post from Greg Young , where he explains what exactly CQRS is.

CQRS , , :

CQRS - , . ,

, .

: How can CQRS contribute to more scalable applications? :

CQRS -, : 25 . , .

!

+9
Two Datastores
One for the Command Side
One for Query Side
When a Command has been processed an Event is send which could update the second Datastore

CQRS ES (event sourcing), !

- , . . , , , - . - , (, ), . ...

: write (command) read (query). , ORM, , , . , - , . , , , . , , neo4j, , neo4j . ...

+2

Source: https://habr.com/ru/post/1543956/


All Articles