CQRS Starting Page
This page lists learning materials, documents, videos, tips and reference implementations about getting started with Command and Query Responsibility Segregation.
If you came to this page in search of:
- Lokad.CQRS .NET Open Source Framework and Architecture Guidance for Windows Azure - see Google Project.
- Article series on CQRS theory, lifehacks from the CQRS production and tips on building scalable systems efficiently - see xLim 4: CQRS in Cloud.
Brief Overview
CQRS as a concept is a way of designing enterprise solutions that are:
- Almost-infinitely scalable
- Focused on the business rather than the technology
- Can grow to handle complex problems without growing development costs
- Adapt to changing business requirements
- Efficiently integrate with other software and systems
- Benefit from the cloud computing resources
- Inherently handle multiple users
Command-Query Responsibility Segregation is not a silver bullet, but rather an approach that has proven itself to be efficient in solving some of the frustrating problems of delivering enterprise software:
- Performance bottlenecks and scalability
- Concurrency conflicts, their resolution and prevention
- Data staleness
- Complexity of the design, development and maintenance
CQRS attempts to deal with these problems by reevaluating constraints and assumptions that we’ve been considering to be true and valid for the last X0 years. This allows to rethink core principles and the architecture.
In an oversimplified manner, CQRS separates commands (that change the data) from the queries (that read the data). This simple decision brings along a few changes to the classical architecture with service layers along with some positive side effects and opportunities.

If we go deeper, Command-query Responsibility Separation is about development principles, patterns and the guidance to build solution architecture on top of them.
Check out CQRS Roadmap for even bigger (and better) view on this architectural approach, it's benefits and relations with the other important terms from the industry (DDD, Cloud Computing, etc).
Below you will find all primary CQRS references I can recommend. It is a part of a larger xLim 4 Body of knowledge (which focuses on CQRS from a viewpoint of practical and efficient development in the .NET world with cloud computing resources available).
You can subscribe to the RSS feed to get all the latest updates.
How To Get Started With CQRS
For a quick and practical introduction into the concepts of Command-Query Segregation Architecture you might want to proceed in the following order:
- Start with the materials outlined within the "References - Introduction" section below.
- Explore Lokad.CQRS project for Windows Azure (it has samples, tutorials and these references)
- Familiarize yourself with "References - Core Materials"
- Check out additional projects in the "Reference Implementations" and "Related Stacks"
- Read the recommended books
- Try applying CQRS in practice
- Subscribe to the feeds and join groups from the "Staying Updated" section. Participate and share.
Good luck!
References
Introduction
- CQRS Architecture and Definitions
- Download the latest version of PDF book from Lokad.CQRS project (it covers a lot of basics)
- CQRS Documents and video course from Greg's CQRS Info site.
- CQRS introductory video.
- Clarified CQRS paper by Udi Dahan.
- DevTeach Video
- DDDD, CQRS and Other Enterprise Development Buzz-words
- Lokad.CQRS Project (Google Code)
Addional Core Materials
-
- DDDD, CQRS and Other Enterprise Development Buzz-words
- CQRS - Validation and Business Rules
- CouchDB - Document Persistence Powered by CQRS
- Salescast - Lokad solution for Windows Azure with CQRS architecture
- Lokad.CQRS - Command-Query Responsibility Segregation for Windows Azure
- Much more: CQRS in Cloud (xLim 4 Series)
Mark Nijhof who wrote a book about CQRS example. You can also find contents of that book as blog posts on his web site.
Scalability and Reliability
If you are interested in problems of really large CQRS applications, check out the section on papers by: Pat Helland. There also is:
Architecture and scalability lessons learned by Amazon while growing from a small book-selling company to what it is now.
Reference Implementations
- .NET: Lokad.CQRS for Windows Azure
- .NET: CQRS with Event Sourcing in 500 lines by Greg Young
- .NET: Fohjin with CQRS and Event Sourcing by Mark Nijhof
- .NET: NCQRS Framework and MyShop Sample
- .NET: Agr.CQRS
- .NET: EventSourcing for db4o and SQL
- Java: Axon Framework
- Java: JdonFramework
Related Stack
Related Books
- Domain-Driven Design by Eric Evans
- Streamlined Object Modeling: Patterns, Rules, and Implementation
- Object Oriented Software Construction by Bertrand Meyer
- Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions
- Pattern-Oriented Software Architecture Volume 4: A Pattern Language for Distributed Computing (v. 4)
- Domain Driven Design Quickly
Staying Updated
You can:
- Subscribe to the Journal on Efficient Development
- Join Lokad.CQRS community
- Join DDD/CQRS Google Group and check out Yahoo Group on Domain Driven Design
- Check out CQRS Tweets and Follow on Twitter
