SlideShare a Scribd company logo
CQRS AND EVENT
SOURCING
ON WINDOWS AZURE
Duncan Jones
💬 @Merrion
AGENDA
What Why How
NOTES
DEFINITION OF EVENT SOURCING
DESIGNING THE BUSINESS MODEL
Event
storming
Domain
Driven
Design
UX Driven
Design
DEMO #1 – CQRS DESIGNER
Aggregates
•Top level “things”
Events
•What can happen to them
Projections
•What we can derive about an aggregate
Queries
•What we can derive about many aggregates
Commands
•How we cause changes to occur
ANATOMY OF A STORED EVENT
DEMO #2 – AZURE BASED EVENT STREAM
Create
Append
Run
Projection
HOSTING THE CQRS/ES MODEL ON AZURE
NEXT STEPS
Experiment
https://geteventstore.com/

More Related Content

More from Duncan Jones

Event Sourcing on Azure Functions
Event Sourcing on Azure Functions   Event Sourcing on Azure Functions
Event Sourcing on Azure Functions
Duncan Jones
 
Hitchhiker systems deepdive
Hitchhiker systems deepdiveHitchhiker systems deepdive
Hitchhiker systems deepdive
Duncan Jones
 
Hitchhiker systems
Hitchhiker systemsHitchhiker systems
Hitchhiker systems
Duncan Jones
 
Event sourcing on azure functions code example
Event sourcing on azure functions code exampleEvent sourcing on azure functions code example
Event sourcing on azure functions code example
Duncan Jones
 
Hitchhiker systems
Hitchhiker systemsHitchhiker systems
Hitchhiker systems
Duncan Jones
 
Boxcar computing
Boxcar computingBoxcar computing
Boxcar computing
Duncan Jones
 
Boxcar computing
Boxcar computingBoxcar computing
Boxcar computing
Duncan Jones
 
Introduction to DDD
Introduction to DDDIntroduction to DDD
Introduction to DDD
Duncan Jones
 
Introduction to Domain Driven Design
Introduction to Domain Driven DesignIntroduction to Domain Driven Design
Introduction to Domain Driven Design
Duncan Jones
 
Serverless cqrs using azure event grid
Serverless cqrs using azure event gridServerless cqrs using azure event grid
Serverless cqrs using azure event grid
Duncan Jones
 
Event sourcing continued
Event sourcing continuedEvent sourcing continued
Event sourcing continued
Duncan Jones
 
Event sourcing - from wtf to why to wow
Event sourcing - from wtf to why to wowEvent sourcing - from wtf to why to wow
Event sourcing - from wtf to why to wow
Duncan Jones
 
3 myths of it
3 myths of it3 myths of it
3 myths of it
Duncan Jones
 
Event sourcing from wtf to why to wow
Event sourcing   from wtf to why to wowEvent sourcing   from wtf to why to wow
Event sourcing from wtf to why to wow
Duncan Jones
 
event sourcing - from wtf to why to wow
event sourcing - from wtf to why to wowevent sourcing - from wtf to why to wow
event sourcing - from wtf to why to wowDuncan Jones
 
CQRS on Azure
CQRS on AzureCQRS on Azure
CQRS on Azure
Duncan Jones
 
Printing-a-NET-developers-guide-Part1
Printing-a-NET-developers-guide-Part1Printing-a-NET-developers-guide-Part1
Printing-a-NET-developers-guide-Part1Duncan Jones
 
Cqrs and the cloud
Cqrs and the cloudCqrs and the cloud
Cqrs and the cloud
Duncan Jones
 

More from Duncan Jones (18)

Event Sourcing on Azure Functions
Event Sourcing on Azure Functions   Event Sourcing on Azure Functions
Event Sourcing on Azure Functions
 
Hitchhiker systems deepdive
Hitchhiker systems deepdiveHitchhiker systems deepdive
Hitchhiker systems deepdive
 
Hitchhiker systems
Hitchhiker systemsHitchhiker systems
Hitchhiker systems
 
Event sourcing on azure functions code example
Event sourcing on azure functions code exampleEvent sourcing on azure functions code example
Event sourcing on azure functions code example
 
Hitchhiker systems
Hitchhiker systemsHitchhiker systems
Hitchhiker systems
 
Boxcar computing
Boxcar computingBoxcar computing
Boxcar computing
 
Boxcar computing
Boxcar computingBoxcar computing
Boxcar computing
 
Introduction to DDD
Introduction to DDDIntroduction to DDD
Introduction to DDD
 
Introduction to Domain Driven Design
Introduction to Domain Driven DesignIntroduction to Domain Driven Design
Introduction to Domain Driven Design
 
Serverless cqrs using azure event grid
Serverless cqrs using azure event gridServerless cqrs using azure event grid
Serverless cqrs using azure event grid
 
Event sourcing continued
Event sourcing continuedEvent sourcing continued
Event sourcing continued
 
Event sourcing - from wtf to why to wow
Event sourcing - from wtf to why to wowEvent sourcing - from wtf to why to wow
Event sourcing - from wtf to why to wow
 
3 myths of it
3 myths of it3 myths of it
3 myths of it
 
Event sourcing from wtf to why to wow
Event sourcing   from wtf to why to wowEvent sourcing   from wtf to why to wow
Event sourcing from wtf to why to wow
 
event sourcing - from wtf to why to wow
event sourcing - from wtf to why to wowevent sourcing - from wtf to why to wow
event sourcing - from wtf to why to wow
 
CQRS on Azure
CQRS on AzureCQRS on Azure
CQRS on Azure
 
Printing-a-NET-developers-guide-Part1
Printing-a-NET-developers-guide-Part1Printing-a-NET-developers-guide-Part1
Printing-a-NET-developers-guide-Part1
 
Cqrs and the cloud
Cqrs and the cloudCqrs and the cloud
Cqrs and the cloud
 

cqrs and event sourcing on Windows Azure

Editor's Notes

  1. From WTF to WHY to WOW describes my own journey with event sourcing Due to limitations in CRUD architecture when dealing with read-write deadlocks when very large price updates occured
  2. The agenda is that I will do a quick “props based, no computer” show and tell to describe what event sourcing is, then discuss how it compares to a traditional database (RDBMS) then finish with some advice on how to get up to speed and start using event sourcing yourselves.
  3. There won’t be any specific programming language used This discussion is aimed at the beginner (level 101) but there may be intermediate level discussion on the actual implementation technology
  4. So first I am going to show how a database stores data (using the whiteboard) and then will show how the same data would be stored in an event sourcing data model (also referred to as event streaming). The business domain I’ll use is a very, very simplified bank account system.
  5. The way an event is stored keeps the event content (that is used in projection logic) separate from its context and identity which is not “business meaningful”.
  6. For this demo I will just step through a unit test that appends a stack of events to an event stream stored on Azure AppendBlob storage and run a projection over it that includes caching.
  7. Choosing the best backing technology – it is worth experimenting but this image gives a broad brush strokes idea of the best technology fit
  8. Next steps:- The best advice I can give you in terms of learning event sourcing (and this also applies to CQRS) is to experiment with it – either in a personal project or in a new build work project that allows for some flexibility. If you want an out-of-the-box experience there is a project called “Event Store” at the URL geteventstore.com that you should give a go. There are videos on YouTube – especially the “Goto 2014;” talk by Greg Young, a number of blogs by people like Daniel Whittaker and Dino Esposito and a good few folks on twitter discussing this (including myself) and the book “Event Centric: Finding Simplicity in Complex Systems” (also by Greg Young) If you are a .NET developer there are two linked projects I am working on (hosted on CodeProject) – a CQRS / Event Sourcing framework that runs on top of Azure storage and a graphical designer for creating the event source based business model. Neither is production ready quite yet but getting there.