3 ms·
I work on Scuttlebutt, which in another "basically just Git" kind of thing, and after porting Scuttlebutt to "just Git" I can comment on this a bit. Git is a h
by ChristianBundy 6y ago
I work on Scuttlebutt, which in another "basically just Git" kind of thing, and after porting Scuttlebutt to "just Git" I can comment on this a bit.
Git is a hash chain with a few constraints:
- Each commit has at least one previous commit, unless it's the root.
- Each commit has author and committer metadata with embedded timestamps.
- Each commit references a merkle tree of files at that specific commit.
You have the option of setting the authors to some minimal example value (example@example.com, Jan 1 1970) and using an empty tree, but then your payloads are being stored in the "commit message". Streaming these payloads is hard, getting them by sequence numbers is hard, enforcing extra constraints (e.g. only one previous commit, no merges) requires a Git hook, and at all times you're acutely aware that Git wasn't built to act as a distributed NoSQL database.
Using Git as a database is possible, but I think it's about as practical as writing your application logic in some technically-Turing-complete language like PostScript.