You can't corrupt state if you don't overwrite state

A few weeks ago EA treated players to corrupt save files. We have more than 280 characters to work with here, so I’ll say that obviously I am not part of the technical team and am not aware of the situation.

I’m just sharing a thought it sparked.

Classic meme template

We’ve gone over some low-level implementation details in previous issues, including how event-sourced data is stored as what happened rather than the result of what happened.

When you store the latter, you have no idea how you got there. And if that result is corrupted, then you get to come up with long-winded missives whose message payload could be reduced to saying, “oops.”

If you store what happened, you can reconstruct the result of what happened—and at any point in time.

If EA had been storing the changes happening to their players save files, rather than the resulting save files, when whatever happened that introduced the corrupted state was detected, they could roll back to the last good state. Total armchair quarterbacking again, and there are likely details to work out, but this is the power of storing data as messages rather than the result of those messages.

It’s not without cost, of course. It’s a different way of building things, and your team will likely need to learn some new things. It’s probably also costly to have to say, “oops.”

Want to learn more about storing what happened?


Like this message? I send out a short email each day to help software development leaders build organizations the deliver value. Join us!


Get the book!

Ready to learn how to build an autonomous, event-sourced microservices-based system? Practical Microservices is the hands-on guidance you've been looking for.

Roll up your sleeves and get ready to build Video Tutorials, the next-gen web-based learning platform. You'll build it as a collection of loosely-coupled autonomous services, developing a message store interface along the way.

When you're done, you'll be ready to contribute to microservices-based projects.

In ebook or in print.