3 ms·
Just to clarify here: event sourcing is _not_ what Git does at all. Git stores complete snapshots of objects, not diffs [1]. Event sourcing itself is a fairly
by jen20 8y ago
Just to clarify here: event sourcing is _not_ what Git does at all. Git stores complete snapshots of objects, not diffs [1].
Event sourcing itself is a fairly straightforward concept which the parent does sum up though - store events which describe what happened to an entity in a system rather than the resulting state. The state of an object can be derived via application of a left fold over the history.
[1]: https://willi.am/blog/2014/10/14/for-the-last-time-git-stores-snapshots-not-diffs/ https://willi.am/blog/2014/10/14/for-the-last-time-git-store... - this is the best reference I can find quickly, though the git manual would obvioiusly be more authoritative.
- goloroden 8y agoAs said, "similar" to what Git does ;-) Conceptually, it's still capturing the deltas, instead of storing the current state and overwriting it. Storing the history is the key ingredient here, and of course, there are differences in how to achieve this.
- jen20 8y agoI would argue that there is a fundamental difference between the two: one stores the state and calculates the deltas, and the other stores the deltas and calculates the state. Both are common in systems, but only the latter is event sourcing - at least if the definition is to have any use and not become overloaded.
- linkmotif 8y agoYeah every time people say Git stores deltas it’s sad because the fun thing about Git is that it DOESNT store deltas.