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.

03dc1d993fa7d5de422c1f35d53f80e6?s=128

Michiel Overeem

October 04, 2019
Tweet

Transcript

  1. 2.

    Michiel Lead Software Architect @ AFAS Software PhD candidate @

    University Utrecht michiel.overeem@afas.nl @michielovereem Overeem
  2. 4.

    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.
  3. 5.

    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?
  4. 6.

    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. 8.

    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?
  6. 11.
  7. 12.
  8. 17.
  9. 22.

    “An event is a discrete data object specified in domain

    terms that represents a state change in an ESS.”
  10. 23.

    “The project function takes one or more event streams and

    creates a projection with the data from the given events.”
  11. 24.

    “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 “
  12. 26.
  13. 34.
  14. 35.

    Applications that do not evolve in response to changing requirements

    or changing technology become less useful -Lehman, 1974
  15. 36.

    Which streams are in the store? Which event types are

    in which stream? Which attributes does an event have?
  16. 37.

    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.”
  17. 38.
  18. 40.

    Upcasters (12/24) Transform at runtime “The approach I took, and

    which is my impression that everyone takes …”
  19. 44.

    “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.”
  20. 45.

    “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…”
  21. 46.

    “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.”
  22. 47.

    “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.”
  23. 48.

    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.”
  24. 49.

    Copy-transform (14/24) When you just need to start over “if

    you have like 10 billion events you just can't do it”
  25. 50.

    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.
  26. 60.

    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.
  27. 61.

    Copyright Nasa Goddard Michiel Overeem @michielovereem All (business) applications can

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