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

Re: [RFC PATCH] Introduce git-hive

From
LLLuke Kenneth Casson Leighton <luke.leighton@gmail.com>
Date
Aug 31, 2010, 15:08 UTC
Message-ID
<AANLkTinF1o0RZSKYEL9Qc=uwXx6fBBXh6wRx2CTULBSE@mail.gmail.com>
In-Reply-To
<20100831143839.GC16034@foucault.redhat.com>
On Tue, Aug 31, 2010 at 3:38 PM, Casey Dahlin <cdahlin@redhat.com> wrote:
Show 9 quoted lines
>        nguyen@host_b$ git config --add hive.uri http://myproject.org
>        nguyen@host_b$ git hive start host_a.com:21121
>
> So from host_b we specify host_a's address and listen port, and we join the
> network. From here on out anyone who also connects to host_a will get host_b's
> (randomly selected) listen port automatically and be able to connect to it as
> well.
>
> So now our two peers can see each other.
 ok - this only works if the two peers can see each other's ip
addresses.  i.e. if the two machines are either on a local subnet or
if the two machines are directly on the public internet.  ( or if
you've forced people to set up a firewall rule and/or UPnP rule, but
even then UPnP doesn't solve the entire problem - only one part of it)
 ... unless (and i haven't reviewed the code closely, i admit) you're
using the following protocol:
 * make tcp connection
 * send dedicated specific message "please tell me my public IP and port"
 * far end does sockaddr lookup of the incoming socket
 * far end returns IP and port as response to requestor

in this way, requestors can determine what the "apparent" IP address is as far as having been NAT'd through half a ton of ISP layers performing NAT, local routers performing NAT, laptops such as mine doing NAT sharing of a 3G connection over a netgear router and so on.

so it entirely depends on the scope / scale you're thinking of. if you are aiming hive at "local subnets", it's pretty much perfect, and, much as i hate to say it and you should not _remotely_ consider using it because of the vast and horrific dependencies, i can understand why you were considering avahi, because it is a good "local subnets" solution.

however for "global networking" - for putting hive out onto the public internet - there is one hell of a lot more involved, and all these "filesharing" applications have solved near as damnit every single one of the issues.

so, answering the question you were asking earlier: i believe that you really do need to consider taking the closest c-based bittorrent library/application apart, and use it as the basis for git-hive. if you don't, you will be here forever, reinventing everything that these fileshare-app-writers have spent nearly a decade perfecting.

l.
Previous: Casey DahlinNext: Casey Dahlin
Message 5 of 18 in “Introduce git-hive”
  1. Introduce git-hivecdahlin@redhat.com, Aug 30, 2010
  2. Luke Kenneth Casson LeightonAug 30, 2010
  3. Nguyen Thai Ngoc DuyAug 31, 2010
  4. Casey DahlinAug 31, 2010
  5. Luke Kenneth Casson LeightonAug 31, 2010
  6. Casey DahlinAug 31, 2010
  7. Luke Kenneth Casson LeightonAug 31, 2010
  8. Casey DahlinAug 31, 2010
  9. Kevin BallardAug 31, 2010
  10. Ilari LiusvaaraSep 1, 2010
  11. Casey DahlinSep 1, 2010
  12. Giuseppe BilottaSep 5, 2010
  13. Casey DahlinAug 31, 2010
  14. Kevin BallardAug 31, 2010
  15. Casey DahlinAug 31, 2010
  16. Tomas CarneckySep 5, 2010
  17. Casey DahlinSep 6, 2010
  18. Casey DahlinSep 6, 2010

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.