Re: Partially Reliable Message Stream

Martin Thomson <martin.thomson@gmail.com> Thu, 31 May 2018 00:51 UTC

Return-Path: <martin.thomson@gmail.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 2CE6C12EBAF for <quic@ietfa.amsl.com>; Wed, 30 May 2018 17:51:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 qflx96OUxqDq for <quic@ietfa.amsl.com>; Wed, 30 May 2018 17:51:12 -0700 (PDT)
Received: from mail-oi0-x22e.google.com (mail-oi0-x22e.google.com [IPv6:2607:f8b0:4003:c06::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4F70F12EB7F for <quic@ietf.org>; Wed, 30 May 2018 17:51:12 -0700 (PDT)
Received: by mail-oi0-x22e.google.com with SMTP id f79-v6so4097532oib.7 for <quic@ietf.org>; Wed, 30 May 2018 17:51:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=MTMfaXPR9jOKB2IJBO93n6KrEi0fIoHIDlKbPWBjiZ8=; b=scpY9ybjrST7muJuTRx8/9a7bFgKm6SDpsuyNAYAwtZN1D8jXlbmCrnuyB1eWg5lVN 3pTJLVe3U36sL/mN1wEfKXULohZTQY6ohNF1n1WYuxzE2jUzA33gwf22JJHQWq+vQ2t6 tV8Gacyz6p2axLybXPBtJqP6HSjtcoP8eIIBWNiYLnWIbpeb7zCUp5LfG28bRgpCGuG7 00OJRKZq5BkpCDJQer+IgPdWS9071kb7Psp3hekjukKs4zSGDFT2Yvc3o8yjiIwS3Z53 cYpljkFfQ9ZeJzsNkyzYO1quKKkGabUVDBMpaSeyrwodbv883my/FtAlBCh/kNNQDOJF MzPw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=MTMfaXPR9jOKB2IJBO93n6KrEi0fIoHIDlKbPWBjiZ8=; b=Ek5Lv6x8C4JZ44u2wqFNG6Hf/eOX03nMQSz7HF1iSfolLBQAupqy/Pr0xwnHUUA92M L4Q78qLTXE6PCqBvgmop0YCW/OqoXCxVpX9STFZHFaIsEOQA+llbpzw0qzBU/4swvf/F eF+IXThEgSxFwrwlgNFxSXofBY+N6y3SYFfwGzWDzvXjghzgQ8OUQfxgU17tzU8CV+RO OxKRfIFcyx6yfHObDBW+kGqkdfXDLPgw6AMy2DfNNa6DaVyIL4Ti9hXzQ4XEpH/8dEVT 8PtTIoJZHiRXd8VL3+vuDl/kOzAFmgudX1MKyFqITZmUv3ArBO89no9qndgpG51gjyI1 kpgA==
X-Gm-Message-State: APt69E3lnFmmLXPDMZh3AKBzbCOWTryaOT+MVuaWTRMcmqWmIBQKQM7o zuw6IJ2vcoQ/brqlcK844uttOqmHz+x5f2pkawozrQ==
X-Google-Smtp-Source: ADUXVKKt6wW95d7eyx3tBr0g5shMLRu/+nzMVgyvre8MQ1djjmzhah8IMYQFBM5KfMCl2uGEGpnzllgH0karhltVDis=
X-Received: by 2002:aca:1218:: with SMTP id 24-v6mr2723236ois.144.1527727871607; Wed, 30 May 2018 17:51:11 -0700 (PDT)
MIME-Version: 1.0
References: <d263c36bc5264842a65f04fc3b017538@ustx2ex-dag1mb6.msg.corp.akamai.com> <SN1PR08MB18541BF8B27EA5484FA6A437DA6C0@SN1PR08MB1854.namprd08.prod.outlook.com>
In-Reply-To: <SN1PR08MB18541BF8B27EA5484FA6A437DA6C0@SN1PR08MB1854.namprd08.prod.outlook.com>
From: Martin Thomson <martin.thomson@gmail.com>
Date: Thu, 31 May 2018 10:50:59 +1000
Message-ID: <CABkgnnWUpaFvz3d0SJJ99JkhdQfwdaxYosKwj3dK9BVZUtZ_yw@mail.gmail.com>
Subject: Re: Partially Reliable Message Stream
To: Mike Bishop <mbishop@evequefou.be>
Cc: "Lubashev, Igor" <ilubashe=40akamai.com@dmarc.ietf.org>, QUIC WG <quic@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/U7sZS3Y8WZsmamuzUeumteX1Wdk>
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 00:51:15 -0000

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
motivating).

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
message.

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 <mbishop@evequefou.be> 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 <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) 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.