SlideShare una empresa de Scribd logo
1 de 12
Event Sourcing
From WTF to WHY to WOW?
Duncan Jones
💬 @Merrion
Now with added
CQRS and DDD
Agenda
What Why How
Notes
Definition of event sourcing
Modelling using events
Comparison to RDBMS Performance
? Scalability?
Scale UP
Scale ACROSS
!
Eventual
Consistency
Comparison to RDBMS Business Fit ?
Ledger / transaction
based
Document based,
Less structured
WRITE heavy
READ heavy
Comparison to RDBMS
Tooling ?
Ease of use ?Developer
Experience ?
Use with CQRS
Query
Command
Projection
Event
Streams Cache
Definition
Implementation
Identity
Group
Definition
Implementation
Identity
Group
Collate
Use with DDD and/or microservices
Event Store
Projection
Identity
Group
Cache
Bounded context (Domain)
Command
Query
Funky follow ups
Query
Command
Cache
Passive
“Observer”
Active
Query
Next steps
Experiment
https://geteventstore.com/
CQRS Designer (.NET)
Azure Event Grid

Más contenido relacionado

Similar a Event sourcing - from wtf to why to wow

Devops aws
Devops aws  Devops aws
Devops aws
Gpsinfotech
 
120 Que Podriamos Ver En Gene Xus
120 Que Podriamos Ver En Gene Xus120 Que Podriamos Ver En Gene Xus
120 Que Podriamos Ver En Gene Xus
GeneXus
 

Similar a Event sourcing - from wtf to why to wow (20)

Lets focus on business value
Lets focus on business valueLets focus on business value
Lets focus on business value
 
The Windows Azure Platform (MSDN Events Series)
The Windows Azure Platform (MSDN Events Series)The Windows Azure Platform (MSDN Events Series)
The Windows Azure Platform (MSDN Events Series)
 
Microsoft Azure For Solutions Architects
Microsoft Azure For Solutions ArchitectsMicrosoft Azure For Solutions Architects
Microsoft Azure For Solutions Architects
 
Lets focus on business value
Lets focus on business valueLets focus on business value
Lets focus on business value
 
Lets focus on business value
Lets focus on business valueLets focus on business value
Lets focus on business value
 
Devops aws
Devops aws  Devops aws
Devops aws
 
Microsoft TechSummit - Deploy your Solution to IaaS and PaaS with VSTS and Az...
Microsoft TechSummit - Deploy your Solution to IaaS and PaaS with VSTS and Az...Microsoft TechSummit - Deploy your Solution to IaaS and PaaS with VSTS and Az...
Microsoft TechSummit - Deploy your Solution to IaaS and PaaS with VSTS and Az...
 
120 Que Podriamos Ver En Gene Xus
120 Que Podriamos Ver En Gene Xus120 Que Podriamos Ver En Gene Xus
120 Que Podriamos Ver En Gene Xus
 
AWS re:Invent 2016: ↑↑↓↓←→←→ BA Lambda Start (SVR305)
AWS re:Invent 2016: ↑↑↓↓←→←→ BA Lambda Start (SVR305)AWS re:Invent 2016: ↑↑↓↓←→←→ BA Lambda Start (SVR305)
AWS re:Invent 2016: ↑↑↓↓←→←→ BA Lambda Start (SVR305)
 
Migrating to the cloud - Windows on AWS
Migrating to the cloud - Windows on AWSMigrating to the cloud - Windows on AWS
Migrating to the cloud - Windows on AWS
 
For loop summit - cheating the developer experience
For loop summit - cheating the developer experienceFor loop summit - cheating the developer experience
For loop summit - cheating the developer experience
 
DCSF 19 Developing Apps with Containers, Functions and Cloud Services
DCSF 19 Developing Apps with Containers, Functions and Cloud ServicesDCSF 19 Developing Apps with Containers, Functions and Cloud Services
DCSF 19 Developing Apps with Containers, Functions and Cloud Services
 
Dockercon 2019 Developing Apps with Containers, Functions and Cloud Services
Dockercon 2019 Developing Apps with Containers, Functions and Cloud ServicesDockercon 2019 Developing Apps with Containers, Functions and Cloud Services
Dockercon 2019 Developing Apps with Containers, Functions and Cloud Services
 
Microsoft Azure Cloud Services
Microsoft Azure Cloud ServicesMicrosoft Azure Cloud Services
Microsoft Azure Cloud Services
 
Cqrs and event sourcing in azure
Cqrs and event sourcing in azureCqrs and event sourcing in azure
Cqrs and event sourcing in azure
 
Análisis de riesgos en Azure y protección de la información
Análisis de riesgos en Azure y protección de la informaciónAnálisis de riesgos en Azure y protección de la información
Análisis de riesgos en Azure y protección de la información
 
Infrastructure as a service and code using Azure - DevOps practice
Infrastructure as a service and code using Azure  - DevOps practiceInfrastructure as a service and code using Azure  - DevOps practice
Infrastructure as a service and code using Azure - DevOps practice
 
Managing Software from Development to Deployment in the Cloud
Managing Software from Development to Deployment in the CloudManaging Software from Development to Deployment in the Cloud
Managing Software from Development to Deployment in the Cloud
 
Microsoft Best Practices on AWS
Microsoft Best Practices on AWSMicrosoft Best Practices on AWS
Microsoft Best Practices on AWS
 
#DataOnCloud London event
#DataOnCloud London event#DataOnCloud London event
#DataOnCloud London event
 

Más de Duncan Jones

cqrs and event sourcing on Windows Azure
cqrs and event sourcing on Windows Azurecqrs and event sourcing on Windows Azure
cqrs and event sourcing on Windows Azure
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
 
Printing-a-NET-developers-guide-Part1
Printing-a-NET-developers-guide-Part1Printing-a-NET-developers-guide-Part1
Printing-a-NET-developers-guide-Part1
Duncan Jones
 

Más de Duncan Jones (20)

State o' yer WAN
State o' yer WANState o' yer WAN
State o' yer WAN
 
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
 
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
 
Crud or event sourcing
Crud or event sourcingCrud or event sourcing
Crud or event sourcing
 
cqrs and event sourcing on Windows Azure
cqrs and event sourcing on Windows Azurecqrs and event sourcing on Windows Azure
cqrs and event sourcing on Windows Azure
 
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
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 

Event sourcing - from wtf to why to wow

Notas del editor

  1. From WTF to WHY to WOW describes my own journey with event sourcing and how this forms part of a CQRS system which, in turn can form part of a DDD or Microservices architecture
  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) although I hope it has some relevance even to those that have used event sourcing in the past
  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. Modelling an event source based system is not a massively different thing to modelling a database system. You define the events that can occur to any given aggregate and all the properties that can be known about that event Then you can define the projections that run over that aggregate to give you point-in-time data You can extend this with commands and queries, and identity groups and classifiers. There is no relationship part though – aggregates are considered logically separate.
  6. So – how does event sourcing compare to a traditional database approach? We’ll look at the following categories but if anything else occurs while we are doing so shout it out so we can add it in to the mix. Performance Scalability Tooling Developer experience Ease of use Business fit
  7. So – how does event sourcing compare to a traditional database approach? We’ll look at the following categories but if anything else occurs while we are doing so shout it out so we can add it in to the mix. Performance Scalability Tooling Developer experience Ease of use Business fit
  8. So – how does event sourcing compare to a traditional database approach? We’ll look at the following categories but if anything else occurs while we are doing so shout it out so we can add it in to the mix. Performance Scalability Tooling Developer experience Ease of use Business fit
  9. Commands can append events to the end of event streams Queries can run projections Projection results can be cached
  10. The internals of an event sourced system should not be shared between domains Only the defined Command and Query interfaces can be used outside of the domain
  11. Now that we have a grasp on the idea of event storming we can add a bit of funky madness by adding the idea of treating the life cycle of each command and query as an independent event stream in its own right. This event stream can be in the form of a queue which, in turn, means multiple independent agents (threads or microservices) can work on the same command or query asynchronously and that the processing of that command or query can go up or down as the command/query is in flight. Theoretically this means that performance can scale linearly with addition of hardware.
  12. 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.