1 / 17

Command and Query Responsibility Segregation

Command and Query Responsibility Segregation. Cameron Fletcher. Agenda. What is CQRS? A look at a system that uses CQRS What have we just seen? Why would anybody ever do this?. What is CQRS?. Command and Query Responsibility Segregation.

fox
Télécharger la présentation

Command and Query Responsibility Segregation

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


  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