Re: Partially Reliable Message Stream

Roberto Peon <> Fri, 01 June 2018 18:19 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 54E6A124234 for <>; Fri, 1 Jun 2018 11:19:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.72
X-Spam-Status: No, score=-2.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, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01, T_DKIMWL_WL_MED=-0.01] autolearn=unavailable autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key) header.b=ME78/X3o; dkim=pass (1024-bit key) header.b=JFXxw6Kp
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id ub0NAUqKjqd9 for <>; Fri, 1 Jun 2018 11:18:59 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 6908A126B6D for <>; Fri, 1 Jun 2018 11:18:59 -0700 (PDT)
Received: from pps.filterd ( []) by ( with SMTP id w51IIEZn026414; Fri, 1 Jun 2018 11:18:53 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : mime-version; s=facebook; bh=vw2gNgHTlzbcYFEQmqzjC8rM4PCetq2Hzsc+khUGXag=; b=ME78/X3o50GVLA1tCiYwgzlzIFKAs931STNDwGWg6mpJQltPv2UNvQV2DFvCV5pKT8jL YJfX/wL6xDg7oavPadzY0y4xNZk9tITaj4/YcLwvKAHIjIH/+d7N/O3wc22SSiN2HwJa 24npbBEqVa8TYDMSc8VYWMs/kZN+FnGdH8I=
Received: from ([]) by with ESMTP id 2jb86d8kbd-2 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 01 Jun 2018 11:18:53 -0700
Received: from ( by ( with Microsoft SMTP Server (TLS) id 14.3.361.1; Fri, 1 Jun 2018 11:18:51 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=selector1-fb-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vw2gNgHTlzbcYFEQmqzjC8rM4PCetq2Hzsc+khUGXag=; b=JFXxw6KprUZSPdriWfubNS4RnCn5qgNXIXdEcf8HvWzpM4k6FHZtNGv6HhWl1aQpOHpId/itLMtSehLkk3TNhgtOOId+RQWU3yMUHFX7iv3yMV+UMa3jpE3rrsAs5E7g7YHnJlIKzG9BxRQwHTQhM25y0gnkDrdnDwLHIgaENw8=
Received: from ( by ( with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.797.11; Fri, 1 Jun 2018 18:18:50 +0000
Received: from ([fe80::949a:9cbd:277c:96e0]) by ([fe80::949a:9cbd:277c:96e0%4]) with mapi id 15.20.0797.020; Fri, 1 Jun 2018 18:18:50 +0000
From: Roberto Peon <>
To: Jana Iyengar <>
CC: Mike Bishop <>, Martin Thomson <>, QUIC WG <>, "Lubashev, Igor" <>
Subject: Re: Partially Reliable Message Stream
Thread-Topic: Partially Reliable Message Stream
Thread-Index: AdP4Mo3KTicRHsMuS7e4Jrowbk1vdQAMuR2gAAT/n4AAAG2XyQAFL0wgABjGQgcACwyMAAAeyAgA
Date: Fri, 1 Jun 2018 18:18:50 +0000
Message-ID: <>
References: <> <> <> <> <> <> <>
In-Reply-To: <>
Accept-Language: en-US
Content-Language: en-US
user-agent: Microsoft-MacOutlook/10.d.1.180523
x-originating-ip: []
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; BYAPR15MB2262; 7:uBv2ZLi/mF/ExXC0hxoFr1lriXKFb43u2DjJ3T4v23yyLuOfTI6OSJmAV9aoDh4eHv4rsd96wI7NULKOQ4HoEBZudt7/DSRH+DGpNWdGuDn/daXeFb4gK16SXVQHdqFWt7AMZKuCUaQyBX2ATl3cpZ1UbIjmufEmaMOukGGgIcD2Ha4BWSD8vFTy2n1q1mF6T8skfhbSJrFZVK6qso8gNROM04hH79mOY6FFSPZYWMWUkKMv7G+E4r36Ig6oDu4o; 20:zmGxVnZZAwq1wdU41rhGzV0lXGl5Cx6FZOYCvXg+VKRWKEeMgU2lrKHrxAgC7tCHCE/gV6PC/T2MYpyuJWcBqYEMK78QLH3sGztLAPE84k1CKOLw6jYstyOBc19UEhUHReSVKAVry/mmXliKlX43YZi+aW4rNa6toFiXO7D5jrk=
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:BYAPR15MB2262;
x-ms-traffictypediagnostic: BYAPR15MB2262:
x-microsoft-antispam-prvs: <>
x-exchange-antispam-report-test: UriScan:(28532068793085)(190756311086443)(10436049006162)(85827821059158)(67672495146484)(21748063052155);
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231254)(11241501184)(944501410)(52105095)(3002001)(93006095)(93001095)(149027)(150027)(6041310)(20161123560045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:BYAPR15MB2262; BCL:0; PCL:0; RULEID:; SRVR:BYAPR15MB2262;
x-forefront-prvs: 0690E5FF22
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(346002)(366004)(39860400002)(376002)(39380400002)(189003)(199004)(76176011)(66066001)(6486002)(229853002)(45080400002)(6506007)(6246003)(476003)(59450400001)(68736007)(2420400007)(11346002)(83716003)(5660300001)(3846002)(39060400002)(2616005)(54906003)(790700001)(6306002)(58126008)(316002)(3480700004)(8936002)(54896002)(82746002)(33656002)(478600001)(6916009)(6512007)(5250100002)(606006)(4326008)(236005)(8676002)(102836004)(3660700001)(6116002)(2900100001)(53546011)(81166006)(81156014)(25786009)(14454004)(2906002)(97736004)(36756003)(6436002)(105586002)(26005)(186003)(7736002)(106356001)(93886005)(99286004)(53936002)(486006)(7110500001)(575784001)(3280700002)(15650500001)(86362001)(446003)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:BYAPR15MB2262;; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None ( does not designate permitted sender hosts)
x-microsoft-antispam-message-info: dhvJ1zezbkmAhn3Q7my/suf31nw1UPQmspWI6tF6PUPyXsRafggfTuu0wmOC8k9DY6+Nndko+UEwIc2vvzt31rRlgvh83eBmLeaSmQsveBnfCNt1EBioPdxloaiHrclGkguJ+MnR0QnW7Lc63Q1xQIw+VYH59s4+5A8E0BTy2Scj1PqGdNEeDm/LnbzQ8Ixp
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_FFE07B1FB45A4DA6AFA8059F7DAADBE2fbcom_"
MIME-Version: 1.0
X-MS-Office365-Filtering-Correlation-Id: 9ff14221-1ae5-4e5f-60cc-08d5c7ec1ff6
X-MS-Exchange-CrossTenant-Network-Message-Id: 9ff14221-1ae5-4e5f-60cc-08d5c7ec1ff6
X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Jun 2018 18:18:50.4305 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR15MB2262
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-06-01_12:, , signatures=0
X-Proofpoint-Spam-Reason: safe
X-FB-Internal: Safe
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: Fri, 01 Jun 2018 18:19:03 -0000

Many messages are less efficient from a caching perspective (caches prefer larger files that stream over lots of small scatter/gather).
If we had a non-HTTP mapping of the network data->disk, that isn’t an issue, but that wouldn’t leverage any of the learnings we’ve had from HTTP caching…

From: Jana Iyengar <>
Date: Thursday, May 31, 2018 at 1:38 PM
To: Roberto Peon <>
Cc: Mike Bishop <>be>, Martin Thomson <>om>, QUIC WG <>rg>, "Lubashev, Igor" <>
Subject: Re: Partially Reliable Message Stream

I'm not keen to get into the weeds of this discussion at this time (as you say, it's for v2), but I understand the overall design. A few higher-order points with this design direction:

1. There's clear demarcation of app messages, but they aren't really made first class citizens. If you did that, I imagine that you might have a simpler design. For instance, define a MSG_STREAM frame, which supports message streams (instead of the current byte streams), and then you can cancel messages easily without having to do stream offset shenanigans.

2. Your design has exactly one ordering capability, which is limiting. Generally, apps that can drop messages and read subsequent ones are also capable of handling messages out of sequence. You'll want to support partial ordering as well and not constrain messages to be only delivered in strictly linear order.

3. I'm keen to see what we can do with using streams as messages. We don't need to punt everything to the app (as your text suggests), but we can start with a grouping of streams (or messages) and building flow control mechanisms for these groups. I suspect this might be cleaner, and it gives you flexibility to consider various orderings of messages. When we're closer to v2, I'm happy to spin up a draft exploring this direction.

On Thu, May 31, 2018 at 8:21 AM, Roberto Peon <<>> wrote:
Yes. You may want a single resource for an output which you may be generating in parallel. Even if a single thread 'owns' the stream, you've lost the ability to coordinate the data it recieves by monotonically increasing offset.

Renumbering the offsets breaks the file-like abstraction we've effectively used for http.


Sent via the Samsung Galaxy S7, an AT&T 4G LTE smartphone

-------- Original message --------
From: Mike Bishop <<>>
Date: 5/30/18 8:33 PM (GMT-08:00)
To: Roberto Peon <<>>, Martin Thomson <<>>
Cc: QUIC WG <<>>, "Lubashev, Igor" <<>>
Subject: RE: Partially Reliable Message Stream

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 <<>>; Martin Thomson <<>>
Cc: QUIC WG <<>>; 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.