Re: [dispatch] Dispatching WebTransport

Peter Thatcher <pthatcher@google.com> Mon, 08 July 2019 18:48 UTC

Return-Path: <pthatcher@google.com>
X-Original-To: dispatch@ietfa.amsl.com
Delivered-To: dispatch@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B82721206F4 for <dispatch@ietfa.amsl.com>; Mon, 8 Jul 2019 11:48:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -16.204
X-Spam-Level:
X-Spam-Status: No, score=-16.204 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_MESSAGE=0.001, PDS_NO_HELO_DNS=1.295, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.com
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 xBv5ZJkltaQB for <dispatch@ietfa.amsl.com>; Mon, 8 Jul 2019 11:48:52 -0700 (PDT)
Received: from mail-vs1-xe2f.google.com (mail-vs1-xe2f.google.com [IPv6:2607:f8b0:4864:20::e2f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7D57B120738 for <dispatch@ietf.org>; Mon, 8 Jul 2019 11:48:17 -0700 (PDT)
Received: by mail-vs1-xe2f.google.com with SMTP id u3so8900522vsh.6 for <dispatch@ietf.org>; Mon, 08 Jul 2019 11:48:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9W7vZ91kfCiohRf/RF8Dob18AIHm59SGwc91LE+ifI8=; b=LH29mj08dim0Zs5KubDldj0q/1ePDUH482Kg4aUiftcMZQRfRbDU4isZ3k2zuZeLCO FZhiYsxZ4Lzg+T1pNQ30PQVZ0dd45klXHsdk+b7S4e4ycK4XCkjXZxya18llv8/EACcX Nng+KYkcUoqLfoonhFmFajOJph/2WIiflZeNme8pETO1Li5cvez9bwiHkUpym2NmX5xE jm21RTU5wabscjkQAgXCv1qujZLMz/p+U8Ha7ChzFiAdzqRyGgVOLsTIFaxKe+eV5G/+ I1OW9mjgg2q8exrNTxuHK+dAU4eDL3rs5Xprwj78F/s7b5xvcRSwcWm8MnlS371bD7mH 6XpA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9W7vZ91kfCiohRf/RF8Dob18AIHm59SGwc91LE+ifI8=; b=QHz/io/LEYNeTWi+ozopfTnysf0Ux3Sr+/pGcMyI4u3urtN0dWiOIAwSD78R0MJkKz 0/+V4fzJfP8LRZ1UUJdw2gwBSsabbltMv79Vfdp82Ok23QsDiRlwXPkQ0ldTDxSa2YRl SaWSneO76qZgCrjPkslCrGDO0Lzu+mbirH7KpiUql32GhEJAwGXP36ExU3gV377pNsGR cn+g97dsLg73GL/i7KWVLLX4c7Pg9fhFNmVcEnhSpxPpEW3AO8h3raH/8oTzkOofwI6F lB7iQhqSn4uPWzDgisgzSyLH9ZJzMe7qHLM0N3Erx0vbfxtgq/eTe0AzuNdCR8X3Cj9B sC6A==
X-Gm-Message-State: APjAAAUyTOmKwZbRWWMvQzgCeqAIEk/hGCTyy1Cz9zVihPBHRBvMaQ9r s729LGRb8Yn0RWNE6BRqNrKBDkdiKAKDos3yn7o9ThLUiTBVQw==
X-Google-Smtp-Source: APXvYqzaRVsZiT9yADIuiQH2Rixdrmu1L7OLKnMrpf2f4Mo4GUtSJKVxQEHETCXpiK+iGdS6j1ykn6Y9hbbwND+LW2U=
X-Received: by 2002:a67:e41a:: with SMTP id d26mr11237795vsf.71.1562611695787; Mon, 08 Jul 2019 11:48:15 -0700 (PDT)
MIME-Version: 1.0
References: <CAAZdMadKgUkAwnYQ7MmSR46qQZTh8+FF5BuKmc1r33SMyF91sQ@mail.gmail.com> <98EF12E4-4BF2-4FBC-852B-776A0E0118BE@westhawk.co.uk> <CAJrXDUGubsbRV7_FinKr_r1m+MkBBXSVw=O-3oH31+UOJGjNtw@mail.gmail.com> <C4581B8C-0B33-4A6E-B149-E4253AE33F53@westhawk.co.uk>
In-Reply-To: <C4581B8C-0B33-4A6E-B149-E4253AE33F53@westhawk.co.uk>
From: Peter Thatcher <pthatcher@google.com>
Date: Mon, 08 Jul 2019 11:47:39 -0700
Message-ID: <CAJrXDUF8=V0SQkOr4jp0hpVvgFytAzjGCz4-adUA3XrRA7GGEw@mail.gmail.com>
To: westhawk <thp@westhawk.co.uk>
Cc: Victor Vasiliev <vasilvv=40google.com@dmarc.ietf.org>, dispatch@ietf.org
Content-Type: multipart/alternative; boundary="0000000000000d2dce058d2fe3a8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/dispatch/mplrD2pdfZ2YPZZAev3Mzk2RAWE>
Subject: Re: [dispatch] Dispatching WebTransport
X-BeenThere: dispatch@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DISPATCH Working Group Mail List <dispatch.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dispatch>, <mailto:dispatch-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dispatch/>
List-Post: <mailto:dispatch@ietf.org>
List-Help: <mailto:dispatch-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dispatch>, <mailto:dispatch-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 08 Jul 2019 18:48:56 -0000

On Tue, Jul 2, 2019 at 1:22 AM westhawk <thp@westhawk.co.uk> wrote:

> (Top post  - the quote level was getting unwieldy so I’ve trimmed quite a
> bit from the discussion - hopefully it still makes sense)
>
> On 2 Jul 2019, at 01:10, Peter Thatcher <pthatcher@google.com> wrote:
>
>
>
> On Mon, Jun 17, 2019 at 7:13 AM T H Panton <thp@westhawk.co.uk> wrote:
>
>>
>>
>> On 17 Jun 2019, at 14:35, Victor Vasiliev <
>> vasilvv=40google.com@dmarc.ietf.org> wrote:
>>
>> Hello friendly IETF dispatchers,
>>
>> I am writing about new work I want to bring to IETF.  The proposal is
>> called WebTransport.  It’s a combination of a Web API currently under
>> development in W3C WICG [0], a protocol framework and some protocols that
>> fit into that framework.  Combined, they would allow web applications to
>> establish WebSocket-like connections that instead of ordered reliable
>> messages use multiple streams and datagrams (datagrams are unreliable and
>> streams do not have head-of-line blocking).  This is highly useful for
>> real-time and other latency sensitive applications.
>>
>>
>> Establish connections to where ? Between eachother P2P ? Or to any
>> server? Or just to the originating server only?
>>
>
> Any server or p2p.
>
>
>
> Ok, great, but the requirements are different, and the OP seemed to be
> claiming simplifications that to my mind only work
> client - server.
>
>
>  In client/server mode, WebTransport doesn't require any of that, so it is
> a lot more simple.
>
>
> Right. See above. But that becomes a null statement if you do want P2P
> support .
>
>
> Work is in progress decoupling the APIs from the (dreaded) SDP and
>> simplifying the developer experience.
>>
>>
> What work?
>
>
> Slow, slow, adoption of the ORTC interfaces.
>

>
>> That said, it is by no means un-managable - I've implemented pretty much
>> the whole stack from scratch for small devices and I know of 2 other
>> implementations which don't use libusrsctp
>>
>>
> Maybe not for you, but we regularly get emails from people saying things
> like "It would be great to delete the mess of the WebRTC stack if there's a
> simpler protocol available. ICE/DTLS/SCTP all scare me”.
>
>
> Yeah, but not as much as ICE/QUIC-RT scares me. (which by the way isn’t
> documented _anywhere_).
>
>
>
>>
>>
>> Even among the people who got past the complexity barrier, the feedback I
>> heard almost universally is that WebRTC Data Channels are hard to work
>> with.  From the feedback I gathered, the main problem is usually around the
>> transport protocol itself.  Userspace SCTP is essentially a monoculture:
>> virtually all implementations use libusrsctp, a 80,000-line adaptation of
>> FreeBSD SCTP implementation.  This lack of tool choice is fairly painful
>> since latency-sensitive real-time applications often require quite a bit of
>> tuning on the transport side to get the best performance (custom congestion
>> control, etc).  In addition, the limitations on the message size stemming
>> from both the API itself and the lack of widespread support for message
>> interleaving (RFC 8260) means that the developers have to roll their own
>> framing on top of SCTP messages if they want to avoid head-of-line-blocking
>> (this is particularly bad because the framing overhead in data channels is
>> already large as-is).
>>
>>
>> SCTP is well defined nice protocol that suffers (IMHO) from a lack of
>> 'coolness' due to being used by the telcos for most of it's life.
>> The head-of-line issue is a problem, but entirely fixable with small
>> tweaks to SCTP protocol. (read it wasn't in the original requirements - so
>> it doesn't do it).
>>
>
> It's been fixable for a very long time.  I have my doubts about when it
> will actually get fixed.
>
>
> With that being the view from a browser team you can see why people choose
> not to donate time to submit patches that fix it.
>
>
>
>>
>>
>> In summary, we have a system that technically provides what everyone
>> wants, but that nobody is happy with, and that is not usable by all but the
>> most well-resourced users.
>>
>>
>> I'd point out that 2.5bn endpoints support it right now - including
>> _every_ smartphone shipped in the last 2 years. Last I heard DataChannel
>> traffic was 0.1% of chrome's traffic
>> which is _astonishingly_ high
>>
>
>>
>> # Proposal
>>
>> Our initial idea for fixing this was to take QUIC and do what WebSocket
>> did to TCP: add security features that would make it safe to expose on the
>> Web (by adding origin checks, etc), but otherwise expose it as-is.  This
>> would get us out of libusrsctp monoculture (QUIC is not yet finished, but
>> it already has a fairly diverse implementation ecosystem, see [3]), and
>> remove all P2P-related complexity involving SDP and ICE.  The original
>> proposal for that was called QuicTransport; we showed it to various people,
>> and the feedback we got is that (1) the API should not be tied to a
>> particular transport (since we already switched once from SCTP to QUIC,
>> tying it to QUIC specificially would not be wise), and (2) it shouldn’t
>> fail hard when QUIC is unavailable.
>>
>>
>> It would be _great_ if that abstraction could _also_ work over SCTP data
>> channels. That way you could cover the P2P use cases too.
>>
>
> QUIC can be p2p.  In fact, we already have it implemented in Chrome (in an
> original trial).
>
>
> On top of ICE with a laughable security model no media and no RFC - not a
> good basis (yet) for others to implement.
>
>
It's the same security model as the RTCDataChannel uses, and it can
transfer media just fine (transport doesn't care if it's media or not).  As
for RFCs, there are ICE and QUIC RFCs.  What more do you need?  If you
tried to write a "ICE + QUIC" RFC, I'm pretty sure it would be all
boilerplate and no actual text.

>
> The WebTransport API could run on top of SCTP, and you could probably make
> a JS polyfill for it.  But I'm not sure why anyone would bother.
>
>
> 2.5 billion shipped endpoints. near 100% penetration in smartphones today.
>
>
>> I'd really like to be clear what that problem is.
>>
>>
> Web developers routinely ask for an unreliable websocket, or something
> close to UDP (but it needs to be secure).   It turns out that ICE/DTLS/SCTP
> is too complex to fill that roll.
>
>
> I agree. If they want unreliable websockets to their servers, then we can
> cut out most of the layers and produce something based on QUIC
> very simply. If they want P2P and want it to carry media (especially
> audio) then there is a _lot_ of work to do to ensure it is usable, secure
> etc.
>
>
When you say "a lot" of work, what do you mean?  You can already send audio
on top of the QUIC-based WebTransport we have in origin trial and it's
usable and secure.  It would be nice to have low-level audio codec APIs in
the browser (which we are working on), but it's feasible to do audio codecs
in WASM in conjunction with WebAudio.

The only thing that seems like an issue is proving out whether or not one
can implement a good audio jitter buffer in WASM/JS (or port NetEq).  That
is work left to be done, indeed.  Is that what you were referring to?



> It seems to me the right way forward is to define a data-only interface
> and PoC implementation that:
>
> 1) works with QUIC to the originating server almost immediately on one or
> 2 of the QUIC stacks
>

I'm not completely sure what you mean here by "one or two of the QUIC
stacks", but see #3 below for code that can (hopefully soon) can do the
server side.

2) has a polyfill on top of data channels so it can be used P2P immediately
>
 3) a companion GOLang/python server side implementation on top of the
existing webRTC (non usrsctp) libraries.

I have one in progress:
https://github.com/pthatcherg/quic-go/blob/gquic/example/webtransport/server.go
.
I don't quite have it working, but it's close.

And there is also this one:
https://github.com/pion/webrtc/blob/736e0bb5062c473a61d9aae0dbb3bac7f32db377/quictransport.go

4) serves as a target/requiements for the necessary protocol work on Quic-RT
>
> The realtime media can be added later.
>
> T.
>
>
>
>