From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Shawn Pearce <spearce@spearce.org>, git <git@vger.kernel.org>
Subject: Re: RFC: Resumable clone based on hybrid "smart" and "dumb" HTTP
Date: Thu, 11 Feb 2016 13:32:22 -0800 [thread overview]
Message-ID: <xmqq4mdfvspl.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20160210214945.GA5853@sigill.intra.peff.net> (Jeff King's message of "Wed, 10 Feb 2016 16:49:46 -0500")
Jeff King <peff@peff.net> writes:
> ... One
> alternative would be to amend the bundle format so that rather than a
> single file, you get a bundle header whose end says "...and my matching
> packfile is 1234-abcd". And then the client knows that they can fetch
> that separately from the same source.
I would imagine that we would introduce bundle v3 format for this.
It may want to say "my matching packfiles are these" to accomodate a
set of packs split at max-pack-size, but I am perfectly fine to say
you must create a single pack when you use a bundle with separate
header to keep things simpler.
> It's an extra HTTP request, but it makes the code for client _and_
> server way simpler. So the whole thing is basically then:
>
> 0. During gc, server generates pack-1234abcd.pack. It writes matching
> tips into pack-1234abcd.info, which is essentially a bundle file
> whose final line says "pack-1234abcd.pack".
OK.
> 1. Client contacts server via any git protocol. Server says
> "resumable=<url>". Let's says that <url> is
> https://example.com/repo/clones/1234abcd.bundle.
>
> 2. Client goes to <url>. They see that they are fetching a bundle,
> and know not to do the usual smart-http or dumb-http protocols.
> They can fetch the bundle header resumably (though it's tiny, so it
> doesn't really matter).
Might be in megabytes range, though, with many refs. It still is
tiny, though ;-).
> 3. After finishing the bundle header, they see they need to grab the
> packfile. Based on the bundle header's URL and the filename
> contained within it, they know to get
> https://example.com/repo/clones/pack-1234abcd.pack". This is
> resumable, too.
OK.
> 4. Client clones from bundled pack as normal; no root-finding magic
> required.
I like this part the most.
> 5. Client runs incremental fetch against original repo from step 1.
>
> And you'll notice, too, that all of the bundle-http magic kicks in
> during step 2 because the client sees they're grabbing a bundle. Which
> means that the <url> in step 1 doesn't _have_ to be a bundle. It can be
> "go fetch from kernel.org, then come back to me".
Or it could be a packfile (and the client discovers roots), as you
mentioned in a separate message. I personally do not think it buys
us much, as long as we do a bundle represented as a header and a
separate pack.
next prev parent reply other threads:[~2016-02-11 21:32 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-10 18:59 RFC: Resumable clone based on hybrid "smart" and "dumb" HTTP Shawn Pearce
2016-02-10 20:11 ` Shawn Pearce
2016-02-10 20:23 ` Stefan Beller
2016-02-10 20:57 ` Junio C Hamano
2016-02-10 21:22 ` Jonathan Nieder
2016-02-10 22:03 ` Jeff King
2016-02-10 21:01 ` Jonathan Nieder
2016-02-10 21:07 ` Junio C Hamano
2016-02-11 3:43 ` Junio C Hamano
2016-02-11 18:04 ` Shawn Pearce
2016-02-11 23:53 ` Duy Nguyen
2016-02-13 5:07 ` Junio C Hamano
2016-02-10 21:49 ` Jeff King
2016-02-10 22:17 ` Jonathan Nieder
2016-02-10 23:03 ` Jeff King
2016-02-10 22:40 ` Junio C Hamano
2016-02-11 21:32 ` Junio C Hamano [this message]
2016-02-11 21:46 ` Jeff King
2016-02-13 1:40 ` Blake Burkhart
2016-02-13 17:00 ` Jeff King
2016-02-14 2:14 ` Shawn Pearce
2016-02-14 17:05 ` Jeff King
2016-02-14 17:56 ` Shawn Pearce
2016-02-16 18:34 ` Stefan Beller
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=xmqq4mdfvspl.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=spearce@spearce.org \
/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).