Re: [Webtransport] Layered or integrated protocols

David Schinazi <dschinazi.ietf@gmail.com> Fri, 23 July 2021 23:29 UTC

Return-Path: <dschinazi.ietf@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 C997C3A2156 for <webtransport@ietfa.amsl.com>; Fri, 23 Jul 2021 16:29:33 -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=unavailable 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 Vfp7bzHsG7qo for <webtransport@ietfa.amsl.com>; Fri, 23 Jul 2021 16:29:29 -0700 (PDT)
Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) (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 4F33E3A2158 for <webtransport@ietf.org>; Fri, 23 Jul 2021 16:29:29 -0700 (PDT)
Received: by mail-pj1-x1029.google.com with SMTP id m2-20020a17090a71c2b0290175cf22899cso5807901pjs.2 for <webtransport@ietf.org>; Fri, 23 Jul 2021 16:29:29 -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=wX4ZLVfN9odxtMoHXCFwxt1h6r9COM0LYk33Y8CMxvA=; b=fqqA8uMmXhj3X+kzqpk891FlyT6b729qElY7MNnTLUPYEVVrxAR/sZSrw7fbaHDdwm SG0E74aDVOtso9R63my+/rJXStvsnkfyDEMNZsjmlrWPP0ZgxAyjc4+EbtZmWE5Z+Epx 5s0qgUvXShhwjF0+nuuL70pUfH+Pp4gPBEltroRneMR3U5K9HJT5yi0QlJJQlDBweYLY CS+VXsaLngvCFBBHfn7aqnJpOph24kARC3sS5hH29SYD8oCGcE4jSA6S4gENgTaNDSEf xzITlpZ4MZ1+/caYpVCavTHKLS+CrQ4U6xFO79q+QZMTU+9VqjSQIa9g1wLe1YqVE0My 61aw==
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=wX4ZLVfN9odxtMoHXCFwxt1h6r9COM0LYk33Y8CMxvA=; b=Zoe+e+Vj+lz96H/TwVAF+O8UPU7IaX3S1ryt2+dpoj20qL6xvcq4Eb7PJOrDQ3eUC3 5EDw0PL5HiGKV3EoymM5eWdMWJGZ2ZisofeJOJWXwrnZLlVui8S2UQSJbXBGMpTLVPx3 Kd9hZ5gDxBqASiDOs6iqfO3B4CF+xT9qgKHPOATxSkLGDk4CPTNK9eo+jj6Sef9ldKX7 527H7oHRi0JDwX5o5XIkYEI60IpjBxjgp3wy99d74TYOPb2FCdVALfSOygNu2xJHG9U4 UlYeHSq/1oUr3BjQY7YbtrW+POUo1B3rm5ACe0LculWIczg0zdDBZrIs+jq6bZCu3bQT q7KA==
X-Gm-Message-State: AOAM532CldikyQJW32Iq7PYGnP6C8iQsX3iMXuZ5KYmuA7F9PmP6uNd+ mxpEKb9np/z/lgjVsAJd8AxrhmZ1+zLjHH4mVKQ=
X-Google-Smtp-Source: ABdhPJwr3E5O6MlONA34MyBje97XHO4QmeoIZtOSIo3Ev1CaszDOgmlO08jCPHN0DXosOf6nCUq5xt77LKuj80qJOUM=
X-Received: by 2002:a63:cf02:: with SMTP id j2mr6973174pgg.411.1627082966946; Fri, 23 Jul 2021 16:29:26 -0700 (PDT)
MIME-Version: 1.0
References: <7cd78e75-2fc2-483d-83d9-6930286378e2@www.fastmail.com> <337E8BB6-573C-44EB-B039-3B03C7940028@apple.com>
In-Reply-To: <337E8BB6-573C-44EB-B039-3B03C7940028@apple.com>
From: David Schinazi <dschinazi.ietf@gmail.com>
Date: Fri, 23 Jul 2021 16:29:15 -0700
Message-ID: <CAPDSy+5qpB=MfEj9FLGAJvm5XRctz90cr6WAnWQbDjzjtsUdGg@mail.gmail.com>
To: Tommy Pauly <tpauly@apple.com>, Martin Thomson <mt@lowentropy.net>
Cc: MASQUE <masque@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000043d68605c7d2c621"
Archived-At: <https://mailarchive.ietf.org/arch/msg/webtransport/wHheG4WS8uaM0ESSV-UTCe7FEsE>
X-Mailman-Approved-At: Fri, 23 Jul 2021 16:31:59 -0700
Subject: Re: [Webtransport] Layered or integrated protocols
X-BeenThere: webtransport@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: WebTransport WG <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: Fri, 23 Jul 2021 23:29:34 -0000

[ WebTransport to BCC ]

Thanks for writing this up, Martin.

The original design for MASQUE [1] was indeed simpler, but it also didn't
play as nicely with HTTP - it started off by using HTTP semantics to
perform negotiation, then would pretty much hijack the entire QUIC
connection. That doesn't work well with HTTP intermediaries and connection
reuse. So when you suggested that we instead define a new method, we did
integrate more into HTTP, and added complexity, but I think we got real
benefits from that design change.

The new design with capsules does what you describe here though:
> That is, you establish a tunnel (using CONNECT-whatever) and then you use
the resulting bidirectional stream to do whatever is necessary.  Then, if
you have something better (as you do if you are using QUIC) you move things
to their own streams or datagrams as the opportunity arises.

In the latest MASQUE drafts, the client creates a new client-initiated
bidirectional stream, sends its HEADERS to indicate MASQUE by using the
CONNECT-UDP method and then it can start communicating on that stream with
capsules. The capsules allow this to work even in the presence of
intermediaries. And once you've registered, you can also use datagrams for
better performance.

And WebTransport (the version over HTTP/3) does the same thing. I'm not
sure what you mean when you say that they're very different. Using
CONNECT-UDP vs extended CONNECT with the :protocol pseudo-header is a
cosmetic choice that I'm happy to bikeshed, since both work just as well.
It doesn't impact the design at all.

I agree that it would have been great to have been able to build all of
this *over* HTTP instead *inside* HTTP, but if we wish to support
intermediaries I don't see any way to build datagrams over HTTP - you'll
need a way for the HTTP intermediary to know where to forward the datagram.

Do you have a concrete proposal for how to have datagrams not be as
integrated for HTTP/3?

David

[1] https://datatracker.ietf.org/doc/html/draft-schinazi-masque-00


On Fri, Jul 23, 2021 at 4:09 PM Tommy Pauly <tpauly=
40apple.com@dmarc.ietf.org> wrote:

> Thanks for these thoughts, Martin.
>
> I definitely agree with the sentiment on the direction, particularly this
> comment:
>
> I don't know what happened to the design of MASQUE that I originally saw,
> but to me that was a much cleaner layering.  That is, you establish a
> tunnel (using CONNECT-whatever) and then you use the resulting
> bidirectional stream to do whatever is necessary.  Then, if you have
> something better (as you do if you are using QUIC) you move things to their
> own streams or datagrams as the opportunity arises.
>
> Of course, I know how we got to where we are in the conversation for
> MASQUE, and the considerations are reasonable taken as they are, but it’s
> certainly true that it’s building in a lot of complexity.
>
> My other concern with some of these directions is that deeply integrated
> designs, particularly those that have many different extension points, end
> up being attractive for implementation bugs (see
> draft-iab-use-it-or-lose-it, heh). That’s a risk when MASQUE and
> WebTransport go in different directions, and have a menu of options that is
> too long.
>
> Best,
> Tommy
>
> On Jul 20, 2021, at 11:51 PM, Martin Thomson <mt@lowentropy.net> wrote:
>
> I was originally just going to announce here that I've made a contribution
> to the discussion on how to map WebTransport semantics to HTTP.  To be
> honest this isn't a mapping to HTTP, it's more of a burrow into.
>
> In case you want to read it, here it is:
> https://www.ietf.org/archive/id/draft-thomson-webtrans-hwtq-00.html
>
> However, in discussing this with Alan Frindell and Eric Kinnear I realized
> that the designs we are all proposing are based on a bunch of assumptions.
>
> The HTTP/2 integration in draft-ietf-webtrans-http2-00 assumes that the
> shortest path to expressing WebTransport semantics in HTTP/2 is to reuse
> HTTP/2 stream semantics as much as possible, adjusting where necessary.
> That has a lot of merit, especially when you consider the potential reuse
> you get of multiplexing, priority, and whatnot.  It's not perfect, but you
> can make it work with a few precise tweaks.
>
> Then I looked at where MASQUE is headed.  Despite a lot of similarities in
> what we are seeking to do, the differences there are nearly complete.
> Extended CONNECT vs. CONNECT-UDP and capsules vs. frames mean that the two
> things might look similar, but they share very few design elements.  We are
> headed toward building one protocol for MASQUE and two completely different
> protocols for WebTransport.
>
> I don't know what happened to the design of MASQUE that I originally saw,
> but to me that was a much cleaner layering.  That is, you establish a
> tunnel (using CONNECT-whatever) and then you use the resulting
> bidirectional stream to do whatever is necessary.  Then, if you have
> something better (as you do if you are using QUIC) you move things to their
> own streams or datagrams as the opportunity arises.
>
> That basic design works for both WebTransport and MASQUE regardless of the
> HTTP version.  The cost is that a light integration with the underlying
> protocol forces the design to provide its own resource management and
> prioritization features.  Multiplexing without flow control is a good way
> to get bad outcomes, after all.  That might result in some duplication of
> effort, even bad interactions as you move from a two layer system
> (connection>stream) to a three layer system (connection>session>stream) in
> the extreme case.
>
> What we have right now is deep integrations.  That has the aforementioned
> advantages, but it means that you need to own your stack before you can
> implement the extension.  That is, in their current form, you can't build
> WebTransport or MASQUE by taking an HTTP implementation and building *on*
> it, you have to build *in* the stack.
>
> Deep integrations have a few advantages, particularly when it comes to
> reusing existing mechanisms.  The HTTP/{2,3} mapping can use HTTP/{2,3}
> stream flow control and prioritization (assuming that you have already
> replaced the RFC 7540 scheme for priority, that is).  But they are invasive
> and can be high maintenance.
>
> Layering protocols avoids coupling at the cost of being constrained by the
> abstractions of the layers that are used.
>
> One thing that I wanted to do by suggesting a layered design - aside from
> the architectural split - was to isolate the resource management for
> WebTransport sessions from the other resources consumed on the connection.
> For instance, it would help if two sessions share a connection, then maybe
> they can each make progress if the other is determined to exhaust the
> stream limit.  Per session limits are a natural consequence of a layered
> design.  However, if we don't need that capability, it's not necessarily an
> advantage.  We should talk about whether we need per-session limits for
> WebTransport.  Same for MASQUE.
>
> Eric mentioned one point that I hadn't considered.  A generic mapping of
> QUIC stream and datagram semantics to a stream transport might be more
> broadly useful.  If that has multiple uses, then that might be good
> motivation for a layered design.
>
> I don't have a concrete example in mind, but I can offer is the fact that
> people want to use QUIC in other contexts and they probably do want a TCP
> fallback also.  If they can't just use WebTransport (which is possible), a
> generic mapping could be helpful where an HTTP/2 implementation might not
> be.  An HTTP/1.1 mapping would be the next best thing.  (From my
> perspective, however, I would never seek to make a purely generic mapping,
> but rather seek to make large parts of the design trivially reusable in a
> new mapping.  That's almost the same thing, but I've never seen a generic
> protocol mapping design that didn't end up full of weird stuff that handled
> irregularities in one substrate or other.  Or, for programming nerds:
> monomorphism > generics.)
>
> Anyway, this is a long message to basically ask that we be deliberate
> about our choices.  I don't think that anyone has chosen the integrated
> path thoughtlessly, but I want to ask that we collectively step back and
> make sure that this is really what we want.  That might mean talking about
> the reasons that push toward integrated designs or more about our resource
> management requirements.
>
> Cheers,
> Martin
>
> p.s., https://datatracker.ietf.org/doc/html/rfc1958#section-3 contains
> some wrongness (3.9) and some points that can be read any number of ways
> here (3.5), but I think that point 3.6 argues for layering.
>
> --
> Webtransport mailing list
> Webtransport@ietf.org
> https://www.ietf.org/mailman/listinfo/webtransport
>
>
> --
> Webtransport mailing list
> Webtransport@ietf.org
> https://www.ietf.org/mailman/listinfo/webtransport
>