Re: [hybi] WebTransport Side Meeting (Tuesday, 15:20)

Andy Green <andy@warmcat.com> Wed, 14 August 2019 12:01 UTC

Return-Path: <andy@warmcat.com>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2DD9B12006F; Wed, 14 Aug 2019 05:01:31 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rPEzxms_9fHc; Wed, 14 Aug 2019 05:01:29 -0700 (PDT)
Received: from warmcat.com (warmcat.com [46.105.127.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0088812010F; Wed, 14 Aug 2019 05:01:28 -0700 (PDT)
Date: Wed, 14 Aug 2019 13:01:14 +0100
User-Agent: K-9 Mail for Android
In-Reply-To: <CAAZdMaeeOrNMT40dPNaOse04haTB_LB+_94-ydbaq_DvydwgYA@mail.gmail.com>
References: <CAAZdMacqbqYVs4MeoE-ahukgLzf0+nNhNip4HTGThobXhqCceQ@mail.gmail.com> <5c631764-25e2-ce37-3f84-8eca5a8378eb@warmcat.com> <CAAZdMaeeOrNMT40dPNaOse04haTB_LB+_94-ydbaq_DvydwgYA@mail.gmail.com>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
To: Victor Vasiliev <vasilvv@google.com>
CC: dispatch@ietf.org, David Schinazi <dschinazi@google.com>, hybi@ietf.org, IETF QUIC WG <quic@ietf.org>, HTTP Working Group <ietf-http-wg@w3.org>, webtransport@ietf.org
From: Andy Green <andy@warmcat.com>
Message-ID: <9BF912A7-07AF-4174-99F0-7A8F9ED2A44C@warmcat.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/hybi/Qzd_0W_ZlxV6F74roPKburaHZMQ>
Subject: Re: [hybi] WebTransport Side Meeting (Tuesday, 15:20)
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/hybi/>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 14 Aug 2019 12:01:31 -0000


On August 14, 2019 12:13:20 PM GMT+01:00, Victor Vasiliev <vasilvv@google.com>; wrote:
>On Mon, Jul 22, 2019 at 5:00 PM Andy Green <andy@warmcat.com>; wrote:
>
>>
>>
>> On 7/22/19 1:36 PM, Victor Vasiliev wrote:
>> > Hello everyone,
>> >
>> > Today, at the dispatch working group meeting (18:10), I am going to
>> > present WebTransport. WebTransport is a protocol framework that
>allows
>> > multiplexed and datagram-oriented transport protocols to be used by
>the
>> > web applications (think “WebSocket for UDP”).
>>
>> "Historically, web applications that needed bidirectional data stream
>>     between a client and a server could rely on WebSockets [RFC6455],
>a
>>     message-based protocol compatible with Web security model. 
>However,
>>     since the abstraction it provides is a single ordered stream of
>>     messages, it suffers from head-of-line blocking (HOLB), meaning
>that
>>     all messages must be sent and received in order even if they are
>>     independent and some of them are no longer needed.  This makes it
>a
>>     poor fit for latency sensitive applications which rely on partial
>>     reliability and stream independence for performance."
>>
>> The HOLB isn't really entirely the case... RFC6455 ws allows
>arbitrary
>> fragmentation of messages allowing interleaving with control frames.
>>
>
>It allows them to be fragmented, but the fragments have to be in order.
>The multiplexing extension is mentioned as potential future work in RFC
>6455, but I don't believe it ever actually materialized.

Yes, you can only have one message on the go at a time; in that sense large messages block it.  But it does not block the stream completely because you can issue control frames inbetween fragments.  And although you may not have control over fragment size since intermediaries can mess with it, as the sender you do have control over message size which puts a ceiling on both how long other messages are blocked, and the max fragment size.  You may choose to split a large logical message into smaller ones so other message content can get a look-in.

The mux extension stuff was a thing on hybi for a while and then the main proponent seemed to lose interest with muxed ws vs h2... h2 was clearly a better result than he could have gotten from ws.

>> ws-over-h2 allows you to can the h2 stream when you want as well.
>>
>
>True, though you can't use them in the same way as pure QUIC streams
>because QUIC streams are created immediately, whereas a new WS requires
>a
>handshake.

Sure... for clarity I also think h1 ws if not competitive itself with h2 or quic.  But it is widely implemented and deployed, and h2 doesn't have a native equivalent.  So it's still kind of keeping its hand in.

>
>>
>> " Each new stream would require a WebSocket handshake to agree on
>>        application protocol used, meaning that it would take at least
>one
>>        RTT for each new stream before the client can write to it."
>>
>> Yes it was knowingly done as a hack to try to encourage uptake from
>> browser vendors... it's not really integrated into the encapsulating
>> protocol.
>>
>
>It = ws-over-http2 being a thin overlay over existing WSP?

Yeah.  It's implemented in ffox and chrome but not turned on by default last time I looked.  There are few server implementations which makes it chicken-and-egg.

>
>> >   * WebTransport overview:
>> >     https://tools.ietf.org/html/draft-vvv-webtransport-overview-00
>> >   * QuicTransport:
>> >     https://tools.ietf.org/html/draft-vvv-webtransport-quic-00
>> >   * Http3Transport:
>> >     https://tools.ietf.org/html/draft-vvv-webtransport-http3-00
>>
>> There's no h2 transport implementation?
>>
>> Not everything that might want to use this will get h3 capability in
>a
>> reasonable timeframe.  If there's more momentum behind it than
>RFC8441
>> there's probably room for a generic long-lived bidirectional
>extension
>> to h2 either reusing DATA or a new frame type.
>>
>
>I think we might adapt an HTTP/2 transport as well
>(via draft-kinnear-httpbis-http2-transport).

Sounds good.

>> It's a good idea to have it ride on other protocols.  Not doing this
>> really hurt RFC6455 ws since deploying it usually needed extra,
>> different servers with the attendant difficulties interoperating with
>> other protocols.
>>
>
>One idea I had is an object called FallbackTransport, that can simulate
>QUIC semantics on top of WebSocket and be fully polyfillable in
>browsers.

In this space the problem isn't really ideas but implementation buy-in.  RFC8441 is educational because it was well positioned politically, the rfc certainly was exemplary for just saying what it needed to say, it solved a real problem, got some key implementations yet has still not been able to reach escape velocity.  There's some psychological and architectural gap between ws and http that is much wider than you would expect for many people (cf h2 addressed every single h1 + html 5 technology except ws -- and it was not an accidental oversight).

RFC8441 went in Chrome... it hasn't been enough by itself.  Maybe the crossover with quic will help your thing over the hump.

>> I really suggest thinking through the effects of not having an
>RFC6455
>> type subprotocol (unless I failed to spot it).  It really makes an
>> implicit assumption about what the stream will carry that doesn't
>scale
>> beyond one server carrying one thing.  That's not how things tend to
>pan
>> out if the protocol is useful.  The url path could be hacked to imply
>> the subprotocol but if that's not standardized it's still a mess. 
>And
>> the subprotocol binding may be orthogonal to the url layout
>complicating
>> things needlessly.
>>
>
>That's definitely an open issue with current proposal (some discussion
>here
><https://github.com/WICG/web-transport/issues/26>).   The current
>problem
>is that we basically have to choose between either transmitting the
>requested protocol in the open, or paying one extra RTT for the
>protocol
>selection mechanism.

Usually the guy who directed the client to that server does it knowing that the server has the subprotocol he wants, unless something has gone wrong.  And it's only client -> server direction pipelining in question; the server can't send anything until he's had the request and he definitively decided the negotiated subprotocol by then, or killed the stream.

A client that had hot data to send could mark his preferred subprotocol as being non-neogitiable and start issuing data immediately after the stream open request... all being well the server allowed the stream's subprotocol, it lives on and takes the data, in the case it rejected the subprotocol it closes the stream and discards the data.  The client would have to either fail or retry without the non-neotiable part to recover if so.  But typically, he's only talking to the server because he's pretty sure it'll talk his subprotocol and it'll work the first time.

-Andy