Re: Unidirectional streams PR

"Philipp S. Tiesel" <phils@in-panik.de> Fri, 23 June 2017 10:17 UTC

Return-Path: <phils@in-panik.de>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 53266128D40 for <quic@ietfa.amsl.com>; Fri, 23 Jun 2017 03:17:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.6
X-Spam-Level:
X-Spam-Status: No, score=-2.6 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7] 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 gPld6UPF_SPh for <quic@ietfa.amsl.com>; Fri, 23 Jun 2017 03:17:30 -0700 (PDT)
Received: from einhorn-mail.in-berlin.de (einhorn-mail.in-berlin.de [217.197.80.20]) (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 27189128B8D for <quic@ietf.org>; Fri, 23 Jun 2017 03:17:29 -0700 (PDT)
X-Envelope-From: phils@in-panik.de
Received: from x-berg.in-berlin.de (x-change.in-berlin.de [217.197.86.40]) by einhorn.in-berlin.de (8.14.4/8.14.4/Debian-8+deb8u2) with ESMTP id v5NAGknJ009401 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 23 Jun 2017 12:16:46 +0200
Received: from [2001:638:809:ff1f::8295:dc3a] by x-berg.in-berlin.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <phils@in-panik.de>) id 1dOLdp-00033P-F5; Fri, 23 Jun 2017 12:16:41 +0200
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
Subject: Re: Unidirectional streams PR
From: "Philipp S. Tiesel" <phils@in-panik.de>
In-Reply-To: <CABkgnnV2yPP-qgLKZYPsvawXc7FP4RM7CZDDa7aFaNy0KxLfag@mail.gmail.com>
Date: Fri, 23 Jun 2017 12:16:46 +0200
Cc: QUIC WG <quic@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <8F8383F1-3892-4FF2-871F-B41680687BA7@in-panik.de>
References: <CABkgnnW+veDVq27v+wTz0cA=eGPRTLQ1A90A0ynHLPU88Pg77Q@mail.gmail.com> <CAOdDvNpORYBr7+Q8M_nnGOm4MsWqVbm6koOtQ+=An8t7AbccGg@mail.gmail.com> <CAGD1bZb9Na32z=Gg9JS+FzrGGN9Jhw=QDTMTYS=FVcNesoSMig@mail.gmail.com> <CABkgnnV2yPP-qgLKZYPsvawXc7FP4RM7CZDDa7aFaNy0KxLfag@mail.gmail.com>
To: Martin Thomson <martin.thomson@gmail.com>
X-Mailer: Apple Mail (2.3273)
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/3uXFmH8tLFhKonsHRUw7o_WZqBQ>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Jun 2017 10:17:32 -0000

> On 22. Jun 2017, at 03:50, Martin Thomson <martin.thomson@gmail.com> wrote:
> 
> On 22 June 2017 at 09:48, Jana Iyengar <jri@google.com> wrote:
>> My design sense says to optimize for the common case and to allow for the
>> exceptions. Given that our scope is to really get things rolling for HTTP
>> ASAP, I'd argue that request-response is the common case that we need to
>> optimize for.
> 
> I think that this is a fair criticism, and I wanted to address it.
> 
> My concern is exactly the same as yours: I want get HTTP working.  And
> unfortunately, HTTP/2 is not a simple request/response protocol.  This
> is why HTTP/2 and now QUIC allow the server to initiate streams.  And
> it's that exact gap that motivated me to propose this change.  In my
> view, this change makes it *easier* to finish HTTP over QUIC.
> 
> The cost is that HTTP is marginally more complex.  My view is that the
> overall protocol (HTTP+QUIC) is no more or less complex than before,
> there are big savings in transport, and some minor savings in HTTP
> that counteract the added cost: having to include explicit correlation
> for request and response, and having to add a way to cancel requests
> before the response starts. [1]

> [1] I don't consider HAS_BODY to be a cost, I'm now firmly of the
> opinion that merging headers and body back into a single stream is the
> right solution and that what I wrote up here is only temporary.

I have some concerns here, as separating the body into a different stream
allows more flexible design later on: If we added unreliable transport to
quick, having the header sent reliably and the body unreliably seems useful.

Canceling the stream is still possible if a) the stream ID is known by
convention or b) the stream ID is provided in a forward-reference.


> Ted suggested that we aim for a design that supports BOTH
> unidirectional and bidirectional. Given how trivial it is to add an
> identifier - as demonstrated by this PR - I don't see how building
> that facility into the base transport is a net win.  Some protocols
> can still use the stream identifiers as a correlator, for instance
> those protocols that are properly request/response don't need explicit
> correlators.  That choice - as with your proposal to retain
> bidirectionality - creates a potential for head-of-line blocking under
> certain circumstances, something that an explicit correlator at the
> application layer neatly avoids.

I guess having a OPEN_STREAM frame that allows to associate a new steam
to a stream in reverse direction and thus building a a bi-directional
stream pair is a good compromise as it allows bi-directinal streams in
a quic API without introducing additional state space in the base protocol.


AVE!
  Philipp S. Tiesel / phils…