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

Re: Resumable clone/Gittorrent (again)

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Jan 6, 2011, 01:47 UTC
Message-ID
<AANLkTi=-gomYOpX6+RSboBXBytPry1Qhf31ohmv1dC5d@mail.gmail.com>
In-Reply-To
<AANLkTikn+89iGbkt90Bv1Hndiimf4brcCNOo0HBX-oPy@mail.gmail.com>

On Thu, Jan 6, 2011 at 1:07 AM, Luke Kenneth Casson Leighton <luke.leighton@gmail.com> wrote:

Show 18 quoted lines
>  the plan is to turn that variation in the git pack-objects responses,
> across multiple peers, into an *advantage* not a liability.  how?
> like this:
>
>  * a client requiring objects from commit abcd0123 up to commit
> efga3456 sends out a DHT broadcast query to all and sundry who have
> commits abcd0123 and everything in between up to efga3456.
>
>  * those clients that can be bothered to respond, do so [refinements below]
>
>  * the requestor selects a few of them, and asks them to create git
> pack-objects.  this takes time, but that's ok.  once created, the size
> of the git pack-object is sent as part of the acknowledgement.
>
>  * the requestor, on receipt of all the sizes, selects the *smallest*
> one to begin the p2p (.torrent) from (by asking the remote client to
> create a .torrent specifically for that purpose, with the filename
> abcd0123-ebga3456).

That defeats the purpose of distributing. You are putting pressure on certain peers.

Show 7 quoted lines
>  now, an immediately obvious refinement of this is that those .torrent
> (pack-objects) "stick around", in a cache (with a hard limit defined
> on the cache size of course).  and so, when the client that requires a
> pack-object makes the request, of course, those remote clients that
> *already* have that cached pack-object for that specific commit-range
> should be given first priority, to avoid other clients from having to
> make massive amounts of git pack-objects.

Cache have its limits too. Suppose I half-fetch a pack then stop and go wild for a month. The next month I restart the fetch, the pack may no longer in cache. A new pack may or may not be identical to the old pack.

Also if you go with packs, you are tied to the peer that generates that pack. Two different peers can, in theory, generate different packs (in encoding) for the same input.

Another thing with packs (ok, not exactly with packs) is how you verify that's you have got what you asked. Bittorrent can verify every piece a peer receives because sha-1 sum of those pieces are recorded in .torrent file. We have SHA-1 all over the place, but if you don't have base objects to undeltify, you can't use those SHA-1 to verify. Verification is an important step before you advertise to other peers "I have these".

Show 6 quoted lines
> so, can you see that a) this is a far cry from the "simplistic
> transfer of blobs and trees" b) it's *not* going to overload peoples'
> systems by splattering (eek!) millions of md5 sums across the internet
> as bittorrent files c) it _does_ fit neatly into the bittorrent
> protocol d) it combines the best of git with the best of p2p
> distributed networking principles...
How can you advertise what you have to another peer?
-- 
Duy
Previous: Luke Kenneth Casson LeightonNext: Luke Kenneth Casson Leighton
Message 5 of 25 in “Resumable clone/Gittorrent (again)”
  1. Nguyen Thai Ngoc DuyJan 5, 2011
  2. Luke Kenneth Casson LeightonJan 5, 2011
  3. Thomas RastJan 5, 2011
  4. Luke Kenneth Casson LeightonJan 5, 2011
  5. Nguyen Thai Ngoc DuyJan 6, 2011
  6. Luke Kenneth Casson LeightonJan 6, 2011
  7. MaaartinJan 5, 2011
  8. Nguyen Thai Ngoc DuyJan 6, 2011
  9. Maaartin-1Jan 6, 2011
  10. Nguyen Thai Ngoc DuyJan 6, 2011
  11. Maaartin-1Jan 8, 2011
  12. Nguyen Thai Ngoc DuyJan 8, 2011
  13. Nicolas PitreJan 7, 2011
  14. Nguyen Thai Ngoc DuyJan 7, 2011
  15. Luke Kenneth Casson LeightonJan 7, 2011
  16. Nguyen Thai Ngoc DuyJan 8, 2011
  17. Luke Kenneth Casson LeightonJan 8, 2011
  18. Nguyen Thai Ngoc DuyJan 9, 2011
  19. Luke Kenneth Casson LeightonJan 9, 2011
  20. Nguyen Thai Ngoc DuyJan 9, 2011
  21. Luke Kenneth Casson LeightonJan 13, 2011
  22. Sam VilainJan 13, 2011
  23. Luke Kenneth Casson LeightonJan 14, 2011
  24. Sam VilainJan 16, 2011
  25. Sam VilainJan 10, 2011

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.