RE: Partially Reliable Message Stream

Mike Bishop <mbishop@evequefou.be> Thu, 31 May 2018 03:31 UTC

Return-Path: <mbishop@evequefou.be>
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 61FD1131641 for <quic@ietfa.amsl.com>; Wed, 30 May 2018 20:31:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.08
X-Spam-Level:
X-Spam-Status: No, score=0.08 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=1.989, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=evequefou.onmicrosoft.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 6SeRyFJQJsLb for <quic@ietfa.amsl.com>; Wed, 30 May 2018 20:31:43 -0700 (PDT)
Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0095.outbound.protection.outlook.com [104.47.33.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5BB26131637 for <quic@ietf.org>; Wed, 30 May 2018 20:31:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=evequefou.onmicrosoft.com; s=selector1-evequefou-be; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=d0IvRq10baq9exOBuDmUuSytUGWNVpBhFcFUh64n4OY=; b=WWD6txjsDvNmjpK7dY8XYu6PlSnkdN3YvgJovoEYaNXVt3Ob3YiG1b2bH6RK1P+9mLqCvc3tjLTorTYUMW3xRGUzk8+PY7lVu49REyRSBycgTQxpawWhh9ujs72Biqed5s7CmICoY45WlYvHljgPckEuYDgyTrmDxMsAQFSft+8=
Received: from SN1PR08MB1854.namprd08.prod.outlook.com (10.169.39.8) by SN1PR08MB1678.namprd08.prod.outlook.com (10.162.133.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.797.11; Thu, 31 May 2018 03:31:40 +0000
Received: from SN1PR08MB1854.namprd08.prod.outlook.com ([fe80::c1ff:4f0e:a59b:b9a9]) by SN1PR08MB1854.namprd08.prod.outlook.com ([fe80::c1ff:4f0e:a59b:b9a9%13]) with mapi id 15.20.0797.020; Thu, 31 May 2018 03:31:40 +0000
From: Mike Bishop <mbishop@evequefou.be>
To: "Lubashev, Igor" <ilubashe@akamai.com>, "quic@ietf.org" <quic@ietf.org>
Subject: RE: Partially Reliable Message Stream
Thread-Topic: Partially Reliable Message Stream
Thread-Index: AdP4Mo3KTicRHsMuS7e4Jrowbk1vdQAMuR2gAAYHOXAABI83QA==
Date: Thu, 31 May 2018 03:31:40 +0000
Message-ID: <SN1PR08MB18543DDEB2765F23109E5949DA630@SN1PR08MB1854.namprd08.prod.outlook.com>
References: <d263c36bc5264842a65f04fc3b017538@ustx2ex-dag1mb6.msg.corp.akamai.com>, <SN1PR08MB18541BF8B27EA5484FA6A437DA6C0@SN1PR08MB1854.namprd08.prod.outlook.com> <56752d2e4628483caf2456ba31257844@ustx2ex-dag1mb6.msg.corp.akamai.com>
In-Reply-To: <56752d2e4628483caf2456ba31257844@ustx2ex-dag1mb6.msg.corp.akamai.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=mbishop@evequefou.be;
x-originating-ip: [2601:600:8080:5a28:5405:472:6b:afc4]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; SN1PR08MB1678; 7:Xn+LOwPqpCcJVKzrfxf+X+AKFpNviv+e8v97kpwAXVmH5J7jy0FItVyqd9PglzoBo1oZmcHlZPR8x2829Yx1GjEUABqq1MaDnMQkGFMW2z41bVa+lWj5lRKXjgsLIMFehcDs8N7TXkIHmDWFWd36l40SbssbgqrH88UsKf8szCFeL/aX3O0kY20xlkz/XGy/B+XV0xKiYIVwc0IZmUPa+OqeoWUK68/Raa7iRr2TKjDCKuB/M+7u+M7JJVl4S0yX
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(7021125)(5600026)(4534165)(7022125)(4603075)(4627221)(201702281549075)(7048125)(7024125)(7027125)(7028125)(7023125)(2017052603328)(7153060)(7193020); SRVR:SN1PR08MB1678;
x-ms-traffictypediagnostic: SN1PR08MB1678:
x-microsoft-antispam-prvs: <SN1PR08MB1678EFB2D613B548CC9C23D4DA630@SN1PR08MB1678.namprd08.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(28532068793085)(10436049006162)(21748063052155);
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(3231254)(944501410)(52105095)(149027)(150027)(6041310)(20161123560045)(20161123562045)(2016111802025)(20161123564045)(20161123558120)(6072148)(6043046)(201708071742011)(7699016); SRVR:SN1PR08MB1678; BCL:0; PCL:0; RULEID:; SRVR:SN1PR08MB1678;
x-forefront-prvs: 06891E23FB
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(376002)(39380400002)(39830400003)(396003)(366004)(189003)(199004)(51914003)(13464003)(316002)(68736007)(2906002)(59450400001)(5660300001)(5250100002)(15650500001)(606006)(2420400007)(3660700001)(3280700002)(33656002)(3480700004)(106356001)(476003)(8936002)(8676002)(76176011)(229853002)(7736002)(486006)(7696005)(6116002)(790700001)(81166006)(86362001)(46003)(110136005)(14454004)(55016002)(74482002)(11346002)(81156014)(186003)(446003)(99286004)(105586002)(102836004)(7110500001)(74316002)(478600001)(2501003)(25786009)(97736004)(236005)(6306002)(2900100001)(53546011)(53936002)(54896002)(9686003)(6436002)(6506007)(6246003); DIR:OUT; SFP:1102; SCL:1; SRVR:SN1PR08MB1678; H:SN1PR08MB1854.namprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:0;
received-spf: None (protection.outlook.com: evequefou.be does not designate permitted sender hosts)
x-microsoft-antispam-message-info: hFPQZmBmE+ZunAEU1RbcHPkzx3WmlLqAjn4G4OMmpOB+rM9MoAM1P2MmTDEuSn9T1eGrxXobAql/G/RC4mc192IFEYY9jZWZbrF+zHUo/LKJ8q6Kv1lK4VuTizI90ur+rK7I9SSDxArXAmb26CtC+1C2nbbIRJ3cR+PjFsxnkvmdl9m3OwYdre+6mSIBfB5R
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_SN1PR08MB18543DDEB2765F23109E5949DA630SN1PR08MB1854namp_"
MIME-Version: 1.0
X-MS-Office365-Filtering-Correlation-Id: e066508f-d3ed-43a3-b545-08d5c6a705ea
X-OriginatorOrg: evequefou.be
X-MS-Exchange-CrossTenant-Network-Message-Id: e066508f-d3ed-43a3-b545-08d5c6a705ea
X-MS-Exchange-CrossTenant-originalarrivaltime: 31 May 2018 03:31:40.2180 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 41eaf50b-882d-47eb-8c4c-0b5b76a9da8f
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR08MB1678
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/YHXaGgchQA6GK_uwDUA94LTn3a0>
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, 31 May 2018 03:31:47 -0000

Ah, I see - the second is talking about actions taken on receipt of a STREAM frame, not an ESD frame; I missed that.

From: Lubashev, Igor <ilubashe@akamai.com>
Sent: Wednesday, May 30, 2018 6:20 PM
To: quic@ietf.org; Mike Bishop <mbishop@evequefou.be>
Subject: RE: Partially Reliable Message Stream

Thanks for the review, Mike!

Yes, you got the purpose of the gap exactly right.

> Conflict in the doc.

Actually, I do not see a conflict, but it is true that the accounting is tricky, and the wording could be a bit better. The receiver maintains two distinct variables:
* smallest receive offset -- the smallest offset it is waiting for
* largest received offset -- just what it says, probably used for nothing else by the receiver but verifying compliance with flow control (important, since "largest received offset" - "smallest receive offset" = "size of in-use receive buffer" for the stream).

The quotation from section 5 says that when a new STREAM frame is received, data at offsets smaller than "smallest receive offset" should be discarded (since the receiver should not care for it anymore -- it is expired), but "largest received offset" should still advance if needed (since data has been received -- compliance with flow control is still required for STREAM frames).

-----Original Message-----
From: Mike Bishop [mbishop@evequefou.be]
Received: Wednesday, 30 May 2018, 6:47PM
To: Lubashev, Igor [ilubashe@akamai.com]; QUIC WG [quic@ietf.org]
Subject: RE: Partially Reliable Message Stream
I find the one octet gap a bit confusing, but as I think about it, I see why you need it.  If all the stream data arrived successfully (but hadn't been acknowledged yet due to loss of the ACK, delay, etc.) and the EXPIRED_STREAM_DATA gets lost, the receiver can only retroactively realize there was a jump.  Having an octet that is never transmitted ensures the receiver actually sees a gap, which means that an in-order API will not proceed until it has received either the missing octet or an EXPIRED_STREAM_DATA informing it the octet will never arrive.

This simplification (versus -02) comes at a price:  If an API were exposing stream data out-of-order, then in your example, the receiver knows that a message always begins on a ten-byte boundary.  A receiver can no longer find ten-byte boundaries, because the offset on the read side doesn't match the offset on the send side.  I agree with you that this seems like a reasonable trade-off for the simpler flow control.

One conflict I see in the doc:

*         Section 3 says:  Receipt of an EXPIRED_STREAM_DATA does not advance the largest received offset for the stream.

  *   Section 5 says:  A receiver SHOULD discard any stream data received for an offset smaller than the new smallest receive offset, possibly advancing the largest received offset for the stream.

Other minor nits are better done via PR.
From: QUIC <quic-bounces@ietf.org<mailto:quic-bounces@ietf.org>> On Behalf Of Lubashev, Igor
Sent: Wednesday, May 30, 2018 9:45 AM
To: QUIC WG <quic@ietf.org<mailto:quic@ietf.org>>
Subject: Partially Reliable Message Stream

I've just uploaded a new draft for partially reliable QUIC streams.  Note: this feature is likely not in scope for V1, but it can be an extension for V1 and/or a part of V2.

The new version 03 (https://tools.ietf.org/html/draft-lubashev-quic-partial-reliability-03<https://urldefense.proofpoint.com/v2/url?u=https-3A__tools.ietf.org_html_draft-2Dlubashev-2Dquic-2Dpartial-2Dreliability-2D03&d=DwMFAg&c=96ZbZZcaMF4w0F4jpN6LZg&r=Djn3bQ5uNJDPM_2skfL3rW1tzcIxyjUZdn_m55KPmlo&m=_kwXz2JdtqD8uvvd8h8cZ-GQ3_FgDf7dRoorJ-DYVhg&s=t0au9Hcc2L02NXlpLb99Y4e-72lBv2kC2hHZuGifUWg&e=>) no longer needs complex flow control changes and removes the need to transmit multiple frames in the same packet.


  *   Igor

P.S.
  There is also a new version 02, which includes a more complex algorithm with more features and different trade-offs.  But I think version 03 is a better match for the needs so far.