Versioning Events

event-sourcing

Each model has it's version. NOTE: versions are always backwards compatible OR they are a new version!


%Eventv1{name: "Gage"}
%Eventv2{name: "Gage", age: 27} # backwards compatible
%Agev1{age: 27} # not backwards compatible

Information from external systems

Never lookup data from an external systems in a projection! It's better to inline that information into the Event. Think of how Elm saves all the events it gets from external systems into it's event store.

Changing Semantic Meaning

One important aspect of versioning is that semantic meaning cannot change between versions of software. There is no good way for a downstream consumer to understand a semantic meaning change.

EG: Tempature number must always be in the same units. Don't reuse things for different meaning!

What if I make a mistake?

What would an accountant do?

Also you can: 1. Copy and transform to a new stream, once it's over there move to the new stream and delete the old one * Good for many events to one event and vice-versa