1 / 36

Distributed Architecture Patterns CQRS & Event Sourcing

Distributed Architecture Patterns CQRS & Event Sourcing. Application Lifecycle Expert. Dylan Smith Senior ALM Consultant.

lovey
Download Presentation

Distributed Architecture Patterns CQRS & Event Sourcing

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. Distributed Architecture Patterns CQRS & Event Sourcing

  2. Application Lifecycle Expert Dylan Smith Senior ALM Consultant PROFILEDylan is an ALM (Application Lifecycle Management) consultant for Imaginet where he spends his time helping teams become more successful at delivering software. Dylan has over a decade experience designing and architecting mission critical applications. In the past 5 years Dylan has focused on agile development techniques and practices. He has led the shift to agile and lean development practices across multiple teams, projects and companies. “CQRS+ES differs from most design patterns in that it provides clear business benefits in addition to the obvious technical benefits.”

  3. Overview • Review Typical Architecture • What is CQRS? • What is Event Sourcing? • CODE !!! • Benefits / Concerns

  4. Data Storage Repository Typical Distributed Architecture Domain Object Domain Object Application Services Remote Facade Send DTO Status Returned Request DTO DTO Returned Client

  5. Data Storage Data Storage CQRS Repository Domain Object Domain Object Command Handlers Query Handlers Remote Facade Remote Facade Send Command Ack/Nak Response Request DTO DTO Returned Client

  6. Sample Read Data Model

  7. Line Items (n) Purchase Order Shipping Information

  8. Order Created Added 2 Shirts Added 4 Hats Shipping Info Added

  9. Event Store Data Storage Event Bus Event Handlers CQRS + ES Repository Domain Object Domain Object Command Handlers Query Handlers Remote Facade Remote Facade Send Command Ack/Nak Response Request DTO DTO Returned Client

  10. Event Store Data Model

  11. Command

  12. Event

  13. Command Handler

  14. Domain Object

  15. Event Handler

  16. Query Handler

  17. Data Transfer Object

  18. vs

  19. Scalability

  20. Sample Unit Test

  21. Sample Unit Test #2

  22. Domain Read Model Events DTOs Commands Client

  23. NoSQL Databases

  24. Other Topics(Time Permitting) • Event Versioning • When to use CQRS/ES? • Using CQRS or ES separately • Concurrency • Eventual Consistency • Asynchronous Commands

  25. Recommended Reading

  26. Sample Code • Super Simple CQRS Example • github.com/gregoryyoung/m-r • NCQRS • ncqrs.org • The CQRS Kitchen • thecqrskitchen.codeplex.com • Lokad-CQRS • code.google.com/p/lokad-cqrs • Fohjin • github.com/MarkNijhof/Fohjin

  27. Questions?

More Related