Download presentation
Presentation is loading. Please wait.
Published byCarl Heard Modified over 9 years ago
1
Command and Query Responsibility Segregation Cameron Fletcher
2
Agenda What is CQRS? A look at a system that uses CQRS What have we just seen? Why would anybody ever do this?
3
What is CQRS?
4
Command and Query Responsibility Segregation CQRS is simply the creation of two objects where there was previously only one. The separation occurs based upon whether the methods are a command or a query.
6
DenormalizerApplication Fully Consistent Data Store Eventually Consistent Data Store Command ServiceQuery Service Client
7
A Look at a System that uses CQRS
8
What Have We Just Seen?
9
Architecture Domain Application Fully Consistent Write Model Denormalizer Eventually Consistent Read Model Command and Query Services Task Based User Interface
10
Putting Things into Context
11
Why Would I Ever Do This?
12
Advantages Performance and Scalability Separation of Concerns Reduced Complexity of Domain Ability to Parallelize Development Highly Decoupled Increased Testability Easier to Adapt to Change
13
Disadvantages Increased Complexity of Architecture Learning Curve for Developers Fear of Change
14
When Not To Use CQRS (In This Way) Lack of Requirements No Domain to Work With If the Benefit isn’t Worth It When it’s not Useful On a System as a Whole Not Just for Scalability Legacy Systems
15
Summary
16
Questions?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.