SlideShare ist ein Scribd-Unternehmen logo
1 von 13
Event Sourcing

Andreas Öhlund
Enterprise Development Expert
Where does ES apply?
       Queries                         Persistent View Model


                                                 Denormalizer
                                       Publish
                   Command
        Input                  Handler           Persist
UI
      Validation             Validation
                               Rules                       Write store
Where does ES apply?
       Queries                         Persistent View Model


                                                 Denormalizer
                                       Publish
                   Command
        Input                  Handler           Persist
UI                                                   HERE!
      Validation             Validation
                               Rules                       Write store
Structural models
             Order Line



 Order




             Shipping info
Behavioral models


                                      Shipping
 Order    Line Item X   Line Item Y
                                        Info
Created      Added        Added
                                       Added
One model to rule
              them all



                                       Shipping
 Order     Line Item X   Line Item Y              Line Item Y
                                         Info
Created       Added        Added                   Removed
                                        Added
One model to rule
              them all
             What ever model your domain expert
                        can dream up




                                        Shipping
 Order     Line Item X   Line Item Y               Line Item Y
                                          Info
Created       Added        Added                    Removed
                                         Added
Effects on domain
          models

• No getters and setters
• Easy testing without mocks
• Enforces the “Aggregate roots as the
  consistency boundary” concept
Effects on teams
          Event
                     Persistent
Domain
                    View model




Command            DTO


          Client
Improved concurrency

• Occasionally connected systems
 • More stale data
 • Higher chance of conflicting edits
 • Merge ala GIT
Using an EventStore


• Demo...
No more
IWhatEverRepository

• IRepository.Get(Guid aggregateId)
• IRepository.Save(IAggregate aggregate)
Thanks for listening!

 Andreas Öhlund - Frontwalker
 Enterprise Development Expert




                 andreas.ohlund@it-arkitekterna.se
                 http://andreasohlund.net

Weitere ähnliche Inhalte

Andere mochten auch

Unleash Your Domain With Greg Young @ DDD-Day
Unleash Your Domain With Greg Young @ DDD-DayUnleash Your Domain With Greg Young @ DDD-Day
Unleash Your Domain With Greg Young @ DDD-Day
DotNetMarche
 
Command query segregation principle
Command query segregation principleCommand query segregation principle
Command query segregation principle
andreasohlund
 
Introdução ao Domain-Driven Design
Introdução ao Domain-Driven DesignIntrodução ao Domain-Driven Design
Introdução ao Domain-Driven Design
André Borgonovo
 

Andere mochten auch (10)

Unleash Your Domain With Greg Young @ DDD-Day
Unleash Your Domain With Greg Young @ DDD-DayUnleash Your Domain With Greg Young @ DDD-Day
Unleash Your Domain With Greg Young @ DDD-Day
 
DDD Dirty Harry style
DDD Dirty Harry styleDDD Dirty Harry style
DDD Dirty Harry style
 
Loosely Coupled Complexity - Unleash the power of your Domain Model with Comm...
Loosely Coupled Complexity - Unleash the power of your Domain Model with Comm...Loosely Coupled Complexity - Unleash the power of your Domain Model with Comm...
Loosely Coupled Complexity - Unleash the power of your Domain Model with Comm...
 
Command query segregation principle
Command query segregation principleCommand query segregation principle
Command query segregation principle
 
Introdução ao Domain-Driven Design
Introdução ao Domain-Driven DesignIntrodução ao Domain-Driven Design
Introdução ao Domain-Driven Design
 
Model storming
Model stormingModel storming
Model storming
 
Projections explained
Projections explainedProjections explained
Projections explained
 
Greg Young on Architectural Innovation: Eventing, Event Sourcing
Greg Young on Architectural Innovation: Eventing, Event SourcingGreg Young on Architectural Innovation: Eventing, Event Sourcing
Greg Young on Architectural Innovation: Eventing, Event Sourcing
 
A Practical Guide to Domain Driven Design: Presentation Slides
A Practical Guide to Domain Driven Design: Presentation SlidesA Practical Guide to Domain Driven Design: Presentation Slides
A Practical Guide to Domain Driven Design: Presentation Slides
 
Socrates BE - Projections Explained
Socrates BE - Projections ExplainedSocrates BE - Projections Explained
Socrates BE - Projections Explained
 

Ähnlich wie Event sourcing

Ensuring Information Quality (June 2008)
Ensuring Information Quality (June 2008)Ensuring Information Quality (June 2008)
Ensuring Information Quality (June 2008)
Scott Abel
 
emerson electricl 2009 Annual Investor Conference_Peters
emerson electricl 2009 Annual Investor Conference_Petersemerson electricl 2009 Annual Investor Conference_Peters
emerson electricl 2009 Annual Investor Conference_Peters
finance12
 

Ähnlich wie Event sourcing (10)

Enterprise Security API (ESAPI) Java - Java User Group San Antonio
Enterprise Security API (ESAPI) Java - Java User Group San AntonioEnterprise Security API (ESAPI) Java - Java User Group San Antonio
Enterprise Security API (ESAPI) Java - Java User Group San Antonio
 
Discovery delivery 中国软件技术大会2011
Discovery delivery 中国软件技术大会2011Discovery delivery 中国软件技术大会2011
Discovery delivery 中国软件技术大会2011
 
Introduction to Force.com
Introduction to Force.comIntroduction to Force.com
Introduction to Force.com
 
Masrtjack eXchange
Masrtjack eXchangeMasrtjack eXchange
Masrtjack eXchange
 
개발자 수익 100% 보장하는 앱 익스체인지의 비밀
개발자 수익 100% 보장하는 앱 익스체인지의 비밀개발자 수익 100% 보장하는 앱 익스체인지의 비밀
개발자 수익 100% 보장하는 앱 익스체인지의 비밀
 
Microsoft Hyper-v launce Virtual Interop
Microsoft Hyper-v launce Virtual InteropMicrosoft Hyper-v launce Virtual Interop
Microsoft Hyper-v launce Virtual Interop
 
Sql Server 2012
Sql Server 2012Sql Server 2012
Sql Server 2012
 
Ensuring Information Quality (June 2008)
Ensuring Information Quality (June 2008)Ensuring Information Quality (June 2008)
Ensuring Information Quality (June 2008)
 
emerson electricl 2009 Annual Investor Conference_Peters
emerson electricl 2009 Annual Investor Conference_Petersemerson electricl 2009 Annual Investor Conference_Peters
emerson electricl 2009 Annual Investor Conference_Peters
 
Launch of HUAWEI CLOUD EI Development Tools
Launch of HUAWEI CLOUD EI Development ToolsLaunch of HUAWEI CLOUD EI Development Tools
Launch of HUAWEI CLOUD EI Development Tools
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 

Event sourcing

Hinweis der Redaktion

  1. \n
  2. \n
  3. \n
  4. \n
  5. Where do we do DDD? (business critical apps, competitive advantage)\nCan always give the BA’s what they want\n\nStructural model: WE need to predict what the business wants in the future (impossible)\n\nLittle investment up front\n\nIntent is not lost, no need to reverse engineer things\n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n