Re: Split error codes in two

Martin Thomson <martin.thomson@gmail.com> Mon, 25 September 2017 23:35 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 61B44132355 for <quic@ietfa.amsl.com>; Mon, 25 Sep 2017 16:35:10 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 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_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham 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 li5NQ7vN-jOU for <quic@ietfa.amsl.com>; Mon, 25 Sep 2017 16:35:08 -0700 (PDT)
Received: from mail-oi0-x22a.google.com (mail-oi0-x22a.google.com [IPv6:2607:f8b0:4003:c06::22a]) (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 20226134602 for <quic@ietf.org>; Mon, 25 Sep 2017 16:35:08 -0700 (PDT)
Received: by mail-oi0-x22a.google.com with SMTP id b1so9462684oih.4 for <quic@ietf.org>; Mon, 25 Sep 2017 16:35:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=80kNhgsNHiV7/fGNN/lWaext/rHjFrYVcqqo+7mis9w=; b=bQ0QPZ49+9EdRF+G5nBkkU5N8yLzSfpOY0bRYb5V79MMhE6cuK2zwkvNO8+/8vO3CO xhAnGSl0eOgtfd/VoaqeGg0IDyZnE8AS+aVWdoV+nCwHsZ2EiUX0h3sdIsVEPKF3FmHv LUXt7MdtzMKgeKgVNDS6hGtBrJWivmaxyf4V5sY2V3VGdVu7qVMEVSel4JkAoIcvshPf YGPiUyW1tC+hTxCYxoYjmqoPbnEAJWHRrJeeSZZQku0gllGn0pRcUtxpuxmwJnmXm+bb 0YPMKqfsl2AqEPUcZGJPkjzlXZthN4AbJdoromsQAOoWCC4Z1Tkk6mjWjIt4LbKvaL6v kdwA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=80kNhgsNHiV7/fGNN/lWaext/rHjFrYVcqqo+7mis9w=; b=XsLlw+kXo8AtBs7PiQturZSY2nuK0qoPPb/B1saLrCIT51hhK4ziHK47NiF8n3gWaQ fyYWsb3IHbKzyh0xEcIGZKNVR7Rl3st/ca0GOtXUTSiPl7Kb6/QQRCBnbU4LbUVf3lmU eHFHU8J8JsUT6eXYM7q2tem0o++RU8M859TmbL4UWdxve6+ZqC8W676MVqGkfxATdVkY HvQYAWfVNBR85QXVI2vCyjNj6aQvbyipEsHbDPm0jum3SDa7qsA+/uVfhIJqkn7fGaaa N3hn7IkIk61JKRV7DA8AZPsfwfEuAuHyokdklD3hMtmwg79WcgRonwx4pAkHNEglhZ9e +1LQ==
X-Gm-Message-State: AHPjjUhnjdZ3tccB5N9QeanDGmF/3hSEFU6Ko5MQQUHQWF+BIheoIZQe Lo2HXCHxvkrnndLNYsa4ePyMunrddiAqFZOHahI=
X-Google-Smtp-Source: AOwi7QAlUquCQ2vV4GjSDPhlRHB9/drChdTs8lz/MYoTdPD0QNYTyRfOjbjFWEB4hoVNyBe14x/YuKAfLmug8s5L9Pg=
X-Received: by 10.202.79.68 with SMTP id d65mr11445602oib.246.1506382507439; Mon, 25 Sep 2017 16:35:07 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.157.0.38 with HTTP; Mon, 25 Sep 2017 16:35:06 -0700 (PDT)
In-Reply-To: <022d9f140d9b4306a959e0dacac788e7@usma1ex-dag1mb5.msg.corp.akamai.com>
References: <CABkgnnWwGAyHzkST9o9ueVmBw3_TpJun=dv2X+HL2snXSZJgew@mail.gmail.com> <CACdeXiLS7W8cJbnT=orHkcd9reH=8QqhOzxWnUEpWZmfcdvd2g@mail.gmail.com> <CAGD1bZa-h0ZVh7kUYQtG3r93eH6TqRXnQ6YXAcscCrCQHk8LeA@mail.gmail.com> <CABkgnnXMFUP_c+2r6YeJouJXanHd8tFcqDKgU=C9UF0stPcXOw@mail.gmail.com> <CAGD1bZZZG9L0_d7Tmo8vfdAx+=LU+yi97N42vKFGo82K16Zycw@mail.gmail.com> <05505C10-8737-4C58-BC91-E401D2659AF0@in-panik.de> <MWHPR21MB0141F305CCE2B686F09549F887970@MWHPR21MB0141.namprd21.prod.outlook.com> <CAGD1bZY5xo5Krn=U3SBVUCPU4x2UAOcv2AnvzaRac9qJGM9KBg@mail.gmail.com> <DM5PR15MB14497BB2F1971C5965882875B6940@DM5PR15MB1449.namprd15.prod.outlook.com> <CAGD1bZbnpCxjdaEV_m_5XWEjtjmdxYTGh2VBoS8AgZdhxfsDhw@mail.gmail.com> <CABkgnnWRy17vuFRGhpvLBCKte3WeCdGa1M1feOBygQv+-AB2+A@mail.gmail.com> <CAGD1bZZL-4HzArTQfWrC+CbHYsyB6Wdx4cbz7+0X7YOiuc-+Qg@mail.gmail.com> <BN6PR21MB01302C7E8A43AF9DB7A63335876E0@BN6PR21MB0130.namprd21.prod.outlook.com> <bca00829d58049fb8a644f3787011fca@ustx2ex-dag1mb5.msg.corp.akamai.com> <d63880bf-7eaa-158b-a3f8-04142f288853@huitema.net> <E3F6F096-832D-4C4E-8BFA-5C1343F565E5@fb.com> <CABkgnnVXzKz-Y6DfNADYSPQC_WfO-QyX8bE5r84J7XkPjXVsaQ@mail.gmail.com> <022d9f140d9b4306a959e0dacac788e7@usma1ex-dag1mb5.msg.corp.akamai.com>
From: Martin Thomson <martin.thomson@gmail.com>
Date: Tue, 26 Sep 2017 09:35:06 +1000
Message-ID: <CABkgnnW67mdKrcdakc+qF2zmxWbF4RbK5K4aMsxjOXowQmQ_OQ@mail.gmail.com>
Subject: Re: Split error codes in two
To: "Lubashev, Igor" <ilubashe@akamai.com>
Cc: Roberto Peon <fenix@fb.com>, "quic@ietf.org" <quic@ietf.org>, Christian Huitema <huitema@huitema.net>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/252shW72ozKIsCvOJXlVQz8MTcY>
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: Mon, 25 Sep 2017 23:35:10 -0000

We've drifted dangerously close to defining an API.

You are suggesting an upcall that says "I've received a WRITE_ABORT on
stream X.  (optionally: I've stopped sending stream X.)  Should I (a)
reset, or (b) continue?"

Alternatively, you could configure the answer on streams with
defaults, or when you start writing.

That's a pretty well-defined notion in the abstract, but if we had a
transport-layer message, every generic QUIC stack would need to have
one or other mechanism.

On Tue, Sep 26, 2017 at 9:10 AM, Lubashev, Igor <ilubashe@akamai.com> wrote:
> I agree that in many cases, "streams-as-messages" model fits well in the application use case (not HTTP Stream 1, though).  It seems reasonable to suppose that an application would occasionally like to send a very large (100MB?) message, and it gives it to the transport in one shot -- maybe using something like Linux sendfile() API call.
>
> So now to your question:
>>   -> what is the transport going to **do** with a STOP_SENDING?
>
> The answer seems orthogonal to bidirectionality.  It would make sense for the transport to stop sending the message and notify the application that it did so.  The alternative is to continue sending the large file, spending significant network and CPU resources doing so, and hoping the application would be prompt at receiving the notification and asking the transport to cancel the transfer.  Both alternatives achieve the same semantics: "an app is notified that that the receiver refused to receive this message in its entirety".  The former option allows saving network and systems resources on the protocol level.
>
> In the "pipe" model (unidirectional or bidirectional), this is a question of whether only the sender is allowed to close the pipe, or the receiver is also allowed to close.
>
>
> -----Original Message-----
> From: Martin Thomson [mailto:martin.thomson@gmail.com]
> Sent: Monday, September 25, 2017 12:03 AM
> To: Roberto Peon <fenix@fb.com>
> Cc: quic@ietf.org; Christian Huitema <huitema@huitema.net>
> Subject: Re: Split error codes in two
>
> On Thu, Sep 14, 2017 at 12:40 AM, Lubashev, Igor <ilubashe@akamai.com> wrote:
>> Thinking about this a bit more, it seems that the key difference
>> between “tcp socket” and “two pipe pairs” models is independence of
>> the send and receive directions.
>
> I prefer Christian's analogy of streams as messages.  That's what motivated the design that I proposed.  Then you don't get "pipe pairs"
> you get "messages and (optionally) response messages".
>
> On Thu, Sep 14, 2017 at 5:03 AM, Roberto Peon <fenix@fb.com> wrote:
>> So many RPC models have failed utterly because they couldn’t handle
>> receiving the data in a streaming fashion.
>
> That doesn't invalidate the streams-are-messages model, it just recognizes that the messages cannot be sent and received as a single unit (unless they are 0 length, I guess).  Flow control, multiplexing, etc, etc...
>
> ~
>
> I want to come back to the original question in light of what we learned:
>
>  -> what is the transport going to **do** with a STOP_SENDING?
>
> I can't think of anything other than to tell the application.  That makes the answer pretty clear to me.
>
> I don't think that this discussion - valuable as it is been - has changed my position on this much.  Ideally I would like to enable all the various viewpoints on the question to be equally valid.  Building a protocol that can provide something that looks like a TCP socket is challenging though, because the complete close of a coupled pair cannot be done generically - I think that we all agree that this is impossible in the general case.
>
> I can appreciate the desire to build some of the pieces that might be needed to build a bidirectional close, but I think that is more dangerous than useful and would prefer to leave this to application protocols.
>