git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [ANNOUNCE] Git Merge Contributor Summit topic planning

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 1, 2017, 21:35 UTC
Message-ID
<xmqqd1f1oar5.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20170201212825.advj7f3ucnfbspbj@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 13 quoted lines
> For instance, if the server knew that XYZ meant
>
>   - send bytes m through n of packfile p, then...
>   
>   - send the object at position i of packfile p, as a delta against the
>     object at position j of packfile q
>
>   - ...and so on
>
> Then you could store very small "instruction sheets" for each XYZ that
> rely on the data in the packfiles. If those packfiles go away (e.g., due
> to a repack) that invalidates all of your current XYZ tags. That's OK as
> long as this is an optimization, not a correctness requirement.
Yes.  You can play optimization games.
Show 27 quoted lines
>> So in the real life, I think that the exchange needs to be more
>> like this:
>> 
>>     C: I need a packfile with this want/have
>>     ... C/S negotiate what "have"s are common ...
>>     S: Sorry, but our negitiation indicates that you are way too
>>        behind.  I'll send you a packfile that brings you up to a
>>        slightly older set of "want", so pretend that you asked for
>>        these slightly older "want"s instead.  The opaque id of that
>>        packfile is XYZ.  After getting XYZ, come back to me with
>>        your original set of "want"s.  You would give me more recent
>>        "have" in that request.  
>>     ... connection interrupted ...
>>     C: It's me again.  I have up to byte N of pack XYZ
>>     S: OK, resuming (or: I do not have it anymore, start from scratch)
>>     ... after 0 or more iterations C fully receives and digests XYZ ...
>> 
>> and then the above will iterate until the server does not have to
>> say "Sorry but you are way too behind" and returns a packfile
>> without having to tweak the "want".
>
> Yes, I think that is a reasonable variant. The client knows about
> seeding, but the XYZ conversation continues to happen inside the git
> protocol. So it loses flexibility versus a true CDN redirection, but it
> would "just work" when the server/client both understand the feature,
> without the server admin having to set up a separate bundle-over-http
> infrastructure.

You can also do a CDN offline as a natural extension. When the server says "Sorry, you are way too behind.", the above example tells "I'll update you to a slightly stale version first" to the client. An natural extension could say "Go update yourself to a slightly stale version first by grabbing that bundle over there."

But I agree that doing everything in-line may be a logical and simpler first step to get there.

Previous: Jeff KingNext: Stefan Beller
Message 8 of 9 in “[ANNOUNCE] Git Merge Contributor Summit topic planning”
  1. Jeff KingJan 31, 2017
  2. Jeff KingJan 31, 2017
  3. Christian CouderFeb 1, 2017
  4. Erik van ZijstFeb 1, 2017
  5. Jeff KingFeb 1, 2017
  6. Junio C HamanoFeb 1, 2017
  7. Jeff KingFeb 1, 2017
  8. Junio C HamanoFeb 1, 2017
  9. Stefan BellerFeb 1, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.