Re: [Webtransport] Does WebTransport need a reliable, in-order message abstraction?

Bernard Aboba <bernard.aboba@gmail.com> Mon, 27 July 2020 12:21 UTC

Return-Path: <bernard.aboba@gmail.com>
X-Original-To: webtransport@ietfa.amsl.com
Delivered-To: webtransport@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 365A43A0DD9 for <webtransport@ietfa.amsl.com>; Mon, 27 Jul 2020 05:21:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 iMHPJO-J8YG6 for <webtransport@ietfa.amsl.com>; Mon, 27 Jul 2020 05:21:18 -0700 (PDT)
Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) (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 5A6803A1916 for <webtransport@ietf.org>; Mon, 27 Jul 2020 05:21:18 -0700 (PDT)
Received: by mail-lj1-x234.google.com with SMTP id q7so16990473ljm.1 for <webtransport@ietf.org>; Mon, 27 Jul 2020 05:21:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=g8japqi3JfjTtFI9w/NXv1nO9ztuzr0xPaWzgk5WAns=; b=ArxYBRdlO/NYDCWd164IsMM9fiiCJNHwDpApzbNIVZXVA3UG+BiNpz24xJrCNs8Z1f Ghjyv2aYO45kA8zzeSc2ClS1sxRD5gPJlJAtwrJsNIp902J3KKU4jpiNPHsfFLNmav+o twlLnRfN1o6tREhLw/T29QBA1TOsBsfVsgXRzPlj2OJxri+anEHNylPr+0EXzgNdblJ4 wsn1r5zVW/WokFoyNh/+OmLB/ofxG4h089F1919V+ZphJyfQO17H+q6fcQDvb6gFK9Xc jalWJF/enlTsoz04RS/gEsWT9SOL66hJtxpb4foGhf7tki4oZOBhcHjbHWY8fWTX42sd R3BQ==
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=g8japqi3JfjTtFI9w/NXv1nO9ztuzr0xPaWzgk5WAns=; b=afmYHXvnb9zodqzU1573F2aB53e3+1WoF3An5rxcacs5GRzWS4Gq0ulSNoZ6GGjWLs 80vB+Ok3BOkLem5So3w8bi8b8LeVMBy0HUvFEpMWEI9PbHszCS1nycoxgwQYhq1EGgAT ucqANIr+ws8DkKnwMrVJwM8fFG9iJPGNoFimEmS46qX3hzDXmOGFpSOAon+CiZUguzjK 73yeekNGy2cFRrxGb90kL4FVU1Qko9JuOg4yy2Is4rovmBq+Wcgj76evujB0yhWN1Ofj b3+/fiVaIBD6ycSKQdH1vlOXsty6pGZfQYG5YvuVvgN+9/CBeA9iHJ8E0i++RTafnFSC nkzA==
X-Gm-Message-State: AOAM530gHvVhUQ1FUtvptC8yvTZt3jiMd8N5gBeN7fK8O1ex4/Nj1ow5 Ll8pZvTy4izciDIp+TH/pChxNEx/qvjrr/WVHvE=
X-Google-Smtp-Source: ABdhPJxxFEDbA8fdPKJbxnrX/CmFcrnp2qypC3AOTJiPImIYOsWO0URjhUa/kDD8nfH2ama85lFbbV43znTY0oSgCBI=
X-Received: by 2002:a2e:92c4:: with SMTP id k4mr2094657ljh.238.1595852476290; Mon, 27 Jul 2020 05:21:16 -0700 (PDT)
MIME-Version: 1.0
References: <CAOW+2dvDmMdaCiz_Qq0OJVhzuZDdPQu5xOV2ivV1Kr1MnvbJTQ@mail.gmail.com> <3084C7A6-B2C3-4C44-A567-3178FEC45C6B@gmail.com> <2b7f05a8-2b6c-231f-7f95-b18462261bdb@gmail.com>
In-Reply-To: <2b7f05a8-2b6c-231f-7f95-b18462261bdb@gmail.com>
From: Bernard Aboba <bernard.aboba@gmail.com>
Date: Mon, 27 Jul 2020 05:21:05 -0700
Message-ID: <CAOW+2duUxVLPWWmG+0YeZ3POj6Frx8uVMn3gTPFmynZ7VbxLDw@mail.gmail.com>
To: Lennart Grahl <lennart.grahl@gmail.com>
Cc: WebTransport <webtransport@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000f69a7305ab6b5bd2"
Archived-At: <https://mailarchive.ietf.org/arch/msg/webtransport/d6wPC1DgoI4m9Dy01iAJr0RShik>
Subject: Re: [Webtransport] Does WebTransport need a reliable, in-order message abstraction?
X-BeenThere: webtransport@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <webtransport.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/webtransport>, <mailto:webtransport-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/webtransport/>
List-Post: <mailto:webtransport@ietf.org>
List-Help: <mailto:webtransport-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/webtransport>, <mailto:webtransport-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 27 Jul 2020 12:21:21 -0000

Thanks, Lennart.

"And I want to emphasize again on the naming in the API. So far, these
are all byte steams we're talking about in the WebTransport API but when
adding "message" streams, this isn't clear any more. To quote myself in
above linked issue:

> [...] I think it makes sense to incorporate the type of stream into the
interface in general to avoid confusion in a dynamically typed language
(what kind of stream is this? a stream of bananas?) [...]"

[BA] This problem exists now in the API document, even without support for
messages.

For example, receiveStreams() returns a ReadableStream of receiveStreams;
receiveBidirectionalStreams() returns a ReadableStream of
BidirectionalStreams; readDatagrams() returns a ReadableStream of
Uint8Arrays.  Yet the WebIDL just says "ReadableStream", with no indication
of the kind of stream returned.

On Mon, Jul 27, 2020 at 1:16 AM Lennart Grahl <lennart.grahl@gmail.com>
wrote:

>
>
> On 26/07/2020 02:08, Bernard Aboba wrote:
> > Alan said:
> >
> >> Is replacing WebSockets with WebTransport one of our goals?  If so, I
> think we need to address the gap by adding this abstraction.  If not, we
> should explicitly mention that this abstraction doesn’t exist, and instruct
> developers to use WebSocket instead.
> >
> > [BA] Thanks for bringing this up.
> >
> > When we first started on what would become the RTCQuicTransport API, the
> goal was to support all the transport modes of the RTCDataChannel API,
> which was modelled after WebSockets.
> >
> > However, we realized that this required design of a framing protocol on
> top of QUIC reliable streams. After verifying that a simple framing
> protocol was implementable as a JS library on top of the RTCQuicTransport
> prototype, providing many of the services of RTCDataChannel, the “proof of
> concept” was considered done and since then not much has happened.
> >
> > This is a good example of how things can fall between the cracks of
> protocol design and API design. “Assume we have a framing protocol designed
> in IETF....”
>
> Perhaps a clearly defined framing protocol for WebTransport on top of
> those protocols that need it is not a bad idea if it's simple and easily
> negotiable. But beyond that, I urge to always think about the
> entry-barrier for non-web implementations before adding more protocols.
> Because that was one of the top arguments when it came to why supporting
> data channels and SCTP in non-web implementations is a problem.
>
> But back to the "message" feature: I did make a proposal on that to make
> the API future-proof for message streams (i.e. stream of byte stream):
> https://github.com/WICG/web-transport/issues/49
> If we do have a framing protocol, then it can be easily combined with
> the API proposal.
>
> And I want to emphasize again on the naming in the API. So far, these
> are all byte steams we're talking about in the WebTransport API but when
> adding "message" streams, this isn't clear any more. To quote myself in
> above linked issue:
>
> > [...] I think it makes sense to incorporate the type of stream into the
> interface in general to avoid confusion in a dynamically typed language
> (what kind of stream is this? a stream of bananas?) [...]
>
> --
> Webtransport mailing list
> Webtransport@ietf.org
> https://www.ietf.org/mailman/listinfo/webtransport
>