git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Jan Hudec <bulb@ucw.cz>
Cc: "Grégoire Barbier" <gb@gbarbier.org>, git@vger.kernel.org
Subject: Re: git over webdav: what can I do for improving http-push ?
Date: Thu, 3 Jan 2008 22:47:01 +0100	[thread overview]
Message-ID: <200801032247.02323.jnareb@gmail.com> (raw)
In-Reply-To: <20080103211521.GA4225@efreet.light.src>

Jan Hudec wrote:
> 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?
 
> > 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

  parent reply	other threads:[~2008-01-03 21:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-30 22:59 git over webdav: what can I do for improving http-push ? Grégoire Barbier
2007-12-31  3:46 ` Daniel Barkalow
2007-12-31 16:57   ` Graham Barr
2008-01-01 11:33     ` Jan Hudec
2008-01-01 11:41       ` Grégoire Barbier
2008-01-01 18:12         ` Jakub Narebski
2008-01-01 20:23           ` Jan Hudec
2008-01-03 19:14             ` Grégoire Barbier
2008-01-03 21:15               ` Jan Hudec
2008-01-03 21:43                 ` Linus Torvalds
2008-01-03 21:47                 ` Jakub Narebski [this message]
2008-01-03 23:29                   ` Grégoire Barbier
2008-01-03 23:54                 ` Martin Langhoff
2008-01-04 19:59                   ` Jan Hudec

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200801032247.02323.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=bulb@ucw.cz \
    --cc=gb@gbarbier.org \
    --cc=git@vger.kernel.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.
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 NNTP newsgroup(s).