0

From what I have understood that transaction is made up of queries which follow ACID properties. SAGA is already there which is suitable for both maintaining data consistency when transaction happens and also for querying.

So is the CQRS really used for maintaining write and read queries independent and to make those transactions fast?

saaho
  • 1
  • 2
  • 2
    I find very hard to understand what you are asking. I suggest rephrasing and extending your question so it is easier to give a clear answer. Also, note that CQRS and sagas are orthogonal patterns. I don't think there are scenarios where the use of one can affect the applicability of the other. – Francesc Castells Oct 17 '22 at 20:09

1 Answers1

0

CQRS is all about separating the reads and writes, allowing each side to be implemented separately. Depending on how you implement it, you should see that the code gets cleaner, performance improves, and hopefully also a better design overall.

Optionally you can also involve event sourcing, but that is optional.

SAGAS is a separate component independent of CQRS, but it is typically part of the write side, reacting to events and issuing commands against the various aggregates. Also, it typically contains its own state.

Tore Nestenius
  • 16,431
  • 5
  • 30
  • 40