Download presentation
Presentation is loading. Please wait.
Published byTrine Krog Modified over 6 years ago
1
CQRS & Event Sourcing Distributed Architecture Patterns
Dylan Smith Senior ALM Consultant Microsoft MVP (ALM)
2
Who Am I? Dylan Smith @dylan_smith
Agile Coach Solution Architect ALM Consultant Developer Mentor
3
World Leader in Microsoft Systems Integration
with Fortune 200 Companies Over 1800 Microsoft ALM Engagements Over 650 Microsoft ALM Customers Over 500 Microsoft Development Customers Over 650 Development Projects Over 100 SharePoint Engagements across North America Privately held Company since 1997 with Offices Worldwide
4
Agenda Typical Distributed Architectures What is CQRS?
What is Event Sourcing? CODE !!! Benefits / Challenges
5
Transaction Script Data Storage Application Services Remote Facade
Send DTO Status Returned Request DTO DTO Returned Client
6
Active Record Data Storage Entity Entity Application Services
Remote Facade Send DTO Status Returned Request DTO DTO Returned Client
7
Domain Model Data Storage Repository Application Services
Domain Object Domain Object Application Services Remote Facade Send DTO Status Returned Request DTO DTO Returned Client
8
CQRS Data Storage Data Storage Repository Command Handlers
Domain Object Domain Object Command Handlers Query Handlers Remote Facade Remote Facade Send Command Ack/Nak Response Request DTO DTO Returned Client
9
Sample Read Data Model
10
Event Sourcing Line Items (n) Purchase Order Shipping Information
11
Event Sourcing Order Created Added 2 Shirts Added 4 Hats
Shipping Info Added
12
CQRS + Event Sourcing Event Bus Event Store Data Storage
Event Handlers CQRS + Event Sourcing Repository Domain Object Domain Object Command Handlers Query Handlers Remote Facade Remote Facade Send Command Ack/Nak Response Request DTO DTO Returned Client
13
Event Store Data Schema
15
Command
16
Event
17
Command Handler
18
Domain Object
19
Event Handler
20
Query Handler
21
Data Transfer Object (DTO)
25
Scalability
27
Sample Unit Test
28
Sample Unit Test #2
29
Domain Read Model Events DTOs Commands Client
30
Recommended Reading
31
Code Samples Super Simple CQRS Example Microsoft P&P – CQRS Journey
github.com/gregoryyoung/m-r Microsoft P&P – CQRS Journey Google “CQRS Journey” NCQRS ncqrs.org The CQRS Kitchen thecqrskitchen.codeplex.com Lokad-CQRS code.google.com/p/lokad-cqrs
32
Ask any question Q&A
33
Dylan Smith, Microsoft ALM MVP
ideas. technology. imagine. Thanks for your time! Dylan Smith, Microsoft ALM MVP
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.