Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Intro into CQRS and Event Sourcing

Intro into CQRS and Event Sourcing

Avatar for Alex Peta

Alex Peta

June 09, 2015
Tweet

Other Decks in Programming

Transcript

  1. Issues ◦ Making changes becomes harder and harder. ◦ Transactions

    become harder. ◦ A lot of "technical" work that the business has to pay for ◦ Testing can become an "engineering discipline" ◦ All or nothing ◦ Bigger size , more complexity ◦ Increase knowledge requirements ◦ Difficult to scale, difficult to version
  2. 2. Intro into CQRS There is debate to what it

    actually is: ◦ Is it a pattern? ◦ Is it an approach? ◦ Is it a framework? ◦ Is it a architecture?
  3. CQRS = separate models and reads and writes Command Query

    Responsibility Segregation An architectural pattern : ◦ separate commands that change state ◦ from queries that read state
  4. When To Use CQRS Collaborative domains where multiple operations are

    performed in parallel on the same data. Scenarios where performance of data reads must be fine-tuned separately from performance of data writes, especially the read/write ratio is very high. Scenarios where the system is expected to evolve over time and may contain multiple versions of the model, or where business rules change regularly.
  5. When not to use CQRS Where the domain or the

    business rules are simple. Where a simple CRUD-style user interface and the related data access operations are sufficient. For implementation across the whole system
  6. References Microsoft Patterns & Practices : https://msdn.microsoft.com/en-us/library/dn568103.aspx Channel 9 :

    https://channel9.msdn.com/Search?term=CQRS#ch9Search http://channel9.msdn.com/Events/aspConf/aspConf/CQRS-with-ASP-NET-MVC-A-Year-On