RE: Partially Reliable Message Stream

Mike Bishop <> Thu, 31 May 2018 03:33 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 6BC2A1316C8 for <>; Wed, 30 May 2018 20:33:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.909
X-Spam-Status: No, score=-1.909 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id p25IZjFP4dkT for <>; Wed, 30 May 2018 20:33:01 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 238E51316C3 for <>; Wed, 30 May 2018 20:33:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=selector1-evequefou-be; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VV8UMlVgN7Z7SekTpNGCH2TVaB+DbNxghnXidsqIhJs=; b=RIDFVz7DhEvhmH88PyVpINiok34UaXUeY0MPlMmBJVheRMX/RqMmaOvfMC52n4GwSbkt5dsTIa1Vv6G14dUSHBKv99dKLgQk6U/SIt521n+k5FHS94BWFiEv5vCrnCl2ESBX2Ntv7HzD+ROX7TaGaA/ctYkQWFLp92rnCvKmqHA=
Received: from ( by ( with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.820.11; Thu, 31 May 2018 03:32:54 +0000
Received: from ([fe80::c1ff:4f0e:a59b:b9a9]) by ([fe80::c1ff:4f0e:a59b:b9a9%13]) with mapi id 15.20.0797.020; Thu, 31 May 2018 03:32:54 +0000
From: Mike Bishop <>
To: Roberto Peon <>, Martin Thomson <>
CC: QUIC WG <>, "Lubashev, Igor" <>
Subject: RE: Partially Reliable Message Stream
Thread-Topic: Partially Reliable Message Stream
Thread-Index: AdP4Mo3KTicRHsMuS7e4Jrowbk1vdQAMuR2gAAT/n4AAAG2XyQAFL0wg
Date: Thu, 31 May 2018 03:32:53 +0000
Message-ID: <>
References: <> <>, <> <>
In-Reply-To: <>
Accept-Language: en-US
Content-Language: en-US
authentication-results: spf=none (sender IP is );
x-originating-ip: [2601:600:8080:5a28:5405:472:6b:afc4]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; SN1PR08MB1471; 7:kyXTbJ6xEpypSQA4j0VnsQ/WL/TlFxnPb3FJgSDjdh1075D4VPVxxBhq0kHjirWBNINF+Cbv+JSLdtMRPqgsAOTEEEwW7DcaE3VmiaOvVO8znzq6tQdInLM5lfZfbAgg3HKEfDmHawpgq9v34zrEbN1pAvKr9W5Jtsd0TTTCU4VVji5ZmI74dpcQEPNxs7+PpvQzG8Z4WzihPRDs8743HzXiNEn+Ou8PEKTGG11h/lwTdy2T239Q/iAXXU3K1qu/
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:SN1PR08MB1471;
x-ms-traffictypediagnostic: SN1PR08MB1471:
x-microsoft-antispam-prvs: <>
x-exchange-antispam-report-test: UriScan:(28532068793085)(190756311086443)(10436049006162)(85827821059158)(67672495146484)(21748063052155)(265313219721884);
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(3231254)(944501410)(52105095)(10201501046)(93006095)(93001095)(3002001)(149027)(150027)(6041310)(20161123562045)(2016111802025)(20161123560045)(20161123558120)(20161123564045)(6072148)(6043046)(201708071742011)(7699016); SRVR:SN1PR08MB1471; BCL:0; PCL:0; RULEID:; SRVR:SN1PR08MB1471;
x-forefront-prvs: 06891E23FB
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39830400003)(39380400002)(346002)(376002)(366004)(396003)(189003)(199004)(6246003)(93886005)(86362001)(7736002)(575784001)(6436002)(97736004)(105586002)(106356001)(186003)(68736007)(2900100001)(110136005)(54906003)(316002)(606006)(229853002)(74316002)(46003)(19609705001)(25786009)(7110500001)(486006)(5660300001)(5250100002)(8676002)(478600001)(7696005)(39060400002)(8936002)(81156014)(81166006)(76176011)(54896002)(14454004)(3660700001)(9686003)(3280700002)(6306002)(3480700004)(99286004)(2420400007)(74482002)(236005)(2906002)(15650500001)(102836004)(4326008)(6116002)(790700001)(446003)(59450400001)(45080400002)(476003)(11346002)(53936002)(55016002)(6506007)(53546011)(33656002); DIR:OUT; SFP:1102; SCL:1; SRVR:SN1PR08MB1471;; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:0;
received-spf: None ( does not designate permitted sender hosts)
x-microsoft-antispam-message-info: ZLjOOvaGc9QbXzBdVzS9k5Q3mAVa75iCP/C3Tvwos9rBBzpMCaCPLk38kRyg/L6fV7BO6+KBGU8i0uBf1rHXDmw9pcuZyIjU+8Ds/jaqSzVOhs+RdxBKgLEsDady+h80KhEFwHKl+xL49o8jL68tTxy5JXQKIF2KvjekdNXQJ4z346hX9g421Cg8cxY9pVOE
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_SN1PR08MB1854EB788295504BEE169A25DA630SN1PR08MB1854namp_"
MIME-Version: 1.0
X-MS-Office365-Filtering-Correlation-Id: 3c738ec8-49ea-4886-165d-08d5c6a731cf
X-MS-Exchange-CrossTenant-Network-Message-Id: 3c738ec8-49ea-4886-165d-08d5c6a731cf
X-MS-Exchange-CrossTenant-originalarrivaltime: 31 May 2018 03:32:53.8724 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 41eaf50b-882d-47eb-8c4c-0b5b76a9da8f
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR08MB1471
Archived-At: <>
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Thu, 31 May 2018 03:33:06 -0000

Just to be clear....  You're suggesting multiple threads that would be writing to a single stream in parallel, rather than a single thread "owning" the stream?

From: Roberto Peon <>
Sent: Wednesday, May 30, 2018 6:03 PM
To: Mike Bishop <>be>; Martin Thomson <>
Cc: QUIC WG <>rg>; Lubashev, Igor <>
Subject: Re: Partially Reliable Message Stream

I find it confusing as well.  I far prefer keeping the offsets monotonically increasing as it allows for real-world use of a partially reliable stream (where you may not recieve that data but you can at least figure out what you did get and interpret it).
I dont know how one wohud resolve the race even within the sending application -- one thread sends, another thread sends while the first says to forget about stuff. I dont know what offset stuff ends up at in such cases, and so I cannot frame data in a way that is non-synchronous. That defeats some of the main reasons to do partial reliability (i.e. to reduce jitter).
Draft 02 seemed to be going in a better direction w.r.t the usecases i can conceive of. I think rewinding to that and then potentially figuring out how to simplify it would be fun!
I'm excited to have this being discussed, since there is pent up demand to use it already.
Get Outlook for Android<>

From: QUIC <<>> on behalf of Martin Thomson <<>>
Sent: Wednesday, May 30, 2018 5:50:59 PM
To: Mike Bishop
Cc: QUIC WG; Lubashev, Igor
Subject: Re: Partially Reliable Message Stream

Like Mike, I find this gap thing confusing.  And Mike's message
helped, but not a lot.

It took a while to realize that forcing a gap creates a new starting
point for the next message that forces the recipient to recognize and
deal with.  However, the logic for identifying that is just hard and
it's an unnecessary imposition in my view.

Say I send a message with a length of 10 and only two octets make it
onto the wire (as with your example), then it is immediately
abandoned.  Your solution would have the EXPIRED_STREAM_DATA force a
gap after the second octet, so that the next message could start at
offset 3 rather than offset 10.  That saves the remaining 7 octets of
flow control credit.  (Use bigger numbers and perhaps it seems more

If the octets that cover the gap were sent, then you have a problem
because now you have sent two versions of the same octets, so you can
only do this if the octets were never sent.  It starts to get closer
and closer to the point where a new stream is just easier.

Worst, I think is that the receiver has to have complicated logic for
identifying that a gap exists and dealing with it.  It has to read up
to what it has, observe that the data has expired, then learn where
the gap ends, then resynchronize based on 1+gap_end for the next

Better to eat the flow control cost in my view.  Or send RST_STREAM
and make another stream.
On Thu, May 31, 2018 at 8:48 AM Mike Bishop <<>> wrote:
> 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 <<>> On Behalf Of Lubashev, Igor
> Sent: Wednesday, May 30, 2018 9:45 AM
> To: QUIC WG <<>>
> 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 ( 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.