Re: [Masque] [Webtransport] Layered or integrated protocols

Tommy Pauly <tpauly@apple.com> Fri, 23 July 2021 23:08 UTC

Return-Path: <tpauly@apple.com>
X-Original-To: masque@ietfa.amsl.com
Delivered-To: masque@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E96F73A20C2; Fri, 23 Jul 2021 16:08:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.548
X-Spam-Level:
X-Spam-Status: No, score=-2.548 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.452, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=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=apple.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 h2vh3h3n4Dwy; Fri, 23 Jul 2021 16:08:54 -0700 (PDT)
Received: from rn-mailsvcp-ppex-lapp15.apple.com (rn-mailsvcp-ppex-lapp15.rno.apple.com [17.179.253.34]) (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 84EB93A20C4; Fri, 23 Jul 2021 16:08:54 -0700 (PDT)
Received: from pps.filterd (rn-mailsvcp-ppex-lapp15.rno.apple.com [127.0.0.1]) by rn-mailsvcp-ppex-lapp15.rno.apple.com (8.16.1.2/8.16.1.2) with SMTP id 16NMwFK8031969; Fri, 23 Jul 2021 16:08:53 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=from : message-id : content-type : mime-version : subject : date : in-reply-to : cc : to : references; s=20180706; bh=4lTGKuXMDA1CfIK8MiZeg1Efkf8wEbGcaG5V9R+J05Y=; b=gfpGhgx5N+SqiiiuehBl64psajH5VbIpN2NkKwlRPE8Is7Vj1v/30od9iBJaQNVYVK4V PJrrdIU16XDDWi17xmUlicJC/LI5Ixy9zM3cxQnuLEe4cRmd2a+9tbzffnk0zaPCT6Za 7vSBwRNv2hNSx9v1SRasW/ITqUXRwmB+353+pA5lkPGVDqsFyYLwsqdo3JDyP4ioTkv+ iqqwn/x04cMTxbc6vAn1i9QI0+5RD4jcZOBCHwom+0b1fl3/B18nafMiCUg9x7MpKoDM N2KRofJzspdmsbbwtWIydZzfpiCrRt8apE7UCkSXrh0MMd/VNDkxrWINcdJuN9oQLbJv 0Q==
Received: from rn-mailsvcp-mta-lapp03.rno.apple.com (rn-mailsvcp-mta-lapp03.rno.apple.com [10.225.203.151]) by rn-mailsvcp-ppex-lapp15.rno.apple.com with ESMTP id 39y276gv4u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Fri, 23 Jul 2021 16:08:53 -0700
Received: from rn-mailsvcp-mmp-lapp01.rno.apple.com (rn-mailsvcp-mmp-lapp01.rno.apple.com [17.179.253.14]) by rn-mailsvcp-mta-lapp03.rno.apple.com (Oracle Communications Messaging Server 8.1.0.9.20210415 64bit (built Apr 15 2021)) with ESMTPS id <0QWQ00N5G0ATD640@rn-mailsvcp-mta-lapp03.rno.apple.com>; Fri, 23 Jul 2021 16:08:53 -0700 (PDT)
Received: from process_milters-daemon.rn-mailsvcp-mmp-lapp01.rno.apple.com by rn-mailsvcp-mmp-lapp01.rno.apple.com (Oracle Communications Messaging Server 8.1.0.9.20210415 64bit (built Apr 15 2021)) id <0QWQ0000004PSM00@rn-mailsvcp-mmp-lapp01.rno.apple.com>; Fri, 23 Jul 2021 16:08:53 -0700 (PDT)
X-Va-A:
X-Va-T-CD: 01a37c4388be431533d60b3d58eeb299
X-Va-E-CD: 6f1d6bba71b3294a6ee78057c963989c
X-Va-R-CD: 86e66170b27255ad48a5b0060ae21491
X-Va-CD: 0
X-Va-ID: eca18811-61ab-4558-b736-4bb90a39b24a
X-V-A:
X-V-T-CD: 01a37c4388be431533d60b3d58eeb299
X-V-E-CD: 6f1d6bba71b3294a6ee78057c963989c
X-V-R-CD: 86e66170b27255ad48a5b0060ae21491
X-V-CD: 0
X-V-ID: 5a53097c-4b52-4e7e-8bf5-ad56356e543b
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-23_13:2021-07-23, 2021-07-23 signatures=0
Received: from smtpclient.apple (unknown [17.11.181.244]) by rn-mailsvcp-mmp-lapp01.rno.apple.com (Oracle Communications Messaging Server 8.1.0.9.20210415 64bit (built Apr 15 2021)) with ESMTPSA id <0QWQ00JG30ATCG00@rn-mailsvcp-mmp-lapp01.rno.apple.com>; Fri, 23 Jul 2021 16:08:53 -0700 (PDT)
From: Tommy Pauly <tpauly@apple.com>
Message-id: <337E8BB6-573C-44EB-B039-3B03C7940028@apple.com>
Content-type: multipart/alternative; boundary="Apple-Mail=_DBFDED29-3EFE-4F44-AF51-0E437FB4996C"
MIME-version: 1.0 (Mac OS X Mail 14.0 \(3654.80.0.2.6\))
Date: Fri, 23 Jul 2021 16:08:52 -0700
In-reply-to: <7cd78e75-2fc2-483d-83d9-6930286378e2@www.fastmail.com>
Cc: webtransport@ietf.org, masque@ietf.org
To: Martin Thomson <mt@lowentropy.net>
References: <7cd78e75-2fc2-483d-83d9-6930286378e2@www.fastmail.com>
X-Mailer: Apple Mail (2.3654.80.0.2.6)
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-23_13:2021-07-23, 2021-07-23 signatures=0
Archived-At: <https://mailarchive.ietf.org/arch/msg/masque/hvo1YK01h67OGe6DjNjP9muuM8M>
Subject: Re: [Masque] [Webtransport] Layered or integrated protocols
X-BeenThere: masque@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Multiplexed Application Substrate over QUIC Encryption <masque.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/masque>, <mailto:masque-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/masque/>
List-Post: <mailto:masque@ietf.org>
List-Help: <mailto:masque-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/masque>, <mailto:masque-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Jul 2021 23:09:00 -0000

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