top | item 42857362

(no title)

arialdomartini | 1 year ago

I saw other times Git being related to event sourcing, but the argument is wrong.

Most of the VCSs before Git (RCS, CVS, SVN) used to store deltas and to rebuild the state reapplying them.

The very reason why Git took them by the storm is exactly because, on the contrary, Git does not store deltas but snapshots. Each commit is not there collection of the occurred chances but a complete snapshot of the whole project. Git is very efficient in reusing the blob objects to save space, but it’s still a whole snapshot. The occurred changes are not stored, and they are calculated on demand.

The very opposite of event sourcing, where it’s the state to be calculated and the occurred changes / events to be stored.

Git is really the demonstration that for code versioning state sourcing is way more efficient than event sourcing.

discuss

order

jdkoeck|1 year ago

Git is still event sourced, it’s just there is only one kind of event (a commit), and its payload is the whole state ¯\_(ツ)_/¯

arialdomartini|1 year ago

Eh eh, this is an interesting point of view, but it’s really not like this.

Take the case of the event of “deleting a file”. There has been an interesting discussion between Linus and the orher developers, when Git was being d initially esigned: some of them wanted to capture and track this event. Linus firmly rejected the whole idea of track events, providing very solid arguments

http://web.archive.org/web/20200117061404/http://www.gelato....