git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Ronnie Sahlberg <sahlberg@google.com>
To: "git@vger.kernel.org" <git@vger.kernel.org>,
	Michael Haggerty <mhagger@alum.mit.edu>
Subject: Pluggable backends for refs,wip
Date: Tue, 5 Aug 2014 14:40:50 -0700	[thread overview]
Message-ID: <CAL=YDWk5C+bQS76_+jx1BSYSxecCxaS95RG181ecbJBLCNWLkQ@mail.gmail.com> (raw)

List, Michael,

Please see
https://github.com/rsahlberg/git/tree/backend-struct-db-2
for an example of a pluggable backend for refs storage.

This series contain changes to make it possible to add new backends
for handling/storage of refs and implements one new backend :
refs-be-be.c .

This new backend offloads the actual refs handling to a small database
daemon with which ita talks via a very simple rpc protocol. That
daemon in turn then connects to the datastore and read/writes the
values to it.

By having an always running database daemon it will allow faster
startup of the git commands since they will now only need to connect
to a domain socket instead of having to traverse a potentially very
large number of files during the "build ref cache" phase.
Another nice feature is that it can allow running one single database
daemon and use it to host the refs for multiple independent git
repositoris (by using the new repository name config to distinguish
between them).

It can not yet apply to origin/* since it is based on some small
series that have yet not arrived there
and is still a wip. But if you want to test/look at what we could be
doing one day, please feel free to clone this repo.


FAQ:
Q:
This sound cool. How do I test this?

A:
1, Clone https://github.com/rsahlberg/git/tree/backend-struct-db-2 and
build git.

2, gcc refsd-tdb.c -o refsd-tdb -l tdb
3, ./refsd-tdb /tmp/refsd.socket /tmp /tmp/refsd.log

4, git clone --db-repo-name=ROCKet --db-socket=/tmp/refsd.socket <some-repo> foo

./foo should now contain a git repository that store its refs in a
separate database.
(teh databases are store under /tmp  so don't use this for anything
important because bad things happens to things stored under /tmp)


regards
ronnie sahlberg

             reply	other threads:[~2014-08-05 21:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-05 21:40 Ronnie Sahlberg [this message]
2014-08-05 21:56 ` Pluggable backends for refs,wip Nico Williams
2014-08-05 22:23   ` Ronnie Sahlberg
2014-08-05 22:28     ` Nico Williams
2014-08-07 12:57 ` Michael Haggerty
2014-08-08 15:53   ` Ronnie Sahlberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAL=YDWk5C+bQS76_+jx1BSYSxecCxaS95RG181ecbJBLCNWLkQ@mail.gmail.com' \
    --to=sahlberg@google.com \
    --cc=git@vger.kernel.org \
    --cc=mhagger@alum.mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).