RE: Partially Reliable Message Stream

"Lubashev, Igor" <ilubashe@akamai.com> Thu, 31 May 2018 01:20 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 6FC8C12EAF2 for <quic@ietfa.amsl.com>; Wed, 30 May 2018 18:20:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.72
X-Spam-Level:
X-Spam-Status: No, score=-0.72 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, HTTPS_HTTP_MISMATCH=1.989, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01, URIBL_BLOCKED=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 kpVHPOxGm8Tb for <quic@ietfa.amsl.com>; Wed, 30 May 2018 18:20:43 -0700 (PDT)
Received: from mx0a-00190b01.pphosted.com (mx0a-00190b01.pphosted.com [IPv6:2620:100:9001:583::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 A875412EAF7 for <quic@ietf.org>; Wed, 30 May 2018 18:20:43 -0700 (PDT)
Received: from pps.filterd (m0122333.ppops.net [127.0.0.1]) by mx0a-00190b01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4V1HE5T005040; Thu, 31 May 2018 02:20:40 +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=eri4NMko+aMsTyuPfvuYfA8pPiU7dntTDmx9SY0n8d0=; b=jNEwLUJwy/8+UEzINXfAsx7UcQRhbGlstdN4m4vcjqAN3wLJiU7cQk5+uAs+S3qVpb9K eq2SkP+PhKvWjd+9bXyTZYvbkEZRQzsmtpf5LMMIVY5oMdykkGtqlkKt6WbLkKwmCjia K3xOANFs9g7DZUZQgsZD2ZPbbS0lekqy/im0c1SUQCDFzWC1orRkY3ejlbzxCFalmcoy g5fZKpmMkqlC2gWz9DfeQUJTSRoW30fBbOvQly9XFfAXoOx1051thR5+UPBkzFOGoJBP Q4O///rXTYBzp+H2uU+Ug+mQu8womFeZe/CqSy/hjdcNydW04WKfaTuyQ7It1NESF0KB Ug==
Received: from prod-mail-ppoint3 (a96-6-114-86.deploy.static.akamaitechnologies.com [96.6.114.86] (may be forged)) by mx0a-00190b01.pphosted.com with ESMTP id 2j9cw5mxwr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 31 May 2018 02:20:40 +0100
Received: from pps.filterd (prod-mail-ppoint3.akamai.com [127.0.0.1]) by prod-mail-ppoint3.akamai.com (8.16.0.21/8.16.0.21) with SMTP id w4V1GM5Y024828; Wed, 30 May 2018 21:20:39 -0400
Received: from email.msg.corp.akamai.com ([172.27.25.34]) by prod-mail-ppoint3.akamai.com with ESMTP id 2j9cvv6c1c-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 30 May 2018 21:20:39 -0400
Received: from ustx2ex-dag1mb6.msg.corp.akamai.com (172.27.27.107) by ustx2ex-dag1mb1.msg.corp.akamai.com (172.27.27.101) with Microsoft SMTP Server (TLS) id 15.0.1365.1; Wed, 30 May 2018 20:20:28 -0500
Received: from ustx2ex-dag1mb6.msg.corp.akamai.com ([172.27.27.107]) by ustx2ex-dag1mb6.msg.corp.akamai.com ([172.27.27.107]) with mapi id 15.00.1365.000; Wed, 30 May 2018 18:20:28 -0700
From: "Lubashev, Igor" <ilubashe@akamai.com>
To: "quic@ietf.org" <quic@ietf.org>, "mbishop@evequefou.be" <mbishop@evequefou.be>
Subject: RE: Partially Reliable Message Stream
Thread-Topic: Partially Reliable Message Stream
Thread-Index: AdP4Mo3KTicRHsMuS7e4Jrowbk1vdQAMuR2gAAYHOXA=
Date: Thu, 31 May 2018 01:20:28 +0000
Message-ID: <56752d2e4628483caf2456ba31257844@ustx2ex-dag1mb6.msg.corp.akamai.com>
References: <d263c36bc5264842a65f04fc3b017538@ustx2ex-dag1mb6.msg.corp.akamai.com>, <SN1PR08MB18541BF8B27EA5484FA6A437DA6C0@SN1PR08MB1854.namprd08.prod.outlook.com>
In-Reply-To: <SN1PR08MB18541BF8B27EA5484FA6A437DA6C0@SN1PR08MB1854.namprd08.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_56752d2e4628483caf2456ba31257844ustx2exdag1mb6msgcorpak_"
MIME-Version: 1.0
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-05-30_10:, , signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1805310012
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-05-30_10:, , 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=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1805310012
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/XsZOA1qArkZMH7p316eGBvp0FK4>
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 01:20:47 -0000

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> On Behalf Of Lubashev, Igor
Sent: Wednesday, May 30, 2018 9:45 AM
To: QUIC WG <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.