Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Event sourcing

1,060 views

Published on

Published in: Technology
  • Be the first to comment

Event sourcing

  1. 1. Event SourcingAndreas ÖhlundEnterprise Development Expert
  2. 2. Where does ES apply? Queries Persistent View Model Denormalizer Publish Command Input Handler PersistUI Validation Validation Rules Write store
  3. 3. Where does ES apply? Queries Persistent View Model Denormalizer Publish Command Input Handler PersistUI HERE! Validation Validation Rules Write store
  4. 4. Structural models Order Line Order Shipping info
  5. 5. Behavioral models Shipping Order Line Item X Line Item Y InfoCreated Added Added Added
  6. 6. One model to rule them all Shipping Order Line Item X Line Item Y Line Item Y InfoCreated Added Added Removed Added
  7. 7. 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 InfoCreated Added Added Removed Added
  8. 8. Effects on domain models• No getters and setters• Easy testing without mocks• Enforces the “Aggregate roots as the consistency boundary” concept
  9. 9. Effects on teams Event PersistentDomain View modelCommand DTO Client
  10. 10. Improved concurrency• Occasionally connected systems • More stale data • Higher chance of conflicting edits • Merge ala GIT
  11. 11. Using an EventStore• Demo...
  12. 12. No moreIWhatEverRepository• IRepository.Get(Guid aggregateId)• IRepository.Save(IAggregate aggregate)
  13. 13. Thanks for listening! Andreas Öhlund - Frontwalker Enterprise Development Expert andreas.ohlund@it-arkitekterna.se http://andreasohlund.net

×