fox
Uploaded by
17 SLIDES
313 VIEWS
170LIKES

Understanding Command and Query Responsibility Segregation (CQRS) Explained

DESCRIPTION

This article delves into Command and Query Responsibility Segregation (CQRS), a design pattern that separates data handling into command and query objects, enhancing system architecture. It explores the operational benefits, including improved performance, scalability, and reduced complexity, while also highlighting challenges like increased architectural complexity and developer learning curves. Readers will see practical examples of CQRS in action, understand the contexts in which it thrives, and be able to weigh advantages and disadvantages to decide on its implementation for their systems.

1 / 17

Download Presentation

Understanding Command and Query Responsibility Segregation (CQRS) Explained

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript

Playing audio...

  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.

  5. Denormalizer Application Fully Consistent Data Store Eventually Consistent Data Store Command Service Query Service Client

  6. A Look at a Systemthat uses CQRS

  7. What Have We Just Seen?

  8. Architecture • Domain • Application • Fully Consistent Write Model • Denormalizer • Eventually Consistent Read Model • Command and Query Services • Task Based User Interface

  9. Putting Things into Context

  10. Why Would I Ever Do This?

  11. Advantages • Performance and Scalability • Separation of Concerns • Reduced Complexity of Domain • Ability to Parallelize Development • Highly Decoupled • Increased Testability • Easier to Adapt to Change

  12. Disadvantages • Increased Complexity of Architecture • Learning Curve for Developers • Fear of Change

  13. 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

  14. Summary

  15. Questions?

More Related