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

非 Y 不嫁゛ 提交于 2019-12-20 19:43:27

问题


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.


回答1:


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




回答2:


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).




回答3:


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.




回答4:


JGit can use JDBC, HBase, Cassandra, Bigtable and more and it's thread safe.



来源:https://stackoverflow.com/questions/7152276/is-there-a-better-database-than-git-with-serializable-immutable-versioned-tre

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!