git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* Git Smart HTTP with HTTP/2.0
@ 2015-07-11  3:10 ForceCharlie
  2015-07-11  7:00 ` Ilari Liusvaara
  0 siblings, 1 reply; 5+ messages in thread
From: ForceCharlie @ 2015-07-11  3:10 UTC (permalink / raw)
  To: git

As we known, HTTP/2.0 has been released. All Git-Smart-HTTP are currently
implemented using HTTP/1.1.

Frequently used Git developers often feel Git HTTP protocol is not
satisfactory, slow and unstable.This is because the HTTP protocol itself
decides
When HTTP/2.0 is published. We might be able to git developers jointly,
based on HTTP/2.0 Git-Smart-HTTP service and client support.
HTTP/2.0: https://tools.ietf.org/html/rfc7540
Github Mirror: https://httpwg.github.io/specs/rfc7540.html
HTTP/2.0 has Flow Controller like SSH, 
HTTP/2.0 has Server Push POST upload-pack can download large more
object-pack

......
libcurl now has begun to support HTTP/2.0, git is also using curl, as well
libgit2 may use libcurl
I suggest the git of developer joint developer of libgit2 and jgit
developers discussion based on HTTP/2.0 Git-Smart-HTTP
Now Subversion developer begin write a New HTTP Protocol for svn ("HTTP
v2"):http://svn.apache.org/repos/asf/subversion/trunk/notes/http-and-webdav/
http-protocol-v2.txt
What about git ?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Git Smart HTTP with HTTP/2.0
  2015-07-11  3:10 Git Smart HTTP with HTTP/2.0 ForceCharlie
@ 2015-07-11  7:00 ` Ilari Liusvaara
  2015-07-11 17:23   ` Shawn Pearce
  0 siblings, 1 reply; 5+ messages in thread
From: Ilari Liusvaara @ 2015-07-11  7:00 UTC (permalink / raw)
  To: ForceCharlie; +Cc: git

On Sat, Jul 11, 2015 at 11:10:48AM +0800, ForceCharlie wrote:
> As we known, HTTP/2.0 has been released. All Git-Smart-HTTP are currently
> implemented using HTTP/1.1.

Nit: It is HTTP/2.
 
> Frequently used Git developers often feel Git HTTP protocol is not
> satisfactory, slow and unstable.This is because the HTTP protocol itself
> decides

Note that there are already two versions of HTTP transport, the old "dumb"
one and the newer "smart" one.

The smart one is difficult to speed up (due to nature of the negotiations),
but usually is pretty reliable (the efficiency isn't horrible).

Now, the old "dumb" protocol is pretty unreliable and slow. HTTP/2 probably
can't do anything with the reliability problems, but probably could improve
the speed a bit.

Websockets over HTTP/2 (a.k.a. "websockets2") has not been defined yet.
With Websockets(1), it would probably already be possible to tunnel the
native git smart transport protocol over it. Probably not worth it.

> When HTTP/2.0 is published. We might be able to git developers jointly,
> based on HTTP/2.0 Git-Smart-HTTP service and client support.
> HTTP/2.0: https://tools.ietf.org/html/rfc7540

Well, it is published already.
 

-Ilari

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Git Smart HTTP with HTTP/2.0
  2015-07-11  7:00 ` Ilari Liusvaara
@ 2015-07-11 17:23   ` Shawn Pearce
  2015-07-11 18:26     ` Ilari Liusvaara
  0 siblings, 1 reply; 5+ messages in thread
From: Shawn Pearce @ 2015-07-11 17:23 UTC (permalink / raw)
  To: Ilari Liusvaara; +Cc: ForceCharlie, git

On Sat, Jul 11, 2015 at 12:00 AM, Ilari Liusvaara
<ilari.liusvaara@elisanet.fi> wrote:
> On Sat, Jul 11, 2015 at 11:10:48AM +0800, ForceCharlie wrote:
>> As we known, HTTP/2.0 has been released. All Git-Smart-HTTP are currently
>> implemented using HTTP/1.1.
>
> Nit: It is HTTP/2.
>
>> Frequently used Git developers often feel Git HTTP protocol is not
>> satisfactory, slow and unstable.This is because the HTTP protocol itself
>> decides
>
> Note that there are already two versions of HTTP transport, the old "dumb"
> one and the newer "smart" one.
>
> The smart one is difficult to speed up (due to nature of the negotiations),
> but usually is pretty reliable (the efficiency isn't horrible).

The negotiation in smart-HTTP actually has some bad corner cases. Each
round of negotiation requires a new POST resupplying all previously
agreed upon SHA-1s, and a batch of new SHA-1s. We have observed many
rounds where this POST is MiBs in size because the peers can't quite
agree and have to keep digging through history.

The native protocol on git:// and SSH is not as bad. Negotiation is
still many rounds, but these are pipelined and each round does not
need to repeat the prior round, as the server has a single stream and
is saving state.

> Now, the old "dumb" protocol is pretty unreliable and slow. HTTP/2 probably
> can't do anything with the reliability problems, but probably could improve
> the speed a bit.
>
> Websockets over HTTP/2 (a.k.a. "websockets2") has not been defined yet.
> With Websockets(1), it would probably already be possible to tunnel the
> native git smart transport protocol over it. Probably not worth it.

Another option is to tunnel using gRPC (grpc.io). libcurl probably
can't do this. And linking grpc.io library into git-core is crazy. So
its probably a non-starter. But food for thought.

But, at $DAY_JOB we tunnel the native bidirectional protocol in
grpc.io's predecessor, and it works quite well for us.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Git Smart HTTP with HTTP/2.0
  2015-07-11 17:23   ` Shawn Pearce
@ 2015-07-11 18:26     ` Ilari Liusvaara
  2015-07-11 23:10       ` Shawn Pearce
  0 siblings, 1 reply; 5+ messages in thread
From: Ilari Liusvaara @ 2015-07-11 18:26 UTC (permalink / raw)
  To: Shawn Pearce; +Cc: ForceCharlie, git

On Sat, Jul 11, 2015 at 10:23:09AM -0700, Shawn Pearce wrote:
> On Sat, Jul 11, 2015 at 12:00 AM, Ilari Liusvaara
> <ilari.liusvaara@elisanet.fi> wrote:
> > On Sat, Jul 11, 2015 at 11:10:48AM +0800, ForceCharlie wrote:
> >
> >> Frequently used Git developers often feel Git HTTP protocol is not
> >> satisfactory, slow and unstable.This is because the HTTP protocol itself
> >> decides
> >
> > Note that there are already two versions of HTTP transport, the old "dumb"
> > one and the newer "smart" one.
> >
> > The smart one is difficult to speed up (due to nature of the negotiations),
> > but usually is pretty reliable (the efficiency isn't horrible).
> 
> The negotiation in smart-HTTP actually has some bad corner cases. Each
> round of negotiation requires a new POST resupplying all previously
> agreed upon SHA-1s, and a batch of new SHA-1s. We have observed many
> rounds where this POST is MiBs in size because the peers can't quite
> agree and have to keep digging through history.

Oh yeah that... Well, that is artifact of HTTP semantics.

> > Now, the old "dumb" protocol is pretty unreliable and slow. HTTP/2 probably
> > can't do anything with the reliability problems, but probably could improve
> > the speed a bit.
> >
> > Websockets over HTTP/2 (a.k.a. "websockets2") has not been defined yet.
> > With Websockets(1), it would probably already be possible to tunnel the
> > native git smart transport protocol over it. Probably not worth it.
> 
> Another option is to tunnel using gRPC (grpc.io). libcurl probably
> can't do this. And linking grpc.io library into git-core is crazy. So
> its probably a non-starter. But food for thought.

Wouldn't it link into git-remote-http (and on the server side, one
could use pipes to talk to git)?

But supporting websockets in git-remote-http could get annoying,
especially for wss:// (https://). Dunno how bad gRPC would be.



-Ilari

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Git Smart HTTP with HTTP/2.0
  2015-07-11 18:26     ` Ilari Liusvaara
@ 2015-07-11 23:10       ` Shawn Pearce
  0 siblings, 0 replies; 5+ messages in thread
From: Shawn Pearce @ 2015-07-11 23:10 UTC (permalink / raw)
  To: Ilari Liusvaara; +Cc: ForceCharlie, git

On Sat, Jul 11, 2015 at 11:26 AM, Ilari Liusvaara
<ilari.liusvaara@elisanet.fi> wrote:
> On Sat, Jul 11, 2015 at 10:23:09AM -0700, Shawn Pearce wrote:
>>
>> > Websockets over HTTP/2 (a.k.a. "websockets2") has not been defined yet.
>> > With Websockets(1), it would probably already be possible to tunnel the
>> > native git smart transport protocol over it. Probably not worth it.
>>
>> Another option is to tunnel using gRPC (grpc.io). libcurl probably
>> can't do this. And linking grpc.io library into git-core is crazy. So
>> its probably a non-starter. But food for thought.
>
> Wouldn't it link into git-remote-http (and on the server side, one
> could use pipes to talk to git)?
>
> But supporting websockets in git-remote-http could get annoying,
> especially for wss:// (https://). Dunno how bad gRPC would be.

We wrote it as git-remote-$THING, invoked with $THING:// URLs. And
git-remote-$THING just implements the "connect" helper protocol. Its
much simpiler than git-remote-http.

Maybe its done that way in git-core as http2:// aka git-remote-http2.

Or the git-remote-http helper connects to the remote system and tries
to guess if it supports Git on HTTP/2 before responding to the
capabilities request from transport code. If yes, it replies with
connect, if no, it does the current fetch and push protocol.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-07-11 23:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-11  3:10 Git Smart HTTP with HTTP/2.0 ForceCharlie
2015-07-11  7:00 ` Ilari Liusvaara
2015-07-11 17:23   ` Shawn Pearce
2015-07-11 18:26     ` Ilari Liusvaara
2015-07-11 23:10       ` Shawn Pearce

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).