RE: Unidirectional streams PR

"Lubashev, Igor" <ilubashe@akamai.com> Fri, 30 June 2017 23:54 UTC

Return-Path: <ilubashe@akamai.com>
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 B397A12EADA for <quic@ietfa.amsl.com>; Fri, 30 Jun 2017 16:54:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=akamai.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 6MoFvGNuU8v4 for <quic@ietfa.amsl.com>; Fri, 30 Jun 2017 16:54:56 -0700 (PDT)
Received: from mx0b-00190b01.pphosted.com (mx0b-00190b01.pphosted.com [IPv6:2620:100:9005:57f::1]) (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 5A42512EA76 for <quic@ietf.org>; Fri, 30 Jun 2017 16:54:56 -0700 (PDT)
Received: from pps.filterd (m0050102.ppops.net [127.0.0.1]) by m0050102.ppops.net-00190b01. (8.16.0.21/8.16.0.21) with SMTP id v5UNqRFm032741; Sat, 1 Jul 2017 00:54:46 +0100
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akamai.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : mime-version; s=jan2016.eng; bh=C1QZt51qCsDXfZ/7aJXIVR8On+j9QOXsacV8mkZKSI8=; b=pNWGT43L93z+tc8+tbB19632XhDURhz4zCSRx/W32lmqfagHIU83jqYVCOH/5oqJikzy Xer+I2gyPKSZBsnIrj/c4m8fuMW6RYJs3yLTM3PbbEHDVpWMc2tcYPnfZ8Om350wbVqq WWZainXldoNVRcxQGwVQxZgRvnIWPj1gmVdHA+TStscgfAJ3QtnGfncBY1WYDImJc9JP Cpa5XV+WkvTaARUO9XWC6lhXRoD2JS+y9VlAgzByFBgjfv8xaGZzMGpc9IL43psIH7XJ WTmyoc1Q2ot2XG+cgKdhRsa9Hha94ArHgWfuMzs9KIHtlW89qxzi7FOKl37TMX/OPguw xQ==
Received: from prod-mail-ppoint4 ([96.6.114.87]) by m0050102.ppops.net-00190b01. with ESMTP id 2bdrgrae0n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 01 Jul 2017 00:54:46 +0100
Received: from pps.filterd (prod-mail-ppoint4.akamai.com [127.0.0.1]) by prod-mail-ppoint4.akamai.com (8.16.0.17/8.16.0.17) with SMTP id v5UNon3E000436; Fri, 30 Jun 2017 19:54:45 -0400
Received: from email.msg.corp.akamai.com ([172.27.123.32]) by prod-mail-ppoint4.akamai.com with ESMTP id 2b9kdv60nw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 30 Jun 2017 19:54:45 -0400
Received: from USMA1EX-DAG1MB5.msg.corp.akamai.com (172.27.123.105) by usma1ex-dag1mb4.msg.corp.akamai.com (172.27.123.104) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Fri, 30 Jun 2017 19:54:43 -0400
Received: from USMA1EX-DAG1MB5.msg.corp.akamai.com ([172.27.123.105]) by usma1ex-dag1mb5.msg.corp.akamai.com ([172.27.123.105]) with mapi id 15.00.1263.000; Fri, 30 Jun 2017 19:54:43 -0400
From: "Lubashev, Igor" <ilubashe@akamai.com>
To: "quic@ietf.org" <quic@ietf.org>, "huitema@huitema.net" <huitema@huitema.net>, "mikkelfj@gmail.com" <mikkelfj@gmail.com>, "subodh@fb.com" <subodh@fb.com>, "Michael.Bishop@microsoft.com" <Michael.Bishop@microsoft.com>
Subject: RE: Unidirectional streams PR
Thread-Topic: Unidirectional streams PR
Thread-Index: AQHS7K8qFJcNmOfPnkGlJjRXQ/9soKI0ttCAgATMZACAAP5zgIAAEIwAgAAHqgCAAA02gIAAfdKAgAARSAD//8GgUIAAXnCAgAD+vQCAAAZIgIAAHNIAgAAGBoCAAdi0AP//yFAx
Date: Fri, 30 Jun 2017 23:54:43 +0000
Message-ID: <07d8c169e6a8405e9303d35b4e1f02e1@usma1ex-dag1mb5.msg.corp.akamai.com>
References: <CAN1APdc_ckZu39ZZTETv04iZieogoE_NQCBR-n0jHrC-9dM7Aw@mail.gmail.com> <5d69489d-8f46-ebbe-4e5c-fa6c02ffd8dd@huitema.net> <CAF4GZgBm7525i2GxiN-Pv66g0WqbDH==fRXN27=7ursNA70w1Q@mail.gmail.com> <20170628124221.GA15608@ubuntu-dmitri> <CAN1APdc3YO4-FEc6C--PzFGxzQiAUeBZ96HkjtjS1RR0qigrzw@mail.gmail.com> <CAE=ybzNtSZx9-bj9-n-ieLMB=YvJCjCExugvA3_JPVrdEEqK9A@mail.gmail.com> <DB5PR07MB123748F2AB7374DAC0CC9E1484DD0@DB5PR07MB1237.eurprd07.prod.outlook.com> <MWHPR21MB0141BD23011EB26F882C864787DD0@MWHPR21MB0141.namprd21.prod.outlook.com> <CABkgnnXEq9-jxedU_Rmi4XQ+t0SNUOAMbyWXcnhyLKz+OzP2CQ@mail.gmail.com> <2240c2a68910453e97fc50d42e8a1d4f@usma1ex-dag1mb5.msg.corp.akamai.com> <CAKcm_gMb9PkBKhTRF3ue2KGgwHgKN8rsanD8rqqr_wUFJ3GNZQ@mail.gmail.com> <83e22460-8864-e6f7-546a-d0e77e4f8ae8@huitema.net> <MWHPR21MB0141DAB51088DE57504B12F087D20@MWHPR21MB0141.namprd21.prod.outlook.com> <176a76c7-bdcd-9007-1f26-e436f61076f3@huitema.net>, <CAN1APdcMn8ik_UFqBx7T7xPSrBpdYOD3oQgC_XRrdrz2ikFDFw@mail.gmail.com>, <DM5PR15MB14494D50B82F681CE0027483B6D30@DM5PR15MB1449.namprd15.prod.outlook.com>
In-Reply-To: <DM5PR15MB14494D50B82F681CE0027483B6D30@DM5PR15MB1449.namprd15.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-transport-fromentityheader: Hosted
Content-Type: multipart/alternative; boundary="_000_07d8c169e6a8405e9303d35b4e1f02e1usma1exdag1mb5msgcorpak_"
MIME-Version: 1.0
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-06-30_16:, , signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1706300367
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-06-30_16:, , signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1706300367
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/yiRusVITBfj1b3-NzP1MnE-dsoA>
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, 30 Jun 2017 23:54:59 -0000

I am worried about silent (app-directed) stream closing. This it a layering violation, since it introduces transport-layer semantics (stream state transition) that are not signaled on the wire.

Such silent stream closing would make it hard (impossible?) to write a generic QUIC proxy, for example. A generic proxy must be able to know when a stream is closed, so it can release resources. In fact, the proxy would provide a better experience, if it could also know stream priorities and other possible stream attributes explicitly.

 (The proxy may be a good idea, if you have limited devices attached to your low latency/high quality network, which is connected to the rest of the Net over high latency/low quality links. You’d deploy such a proxy, so it can maintain deep buffers, needed for communication over high latency/low quality links.)


As for Ian's Uni-bit proposal, the state machine is no more complicated than in the original spec. (You would probably want to add a Uni bit to RST_STREAM frame to keep stream directionality unambiguous at all times.)

- Igor



-----Original Message-----
From: Subodh Iyengar [subodh@fb.com]
Received: Friday, 30 Jun 2017, 7:14PM
To: Mikkel Fahnøe Jørgensen [mikkelfj@gmail.com]; quic@ietf.org [quic@ietf.org]; Christian Huitema [huitema@huitema.net]; Mike Bishop [Michael.Bishop@microsoft.com]
Subject: Re: Unidirectional streams PR

I've read through both approaches and commented on both PR with concrete issues. I would like to voice some high level thoughts as well.

I believe the purpose of the unidirectional streams exercise is two-fold: maybe reduce complexity of transport, enable applications to have easier mappings.

I have implemented the stream state machine specified in the current draft and I have to stress this very much that no matter what state diagram we specify in the draft, the implementation of the state machine will not match 1:1, there are always hidden states. One such concrete example is when you reset a stream you might want to discard any incoming data vs if you're in half closed you would want to process and buffer it. This creates a new hidden state which is not captured in the state machine.

To me personally, the initial draw for pure unidirectionality (@Martin's proposal) was to reduce the number of states in the transport to make the transport easier to implement and not so much the easier mappings of applications. We're chartered to work on HTTP/2 first and that's my primary interest as well. It seems though that in HTTP/2 the vast majority of transactions are actually bidirectional, and it only needs unidirectional support for pushes. I think unidirectional streams doesn't add new functionality to HTTP/2.

However after looking at the proposals and the feedback, as a transport implementor I'm rethinking my initial draw towards purely unidirectional streams such that I might as well take up the burden to implement bi-directionality once so that the apps can be simpler.

That being said we need some concept of unidirectionality in the transport to support the push use case for HTTP/2. It is kind of awkward right now that we need to send a FIN from the client to close a push stream.

I'm not in favor of #656 because it adds more complexity to the state machine, however I'm more of a fan of @Ian's do nothing + app dictates a manual transition, since that allows us to keep the same state machine flow and let the app get undirectionality by explicitly having the app transition the stream state machine as needed. There are some cool things in @Martin's proposal that I would actually like to see back in the HTTP mapping with bidi streams like stream headers for pushed streams, however I'd rather prefer the do nothing + manually transition states with application coordination.

Subodh
________________________________
From: QUIC <quic-bounces@ietf.org> on behalf of Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com>
Sent: Thursday, June 29, 2017 12:02:09 PM
To: quic@ietf.org; Christian Huitema; Mike Bishop
Subject: Re: Unidirectional streams PR

On 29 June 2017 at 20.40.50, Christian Huitema (huitema@huitema.net<mailto:huitema@huitema.net>) wrote:

I am looking at the "mixed" scenario, in which the client would open an unidirectional stream with an associated "stream N" in the other direction. Will we say that doing so automatically pushes the server's maximum stream ID to some value greater than N?

I believe the streams need to operate independently: having endpoint A open a unidirectional stream A/N that can be responded to by endpoint B necessarily requires that B has granted A a limit of at least the value A/N. If the stream A/N permits association by one or more streams B/M initiated by B, each of those streams necessarily must be at or below the limit granted by A but only once those streams are in fact opened. Endpoint A might never grant sufficient streams to enable B to respond. The identifiers B/M chosen by B are unknown to A.

Note that there is a problem with enforcing how many streams that can be associated with A/N because A/N might be closed and gone. Keeping state is problematic. On the other hand it is trivial to reject associations with streams that have not yet been opened, especially if streams are opened in strict order. Implicit opening of lower valued streams will not work, and is not needed.