Whether you're building a new application from scratch or enhancing an existing one with new functionality, being able to scale is very important to the life of your application. While some may say that you should just throw more hardware at the problem, designing your system up front properly will save you a number of headaches down the road. Command Query Responsibility Segregation (CQRS) is a pattern that helps you design your system to scale over time by taking messaging and applying it to commands your application issues and events that it raises. We'll see a very simple message distribution system and see how applying CQRS along with some event-driven concepts can help your application grow and scale over time.
(Presented at the Rockville, MD .NET User Group on 12/11/2013.)
20. “every method should either be a command that performs an
action, or a query that returns data to the caller, but not both. In
other words, asking a question should not change the answer”
(Meyer)
41. Query Side
Command Side
Client
Data Requested/Returned
Repository
Command Issued – ack/nack
Command Service
Domain (ARs)
Event Handler
Read Model Store
Denormalizer
Event Store