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

Re: git over webdav: what can I do for improving http-push ?

From
Jakub Narebski <jnareb@gmail.com>
Date
Jan 3, 2008, 21:47 UTC
Message-ID
<200801032247.02323.jnareb@gmail.com>
In-Reply-To
<20080103211521.GA4225@efreet.light.src>
Jan Hudec wrote:
Show 9 quoted lines
> On Thu, Jan 03, 2008 at 20:14:09 +0100, Grégoire Barbier wrote:
>
> > I had a quick look on bzr and hg, and it seems that bzr use the easy way 
> > (walker, no optimizations)
> 
> That's not quite true -- bzr has both dumb (walker over plain HTTP) and smart
> (CGI) methods. But their CGI is really just tunelling their custom protocol
> over HTTP and that protocol will not be anywhere near what we want for git
> because of vastly different design of the storage.
Perhaps we could also simply tunnel git protocol over HTTP / HTTPS?
 
Show 35 quoted lines
> > and hg a cgi (therefore, maybe optimizations). 
> > By quick look I mean that I sniff the HTTP queries on the network during a 
> > clone. I need to look harder...
> 
> Yes, mercurial uses a CGI. But I am not sure how similar their approach is to
> anything that would make sense for git, so looking at the details might or
> might not be useful.
> 
> > BTW I never looked at the git:// protocol. Do you think that by tunneling 
> > the git protocol in a cgi (hg uses URLs of the form 
> > "/mycgi?cmd=mycommand&...", therefore I think "tunnel" is not a bad 
> > word...) the performance would be good?
> 
> It would be pretty hard to tunnel it and it would loose all it's nice
> properties. The git protocol, for pull, basically works like this:
> 
>  - server sends a list of it's refs
>  - client tells server which ones it wants
>  - client starts listing revisions it has, newest to oldest
>  - server tells client whenever it finds common ancestor with one of the
>    heads desired
>  - client restarts the listing from next ref
>  - server starts sending the data when client runs out of refs to list
> 
> The main point about the protocol is, that the client is listing the refs, as
> fast as it can and server will stop it when it sees a revision it knows.
> Therefore there will only be one round-trip to discover each common ancestor.
> 
> However, you can't do this over HTTP, because response won't be started until
> the request is received. You could be sending a lot of smallish requests and
> quick, often empty, responses to them. However, that will waste a lot of
> bandwidth (because of the HTTP overhead) and loose much of the speed anyway.
> Also the HTTP protocol is stateless, but this is inherently stateful, so you
> would have to work that around somehow too. Therefore a different approach is
> preferable on HTTP.

Perhaps we could use AJAX (XMLHttpRequest for communication, plain HTTP or IFRAMES for sending data) or something like this for git protocol tunneling?

-- 
Jakub Narebski
Poland
Previous: Linus TorvaldsNext: Grégoire Barbier
Message 11 of 14 in “git over webdav: what can I do for improving http-push ?”
  1. Grégoire BarbierDec 30, 2007
  2. Daniel BarkalowDec 31, 2007
  3. Graham BarrDec 31, 2007
  4. Jan HudecJan 1, 2008
  5. Grégoire BarbierJan 1, 2008
  6. Jakub NarebskiJan 1, 2008
  7. Jan HudecJan 1, 2008
  8. Grégoire BarbierJan 3, 2008
  9. Jan HudecJan 3, 2008
  10. Linus TorvaldsJan 3, 2008
  11. Jakub NarebskiJan 3, 2008
  12. Grégoire BarbierJan 3, 2008
  13. Martin LanghoffJan 3, 2008
  14. Jan HudecJan 4, 2008

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.