Upgrade to Pro — share decks privately, control downloads, hide ads and more …

DDDVienna - 103 years of event sourcing experience

DDDVienna - 103 years of event sourcing experience

All this talk about event sourcing, and why it is the best. But who uses it? Why do they use it? And what are the challenges that others have run into? We had exactly these questions. In order to find the answers we have interviewed 25 engineers from all over the world. Some with many years of experience, others with just a few. In total they had 103 years of experience. We asked them all about event sourcing: why would you use it, why not, what did you like, what not, and so on. Topics such as schema evolution, optimization of replay, and the steep learning curve will be discussed. This talk presents a summary of 103 years of experience with event sourcing.

Michiel Overeem

October 04, 2019
Tweet

More Decks by Michiel Overeem

Other Decks in Technology

Transcript

  1. M. Overeem, M. Spoor, and S. Jansen, “The Dark Side

    of Event Sourcing: Managing Data Conversion,” in IEEE 24th International Conference on Software Analysis, Evolution and Reengineering (SANER), 2017, pp. 193–204.
  2. Data upgrade Deployed with Executed by Executed by Data upgrade

    Application upgrade Lazy transformation Upcasting In place transfor- mation Multiple versions Copy and transfor- mation Basic & Complex Event Basic & Complex Stream Basic Store Complex Store Big Flip Rolling Upgrade Blue-Green Expand- Contract Blue- Green Deployed with Combined with Weak schema A framework based on literature and a prototype. But do we really understand event sourcing?
  3. RQ2 RQ3 RQ1 What types of systems apply event sourcing

    and why? How can event sourced systems be defined? What are the challenges faced in applying event sourcing?
  4. RQ2 RQ3 RQ1 What types of systems apply event sourcing

    and why? How can event sourced systems be defined? What are the challenges faced in applying event sourcing?
  5. “An event is a discrete data object specified in domain

    terms that represents a state change in an ESS.”
  6. “The project function takes one or more event streams and

    creates a projection with the data from the given events.”
  7. “The accept function takes a projection P and a command

    C. The command is validated using the data in the projection, and the accept function either results in an error or in an event “
  8. Applications that do not evolve in response to changing requirements

    or changing technology become less useful -Lehman, 1974
  9. Which streams are in the store? Which event types are

    in which stream? Which attributes does an event have?
  10. DDD Yes No “You align the events with real world

    events. You are dealing with changes that have a native equivalence. Doing DDD leads to less fragile design.”
  11. Upcasters (12/24) Transform at runtime “The approach I took, and

    which is my impression that everyone takes …”
  12. “So one of the things you should never ever do

    is change existing events. An event written persisted to datastore is not like a hand wavy thing. It is a fact.”
  13. “So one of the things you should never ever do

    is change existing events. An event written persisted to datastore is not like a hand wavy thing. It is a fact.” “Historians rewrite the past too…”
  14. “So one of the things you should never ever do

    is change existing events. An event written persisted to datastore is not like a hand wavy thing. It is a fact.” “Historians rewrite the past too…” “These rewrites aren't destructive first of all.”
  15. “So one of the things you should never ever do

    is change existing events. An event written persisted to datastore is not like a hand wavy thing. It is a fact.” “Historians rewrite the past too…” “These rewrites aren't destructive first of all.” “When your events form a contract with the outside, you have to keep those.”
  16. In-place transformation (5/24) Just as in the old days “Now

    that would pretty much break the whole premise of having a proper audit trail.”
  17. Copy-transform (14/24) When you just need to start over “if

    you have like 10 billion events you just can't do it”
  18. Copy-transform (14/24) When you just need to start over “if

    you have like 10 billion events you just can't do it” 1. Create a new store from the old one. 2. Create a new stream inside of the store, based on old streams. 3. Create new events in an existing stream.
  19. Hopefully, published soon! M. Overeem, M. Spoor, S. Jansen, and

    S. Brinkkemper, “An Empirical Characterization of Event Sourced Systems and their Schema Evolution,” to be published.
  20. Copyright Nasa Goddard Michiel Overeem @michielovereem All (business) applications can

    apply event sourcing and benefit from it. There is room for your solution!