Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a better database than Git (with serializable, immutable, versioned trees)?

Imagine the data structure behind Git. It's like a confluently persistent data structure, except using hash references instead of traditional pointers.

I need Git's data structure, except without any of the working tree and index stuff. And there would be millions of branches, each tracking a handful of other local branches. Commits and merges would occur several thousand times per minute on different threads. Pulls would occur every second.

Between libgit2 and jgit I can use Git's data storage subsystem.

But am I using the right tool for the job? Is there a DB that has git's features, but is faster/more concurrent/scalable/less impedance mismatch? Memory-cached writes would be extremely helpful.

The task:

A collaboratively-edited game. Every player has their own branch, and every change they make to the game world is only applied to their version. Changes are merged back into the 'master' branch by trusted users. Data and source code are often tied together, needing the same branching and merging functionality.

like image 222
Lilith River Avatar asked Aug 22 '11 19:08

Lilith River


3 Answers

Datomic provides a persistent data storage and a built-in time notion.

The core developers even created a sample application that implements a git repository into the database

like image 147
Cesar Canassa Avatar answered Nov 13 '22 18:11

Cesar Canassa


Although the index/working copy parts of git can be separated out easily enough, git is not designed for merges or commits at the rate of thousands per second on a single machine. The core code is not even threadsafe, for the most part. You will likely need to create some new system for your data (you can still use git for the code, of course, and can also look into generating git commits to represent your data when necessary, etc).

like image 41
bdonlan Avatar answered Nov 13 '22 18:11

bdonlan


Have a look at how github works it terms of collaboration between and across projects. The key is in the way many users choose to copy, use and replicate the file contents of others, so that the github core repo can do the aggregation.

If you don't have that re-use then the git philosophy probably doesn't match your need. The challenge is to identify your impedance match points and promote it hard. Many folk don't really understand why git works and 'normal' VCS doesn't (that is, why/when did old style VCS work in the first place? - clue Kaolin & linen drawings for the RMS Titanic). git works because it starts with modern computer capabilities.

like image 1
Philip Oakley Avatar answered Nov 13 '22 17:11

Philip Oakley