Re: Unidirectional streams PR

Mark Nottingham <mnot@mnot.net> Thu, 22 June 2017 01:27 UTC

Return-Path: <mnot@mnot.net>
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 86A05129329 for <quic@ietfa.amsl.com>; Wed, 21 Jun 2017 18:27:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.701
X-Spam-Level:
X-Spam-Status: No, score=-2.701 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=mnot.net header.b=nCO2/pDw; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=MbDWqe67
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 vy4JWNJAR48P for <quic@ietfa.amsl.com>; Wed, 21 Jun 2017 18:26:59 -0700 (PDT)
Received: from new1-smtp.messagingengine.com (new1-smtp.messagingengine.com [66.111.4.221]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 458FC120721 for <quic@ietf.org>; Wed, 21 Jun 2017 18:26:59 -0700 (PDT)
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 91C38C01; Wed, 21 Jun 2017 21:26:58 -0400 (EDT)
Received: from frontend2 ([10.202.2.161]) by compute3.internal (MEProxy); Wed, 21 Jun 2017 21:26:58 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mnot.net; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=mu1T765jec26tgZ0rd GbDr58rHIX/6Y2+Iyzrbd44Rk=; b=nCO2/pDwUVjof3RG60G5vCgxELoL/H4/iH 82ArOIIkX3ZZHHlp5qIuyX7akjd8gw63kNwhDzMKaBMtynPXLneWGFTIoPsUn/n7 FNfX7MYV/Yq18GbgPUlbbmo6yckYM89hs0GV89/xuuG6xfH9dt/NppWggGAro69D PnLaGYfkBGr38zIkkzJizU4FR6dLDeOn1X8SNarGiWxQWiLndgnfPYb81qlYDxDE si/nyCzATQ2zNoY1PEMy+q+DP1IWDmihfHZbTqrBbPNHK2ua7dTO03cKlbAuwgPz ZlnIe+UlLN6IL2kgKE0eQWkLv5LyY7LqD9OlnfCj3YgwGmMh883w==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=mu1T765jec26tgZ0rdGbDr58rHIX/6Y2+Iyzrbd44Rk=; b=MbDWqe67 cpwNGw7otgAX9z9d7mDMvsFVStgffm2Ixwkz68H4vBvlIOP49J91EIA5bfr04JjK TmM7XAb2GfwZPi2oSss/zwzWOonThztDrEHTLQLKsC/jDYoWoB4pqMGipiOgBouU Pb0fy9LUQ8I6bdFyDo7Acxk7bMz69hWSwXsKxZBveYfM1/dUS1FQIEZ/EIVXKVhM YTAPNwd7F0J8slC4BYvhv/iOH9izLn436pt6w1ct/JUp2DHKtzRg9dHqEWRZHvag M8VKaJWW/j+M7mvA4a7JyAQWasdvyFvwQQmAN7D6He1mtN0dJzA8wZNfyGFiszHY +mHhbCG6KszUiA==
X-ME-Sender: <xms:4hxLWa0D47YbHCKNz_Jd9r_jtM_81X9Z8xRgYv49y4NKs5gIwVliOA>
X-Sasl-enc: gqVtGRL8Nt9Pf4b1Oh1gtSKW85lQ4JR0ELvr2zE1YB+M 1498094817
Received: from [192.168.1.18] (cpe-124-188-19-231.hdbq1.win.bigpond.net.au [124.188.19.231]) by mail.messagingengine.com (Postfix) with ESMTPA id D90A1245EF; Wed, 21 Jun 2017 21:26:56 -0400 (EDT)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
Subject: Re: Unidirectional streams PR
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <CABkgnnW+veDVq27v+wTz0cA=eGPRTLQ1A90A0ynHLPU88Pg77Q@mail.gmail.com>
Date: Thu, 22 Jun 2017 11:26:53 +1000
Cc: Lars Eggert <lars@netapp.com>
Content-Transfer-Encoding: quoted-printable
Message-Id: <20CE4E18-368A-4376-8812-8AA1010C0C51@mnot.net>
References: <CABkgnnW+veDVq27v+wTz0cA=eGPRTLQ1A90A0ynHLPU88Pg77Q@mail.gmail.com>
To: QUIC WG <quic@ietf.org>
X-Mailer: Apple Mail (2.3273)
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/7WCDVZw9q0bjlpqnuJ7ZmirsL2w>
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: Thu, 22 Jun 2017 01:27:02 -0000

[ co-chair hat on ]

Everyone --

To add some context -- this is (obviously) a big change, so we've asked Martin to prioritise it so that people can give it due consideration early in the process, before people start implementing streams broadly.

As our charter says, "consensus is required both for changes to the current protocol mechanisms and retention of current mechanisms. In particular, because something is in the initial document set does not imply that there is consensus around the feature or around how it is specified." 

To get to that consensus in *either* direction, we need broad input on this, so please have a look through and express your support, concerns, etc. on-list. 

I'd like to see a substantial amount of on-list discussion before Prague, so that we can make a decision in that time frame.

Cheers,


> On 21 Jun 2017, at 5:41 pm, Martin Thomson <martin.thomson@gmail.com> wrote:
> 
> I've created a pull request unidirectional streams.
> 
> https://github.com/quicwg/base-drafts/pull/643
> 
> I won't go into detail about this here, other than to point out that
> there is extensive rationale for the choices I made in the PR summary,
> a copy of which I will include for your convenience.
> 
> ## Transport Changes
> 
> Streams are unidirectional.  Each has three states: idle, open, and
> closed.  I separated the transitions for sending and receiving because
> that turned out to be easier to explain.  The reordering thing makes
> them different in subtle ways.
> 
> That's all.  The changes in transport are relatively small and they
> simplify streams a lot.  That it also makes the transport more generic
> is a nice bonus.
> 
> ## HTTP Changes
> 
> This is where the bulk of the changes are.
> 
> ### Stream Correlation
> 
> Previously request and response were implicitly correlated, as was the
> data correlated with the request or response headers.  With this
> change, that correlation each stream has a header that explicitly
> correlates these.
> 
> There are 5 types of stream: connection control, request, response,
> data, and push.  The first two have a simple header that has a type.
> The next two reference another stream in their header, which ties
> request to response and data to request or response.  Push streams
> each reference a PUSH_PROMISE using a newly minted push ID (I decided
> that was cleaner than what I proposed at the interim).
> 
> I chose backward references rather than forward references for two
> reasons.  First, request and response correlation can't use forward
> references because that would mean the client would be exerting
> (uncoordinated) control over server streams.  Second, that gives the
> server the most flexibility in terms of how it answers requests (see
> #281).  The cost of using backward references is that endpoints have
> to check that the backward references aren't bad, either referencing
> the wrong type of stream, or with multiple references to the same
> stream.
> 
> The presence or absence of a message body is signaled after the
> initial header block using a HAS_BODY frame.  This empty frame
> indicates that another stream will include the body of the message -
> or a promise for a body.  I would like to eliminate this stream split.
> See #245 and #557 for more details on that, though we need to fix #176
> first, which brings us back to QPACK/QCRAM again.
> 
> ### Prioritization
> 
> This changes prioritization so that it identifies requests.  I only
> made the minimal changes here, which means that this doesn't fix #441
> at the same time, I've left that for later (see below).
> 
> ### Cancelling Pushes
> 
> Because server push doesn't create streams with PUSH_PROMISE, I had to
> create a way to cancel them between the time that the PUSH_PROMISE is
> sent and when the push stream is created.  That's called RST_PUSH.
> 
> ## Things That Need Improvement
> 
> I haven't based this on #171.  I think that functionality is good, but
> the last time I looked at the PR I didn't like some of the changes
> Mike made there.  (That's a taste thing.)  This really assumes that we
> accept something very much like #171.
> 
> This really needs QPACK/QCRAM.  Right now, it is impossible to cancel
> some types of request using RST_STREAM because not all messages will
> have a body (#176 again).  On balance, given that bodies are what you
> really want to kill, it's not disastrous, but it's a problem
> nonetheless.  I think that we all agree that this is something that we
> need to fix, but we haven't reached the point where we agree on the
> details of the fix.
> 
> ## Things That Want Improvement
> 
> This also really wants headers and data on the same stream .  It
> doesn't exactly need that, but merging the streams would make things a
> lot easy, both conceptually and structurally.
> 
> I chose the simplest possible encoding for all of the fields that I
> touched.  That means that stream IDs are all 32 bits in size and the
> HAS_BODY frame takes an entire 9 octets.  For things that are that
> common, there are many ways in which byte efficiency could be
> improved.
> 
> The push ID changes might allow us to trivially fix #441.  Use of an
> as-yet-not-created push ID as a node in the priority tree would allow
> for prioritization to use "empty" nodes.  We'd need to explicitly
> allow that though.
> 
> # Fixes
> 
> Closes #515, #240, #281, #175.
> 

--
Mark Nottingham   https://www.mnot.net/