SlideShare ist ein Scribd-Unternehmen logo
1 von 11
Downloaden Sie, um offline zu lesen
Event Sourcing
@derek_comartin
CodeOpinion.com
Agenda
● Typical Data Persistence
● Overview
● Events
● Why?
● Queries
● Drawbacks
Typical Data Persistence
● Maintain current state
● Concurrent users, data update conflicts.
● Auditing
Overview
● Old concept
● Using already (transaction log)
● Capture Intent
● Event = State Change
● Sequence of Events
● Append Only
Events
● Describes state change
● Past tense
● Source of truth
● Audit log
Event Stream
Started Shopping
Added T-Shirt
Added Socks
Removed Socks
Added Coupon
Event
StartedShopping
{
CartId: f5a7f55d-1e33-440c-836c-ea50fc59a274,
CustomerId: f98902b3-e8cf-4b7a-b561-5e39a06b5e0c,
Date: 2014-01-03 15:36:08,
}
AddedSocksToShoppingCart
{
CartId: f5a7f55d-1e33-440c-836c-ea50fc59a274,
ProductId: ed00fa0b-6412-4cc6-bbac-14702bfeff3f,
Quantity: 1,
}
Why?
● Captures business intent
● Transaction & Audit log
● Build/Rebuild to any model
● Debugging
● Integration with other systems
Queries
● Generate Read Model from Events
● Secondary Data Source required
● Eventual Consistency
Started Shopping
Added T-Shirt
Added Socks
Removed Socks
Added Coupon
Any model you can
think of!
Cart Table
CartId
ProductId
Quantity
Denormalized Table
CartId
CustomerName
ProductId
Quantity
Price
CQRS/ES
Data Storage
Domain
Object
Domain
Object
Command Handlers
Client
Command
DTO
Message Queue
Read Layer
Facade
Query
DTO
Event Storage
Events
Message Queue Event Handlers
Data Storage
Drawbacks
● Multiple Models / Data Sources
● Versioning
● Performance
● Maturity / Public Knowledge

Weitere ähnliche Inhalte

Andere mochten auch

Decision Making for Developers
Decision Making for DevelopersDecision Making for Developers
Decision Making for Developers
Derek Comartin
 
Σθένος "Νικήστε το άγχος των εξετάσεων."
Σθένος "Νικήστε το άγχος των εξετάσεων."Σθένος "Νικήστε το άγχος των εξετάσεων."
Σθένος "Νικήστε το άγχος των εξετάσεων."
Kosmidis Eleftherios
 
Стратегия подготовки к егэ
Стратегия подготовки к егэСтратегия подготовки к егэ
Стратегия подготовки к егэ
chechery
 
Pokemon episod 9
Pokemon episod 9Pokemon episod 9
Pokemon episod 9
mimiqaqa
 
BNI 10minuit presentation
BNI 10minuit presentationBNI 10minuit presentation
BNI 10minuit presentation
John Holloway
 

Andere mochten auch (10)

Decision Making for Developers
Decision Making for DevelopersDecision Making for Developers
Decision Making for Developers
 
Dn 3n2d
Dn 3n2dDn 3n2d
Dn 3n2d
 
Dati di traffico e indici di benchmark
Dati di traffico e indici di benchmarkDati di traffico e indici di benchmark
Dati di traffico e indici di benchmark
 
Σθένος "Νικήστε το άγχος των εξετάσεων."
Σθένος "Νικήστε το άγχος των εξετάσεων."Σθένος "Νικήστε το άγχος των εξετάσεων."
Σθένος "Νικήστε το άγχος των εξετάσεων."
 
Стратегия подготовки к егэ
Стратегия подготовки к егэСтратегия подготовки к егэ
Стратегия подготовки к егэ
 
Family law attorney
Family law attorneyFamily law attorney
Family law attorney
 
Presentatie CultuurOntwerp tijdens Klasse Theater Uitjes op 29 april 2014 in ...
Presentatie CultuurOntwerp tijdens Klasse Theater Uitjes op 29 april 2014 in ...Presentatie CultuurOntwerp tijdens Klasse Theater Uitjes op 29 april 2014 in ...
Presentatie CultuurOntwerp tijdens Klasse Theater Uitjes op 29 april 2014 in ...
 
Pokemon episod 9
Pokemon episod 9Pokemon episod 9
Pokemon episod 9
 
BNI 10minuit presentation
BNI 10minuit presentationBNI 10minuit presentation
BNI 10minuit presentation
 
Http _www_significatodeitarocchi_it_tarocchi_tarocchi-nuovi-metodi-di-lettura_
Http  _www_significatodeitarocchi_it_tarocchi_tarocchi-nuovi-metodi-di-lettura_Http  _www_significatodeitarocchi_it_tarocchi_tarocchi-nuovi-metodi-di-lettura_
Http _www_significatodeitarocchi_it_tarocchi_tarocchi-nuovi-metodi-di-lettura_
 

Ähnlich wie Event Sourcing

Egn 5620 enterprise_sys_procurement process fall 2012
Egn 5620 enterprise_sys_procurement process fall 2012Egn 5620 enterprise_sys_procurement process fall 2012
Egn 5620 enterprise_sys_procurement process fall 2012
Truptir20
 
Egn 5620 enterprise_sys_procurement process fall 2012_123
Egn 5620 enterprise_sys_procurement process fall 2012_123Egn 5620 enterprise_sys_procurement process fall 2012_123
Egn 5620 enterprise_sys_procurement process fall 2012_123
Truptir20
 
Decision CAMP 2014 - Howard Rogers - Programming with decision tables v01
Decision CAMP 2014 - Howard Rogers - Programming with decision tables v01Decision CAMP 2014 - Howard Rogers - Programming with decision tables v01
Decision CAMP 2014 - Howard Rogers - Programming with decision tables v01
Decision CAMP
 
COGS Account Generator Workflow Customization
COGS Account Generator Workflow CustomizationCOGS Account Generator Workflow Customization
COGS Account Generator Workflow Customization
Edi Yanto
 

Ähnlich wie Event Sourcing (18)

SAP Event Management Use Cases
SAP Event Management Use CasesSAP Event Management Use Cases
SAP Event Management Use Cases
 
Egn 5620 enterprise_sys_procurement process fall 2012
Egn 5620 enterprise_sys_procurement process fall 2012Egn 5620 enterprise_sys_procurement process fall 2012
Egn 5620 enterprise_sys_procurement process fall 2012
 
Egn 5620 enterprise_sys_procurement process fall 2012_123
Egn 5620 enterprise_sys_procurement process fall 2012_123Egn 5620 enterprise_sys_procurement process fall 2012_123
Egn 5620 enterprise_sys_procurement process fall 2012_123
 
Decision CAMP 2014 - Howard Rogers - Programming with decision tables v01
Decision CAMP 2014 - Howard Rogers - Programming with decision tables v01Decision CAMP 2014 - Howard Rogers - Programming with decision tables v01
Decision CAMP 2014 - Howard Rogers - Programming with decision tables v01
 
Grocery Delivery App Development Company |G Tech Solutions
Grocery Delivery App Development Company |G Tech SolutionsGrocery Delivery App Development Company |G Tech Solutions
Grocery Delivery App Development Company |G Tech Solutions
 
Grocery Delivery App Development Company|Features of grocery app|G Tech Solut...
Grocery Delivery App Development Company|Features of grocery app|G Tech Solut...Grocery Delivery App Development Company|Features of grocery app|G Tech Solut...
Grocery Delivery App Development Company|Features of grocery app|G Tech Solut...
 
COGS Account Generator Workflow Customization
COGS Account Generator Workflow CustomizationCOGS Account Generator Workflow Customization
COGS Account Generator Workflow Customization
 
Work relay demo v3
Work relay demo v3Work relay demo v3
Work relay demo v3
 
Methodology For Australian Business To Rayvat Accounting
Methodology For Australian Business To Rayvat AccountingMethodology For Australian Business To Rayvat Accounting
Methodology For Australian Business To Rayvat Accounting
 
The Digital Insurer Award - Tata AIG (IPDS)
The Digital Insurer Award - Tata AIG (IPDS)The Digital Insurer Award - Tata AIG (IPDS)
The Digital Insurer Award - Tata AIG (IPDS)
 
Erp system f test
Erp system   f testErp system   f test
Erp system f test
 
IoTで成功を収めるための製品と戦略 〜 Salesforce IoT 〜
IoTで成功を収めるための製品と戦略 〜 Salesforce IoT 〜IoTで成功を収めるための製品と戦略 〜 Salesforce IoT 〜
IoTで成功を収めるための製品と戦略 〜 Salesforce IoT 〜
 
Product list
Product listProduct list
Product list
 
Where Digital Analytics is taking BI and Big Data
Where Digital Analytics is taking BI and Big DataWhere Digital Analytics is taking BI and Big Data
Where Digital Analytics is taking BI and Big Data
 
Where Digital Analytics is taking BI and Big Data
Where Digital Analytics is taking BI and Big DataWhere Digital Analytics is taking BI and Big Data
Where Digital Analytics is taking BI and Big Data
 
Sap scm ewm na muk 11 02
Sap scm ewm na muk 11  02 Sap scm ewm na muk 11  02
Sap scm ewm na muk 11 02
 
Integrating Plone with E-Commerce and Relationship Management: A Case Study i...
Integrating Plone with E-Commerce and Relationship Management: A Case Study i...Integrating Plone with E-Commerce and Relationship Management: A Case Study i...
Integrating Plone with E-Commerce and Relationship Management: A Case Study i...
 
NJ _ Workshops _ How to use GA4 _ June 2022.pdf
NJ _ Workshops _ How to use GA4 _  June 2022.pdfNJ _ Workshops _ How to use GA4 _  June 2022.pdf
NJ _ Workshops _ How to use GA4 _ June 2022.pdf
 

Kürzlich hochgeladen

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
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
 

Kürzlich hochgeladen (20)

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
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)
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
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
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
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 ...
 
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
 
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
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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...
 
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
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
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
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 

Event Sourcing