Does libgit2sharp support custom backend configuration (similar to https://github.com/libgit2/libgit2-backends)?
1 Answer
Indeed, libgit2 exposes the concepts of pluggable backends: There are 3 of them: object database, reference database and configuration storage.
From the LibGit2sharp latest release (v0.21) standpoint:
The object database backend is already available through LibGit2Sharp. You can find a sample implementation at https://github.com/nulltoken/libgit2sharp.voron
The reference database isn't done yet. There's an ongoing PR (#401) to work on this, but it's very outdated.
Nothing exist yet regarding the configuration storage from the LibGit2Sharp standpoint.
This is discussed further in an open LibGit2Sharp feature request (Add In-Memory Repository Support).
-
Thanks. In your experience, how easy it would be to plugin something like Cassandra or other K-V store?– factotumJan 30, 2015 at 6:55
-
The Voron based implementation comes with tests that enforce the behavior the custom OdbBackend behaves as expected. The same tests are run against a file based .git repository and against a Voron based one. If you can make your own implementation pass against those tests, you should be safe. Those tests actually provides you with a safety net regarding what is expected to happen when plugging in you own custom backend. Jan 30, 2015 at 10:27
-
2Regarding the ease of plugging the underlying technology, well... it depends a bit on the technology. For instance, Voron wasn't so hard to plug. @synhershko also worked on using ElasticSearch as an odb backend (see github.com/synhershko/libgit2sharp.Elasticsearch) and didn't seem to suffer much. Jan 30, 2015 at 10:27
-
-
@msingh If this answer was useful to you, maybe would you consider accepting/upvoting it? ;-) Jan 31, 2015 at 12:48