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 (20)

OSMC 2018 | From Monitoring to ITSM by Felix Kronlage
OSMC 2018 | From Monitoring to ITSM by Felix KronlageOSMC 2018 | From Monitoring to ITSM by Felix Kronlage
OSMC 2018 | From Monitoring to ITSM by Felix Kronlage
 
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)
 
Six Sigma Process Improvement Foundational Steps
Six Sigma Process Improvement Foundational StepsSix Sigma Process Improvement Foundational Steps
Six Sigma Process Improvement Foundational Steps
 
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
 
Patterns for Building Streaming Apps
Patterns for Building Streaming AppsPatterns for Building Streaming Apps
Patterns for Building Streaming Apps
 
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...
 

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
 

Kürzlich hochgeladen (20)

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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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
 
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, ...
 
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...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
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
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
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
 
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
 

Event Sourcing