BookShared
  • MEMBER AREA    
  • Versioning in an Event Sourced System

    (By Greg Young)

    Book Cover Watermark PDF Icon Read Ebook
    ×
    Size 27 MB (27,086 KB)
    Format PDF
    Downloaded 668 times
    Last checked 14 Hour ago!
    Author Greg Young
    “Book Descriptions: Why Version?

    Have you ever done a big bang release? You schedule a maintenance window, carefully take down the system, release the new software, and… pray. I will never do a big bang release again. What scares me is not what happens if the release does not work, but what happens if it does not work and yet still appears to.

    Most developers, even those working through big bang releases, have dealt with the versioning of software before. For example, they write SQL migration scripts to convert the old schema to the new one. But have you ever written SQL migration scripts to convert from the new schema with data added to it back to the old schema without losing information? What happens if, later, you get a catastrophic failure on the new release?

    On teams I have worked with in the past, you got your choice: the fireman helmet or the cowboy hat. In other words, the fireman helmet means if you are working on a production issue, people know not bother you unless they have something material to your issue. I highly recommend this, as at least you get to keep a smile on your face while you are working live in production. To be fair, who wouldn’t want to wear a fireman helmet at work?

    In modern systems, however, this is not acceptable. The days of maintenance windows and big bang releases are over. Instead, we now focus on releasing parts of software, and often end up wanting to run multiple versions of software side by side. We can no longer update every consumer when a producer is released. We are forced to deal with versioning issues. We are forced to deal with 24/7/365 operations.

    There are many forces pushing us in this direction. We could talk about the move towards SOA/MicroServices, Continuous Deployment, core ideas from the business side, lossed opportunities and reputational risk.

    Many of the strategies discussed apply to messaging systems in general. Event Sourced systems also face these kinds of versioning issues in a unique way, as they represent an append-only model. A projection, for instance, needs to be able to read an event that was written two years ago, even though use-cases may have changed.

    What happens when you have mistakenly written an event in production? If we are to say an event is immutable and the model is append-only, many complications arise.

    Over the years, I have met many developers who run into issues dealing with versioning, particularly in Event Sourced systems. This seems odd to me. As we will discuss, Event Sourced systems are in fact easier to version than structural data in most instances, as long as you know the patterns for how to version, where they apply, and the trade-offs between the options.”

    Google Drive Logo DRIVE
    Book 1

    The Pragmatic Programmer: From Journeyman to Master

    ★★★★★

    Andy Hunt

    Book 1

    Tidy First?: A Personal Exercise in Empirical Software Design

    ★★★★★

    Kent Beck

    Book 1

    Domain Modeling Made Functional: Tackle Software Complexity with Domain-Driven Design and F#

    ★★★★★

    Scott Wlaschin

    Book 1

    Designing Data-Intensive Applications

    ★★★★★

    Martin Kleppmann

    Book 1

    Team Topologies: Organizing Business and Technology Teams for Fast Flow

    ★★★★★

    Matthew Skelton

    Book 1

    Thinking, Fast and Slow

    ★★★★★

    Daniel Kahneman

    Book 1

    Domain-Driven Design Distilled

    ★★★★★

    Vaughn Vernon

    Book 1

    Domain-Driven Design: Tackling Complexity in the Heart of Software

    ★★★★★

    Eric Evans

    Book 1

    The Lean Startup (Hardcover) (Em Portugues do Brasil)

    ★★★★★

    Eric Ries

    Book 1

    Software Engineering at Google: Lessons Learned from Programming Over Time

    ★★★★★

    Titus Winters

    Book 1

    Continuous Integration: Improving Software Quality and Reducing Risk

    ★★★★★

    Paul Duvall

    Book 1

    A Philosophy of Software Design

    ★★★★★

    John Ousterhout

    Book 1

    Thinking In Systems: A Primer

    ★★★★★

    Donella H. Meadows