From: Sam Vilain <sam@vilain.net>
To: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Cc: Jeff King <peff@peff.net>, Nicolas Pitre <nico@fluxnic.net>,
Zenaan Harkness <zen@freedbms.net>,
git@vger.kernel.org, Shawn Pearce <sop@google.com>,
Nguyen Thai Ngoc Duy <pclouds@gmail.com>,
Joshua Roys <roysjosh@gmail.com>, Nick Edelen <sirnot@gmail.com>,
Jonas Fonseca <fonseca@diku.dk>
Subject: Re: Resumable clone/Gittorrent (again) - stable packs?
Date: Tue, 11 Jan 2011 10:07:46 +1300 [thread overview]
Message-ID: <4D2B7522.9050400@vilain.net> (raw)
In-Reply-To: <20110107185218.GA16645@LK-Perkele-VI.localdomain>
On 08/01/11 07:52, Ilari Liusvaara wrote:
> Ability to contact multiple servers in sequence, each time advertising
> everything obtained so far. Then treat the new repo as clone of the last
> address.
>
> This would e.g. be very handy if you happen to have local mirror of say, Linux
> kernel and want to fetch some related project without messing with alternates
> or downloading everything again:
>
> git clone --use-mirror=~/repositories/linux-2.6 git://foo.example/linux-foo
>
> This would first fetch everything from local source and then update that
> from remote, likely being vastly faster.
Coming to this discussion a little late, I'll summarise the previous
research.
First, the idea of applying the straight BitTorrent protocol to the pack
files was raised, but as Nicolas mentions, this is not useful because
the pack files are not deterministic. The protocol was revisited based
around the part which is stable, object manifests. The RFC is at
http://utsl.gen.nz/gittorrent/rfc.html and the prototype code (an
unsuccessful GSoC project) is at http://repo.or.cz/w/VCS-Git-Torrent.git
After some thought, I decided that the BitTorrent protocol itself is all
cruft and that trying to cut it down to be useful was a waste of time.
So, this is where the idea of "automatic mirroring" came from. With
Automatic Mirroring, the two main functions of P2P operation - peer
discovery and partial transfer - are broken into discrete features.
I wrote this patch series so far, for "client-side mirroring":
http://thread.gmane.org/gmane.comp.version-control.git/133626/focus=133628
The later levels are roughly discussed on this page:
http://code.google.com/p/gittorrent/wiki/MirrorSync
The "mirror sync" part is the complicated one, and as others have noted
no truly successful prototype has yet been built. Actually the Perl
gittorrent implementation did manage to perform an incremental clone; it
just didn't wrap it up nicely. But I won't go into that too much.
There was also another GSoC program to look at caching the object list
generation, the most expensive part of the process in the Perl
implementation. This was a generic mechanism for accelerating object
graph traversal and showed promise, however unfortunately was never merged.
The client-side mirroring patch, in its current form, already supports
out-of-date mirrors. It saves refs first into
'refs/mirrors/hostname/...' and finally contacts the main server to
check what objects it is still missing. So, if there was a regular
bittorrent+bundle transport available, it would be a useful way to
support an incremental clone; the client would first clone the (static)
bittorrent bundle, unpack it with its refs into the 'refs/mirrors/xxx/'
namespace, making the subsequent 'git fetch' to get the most recent
objects a much more efficient operation.
Hope that helps!
Cheers,
Sam
next prev parent reply other threads:[~2011-01-10 21:36 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-06 2:29 Resumable clone/Gittorrent (again) - stable packs? Zenaan Harkness
2011-01-06 17:05 ` Shawn Pearce
2011-01-10 16:39 ` John Wyzer
2011-01-10 21:42 ` Sam Vilain
2011-01-11 0:03 ` Nguyen Thai Ngoc Duy
2011-01-11 0:57 ` J.H.
2011-01-11 1:56 ` Nguyen Thai Ngoc Duy
2011-01-06 21:09 ` Nicolas Pitre
2011-01-07 2:36 ` Zenaan Harkness
2011-01-07 4:33 ` Nicolas Pitre
2011-01-07 5:22 ` Jeff King
2011-01-07 5:31 ` Jeff King
2011-01-07 10:04 ` Zenaan Harkness
2011-01-07 18:52 ` Ilari Liusvaara
2011-01-07 19:17 ` Jeff King
2011-01-07 21:45 ` Ilari Liusvaara
2011-01-07 21:56 ` Jeff King
2011-01-07 22:21 ` Ilari Liusvaara
2011-01-07 22:27 ` Jeff King
2011-01-10 21:07 ` Sam Vilain [this message]
2011-01-10 11:48 ` Nguyen Thai Ngoc Duy
2011-01-10 13:50 ` Nicolas Pitre
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D2B7522.9050400@vilain.net \
--to=sam@vilain.net \
--cc=fonseca@diku.dk \
--cc=git@vger.kernel.org \
--cc=ilari.liusvaara@elisanet.fi \
--cc=nico@fluxnic.net \
--cc=pclouds@gmail.com \
--cc=peff@peff.net \
--cc=roysjosh@gmail.com \
--cc=sirnot@gmail.com \
--cc=sop@google.com \
--cc=zen@freedbms.net \
/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.
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 NNTP newsgroup(s).