6 ms·
You need graph queries and graph transactions basically, git is geared for text and diffing
by dustingetz 6y ago
You need graph queries and graph transactions basically, git is geared for text and diffing
- Smaug123 6y agoWell, yes and no - while it does provide diffing, it's not native to how Git works. Diffs are inferred, or are used internally as a performance optimisation, rather than being fundamental. I suspect this is the kind of place where the answer is "just go and do it, you'll find out why soon enough".
- ChristianBundy 6y agoI 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.