Re: Unidirectional streams PR

Jo Kulik <jokulik@google.com> Wed, 28 June 2017 14:09 UTC

Return-Path: <jokulik@google.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 3E45412783A for <quic@ietfa.amsl.com>; Wed, 28 Jun 2017 07:09:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.701
X-Spam-Level:
X-Spam-Status: No, score=-2.701 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, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.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 EqSAoajKjdVb for <quic@ietfa.amsl.com>; Wed, 28 Jun 2017 07:09:02 -0700 (PDT)
Received: from mail-yw0-x22f.google.com (mail-yw0-x22f.google.com [IPv6:2607:f8b0:4002:c05::22f]) (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 78791126557 for <quic@ietf.org>; Wed, 28 Jun 2017 07:09:02 -0700 (PDT)
Received: by mail-yw0-x22f.google.com with SMTP id j11so24769422ywa.2 for <quic@ietf.org>; Wed, 28 Jun 2017 07:09:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=iR3eSlPjIMWwP0eeiMsKMLWBp7L1/OAQnrsR3mVCYH4=; b=E252uThASMn+Xtd7wUPbyqs+IQNZl/Yxj980RZx9FQExA2KZbeRLfzZZIbu9/xXWJY RnCWc8hy50etLA6sfPksT8ang6uVvIfNU2KoCgJeOeiaS8L5RMXehiF+rEhodsAv9jYj jkKJE2J/VODUdfotONbEJFqwz/EbeHioZiDt1PPZuQDfDoiXKE3zzjEJs1yNh3VGwzeN G3RPlHNdQNijgGXczmC3YGWgtFeyp9D1LxesI4+QNXLaPPx1ewABcgxyQWRGVFcYmETN ZL9JFeWAh779WcJPFA80/IRi3OcQvpnGlK7jdtCkWSpnTeodQE3MJc3y+dnMMUh3QpZ8 rKJA==
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; bh=iR3eSlPjIMWwP0eeiMsKMLWBp7L1/OAQnrsR3mVCYH4=; b=KiuBxSUZBU5OOUL1nbX7SqDg0h54XdOLSR32PiATPZ+dRGoz0I7GllKxJtNLMC2Vdn Kt/aXm2HYKAFxqYkEn7xldIhk4fO7btpswyK8tsg0g6zsPaPBcpkbB8xaJBUHNS34p3y 3xd9yoWFnwBsh2/Cw61Y/gzpntaBnnR/jXVEhCQVDbznItEZsqy6RZJ07AfDOMdxOGu4 w+OS0z54biebTiLz/Fn2LZ+1OyTLIpbw47JXuD9Hww70XHYYcf2cLIWychsQ6AdOQXXL DTnMx/FJexzzhcNiCrXaSfCqRN68nNRa2q1g6OHZm/vUSbKUAUAjiptrr1SsYSVojIF0 JN1Q==
X-Gm-Message-State: AKS2vOzx8LUc5pypO1kbQ9DAyGlm+71jqMy1ZBdOmQ/xar3QLYA9mdaz cpxpol2EPA9ntMCTNFBVJeNinxCRqcqR
X-Received: by 10.129.146.15 with SMTP id j15mr7757089ywg.283.1498658941214; Wed, 28 Jun 2017 07:09:01 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.37.5.209 with HTTP; Wed, 28 Jun 2017 07:09:00 -0700 (PDT)
In-Reply-To: <CAN1APdc3YO4-FEc6C--PzFGxzQiAUeBZ96HkjtjS1RR0qigrzw@mail.gmail.com>
References: <CAN1APdc_ckZu39ZZTETv04iZieogoE_NQCBR-n0jHrC-9dM7Aw@mail.gmail.com> <5d69489d-8f46-ebbe-4e5c-fa6c02ffd8dd@huitema.net> <CAF4GZgBm7525i2GxiN-Pv66g0WqbDH==fRXN27=7ursNA70w1Q@mail.gmail.com> <20170628124221.GA15608@ubuntu-dmitri> <CAN1APdc3YO4-FEc6C--PzFGxzQiAUeBZ96HkjtjS1RR0qigrzw@mail.gmail.com>
From: Jo Kulik <jokulik@google.com>
Date: Wed, 28 Jun 2017 10:09:00 -0400
Message-ID: <CAE=ybzNtSZx9-bj9-n-ieLMB=YvJCjCExugvA3_JPVrdEEqK9A@mail.gmail.com>
Subject: Re: Unidirectional streams PR
To: Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com>
Cc: QUIC WG <quic@ietf.org>, Dmitri Tikhonov <dtikhonov@litespeedtech.com>
Content-Type: multipart/alternative; boundary="94eb2c094216d52814055305b996"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/Grr-hUFiZU1aGkZe5Fn3n4sCx0Q>
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: Wed, 28 Jun 2017 14:09:05 -0000

I'd like to pop back up to a comment Igor made last week, because I find it
helpful in thinking about the design space:

I think of three layers of abstraction:
>
> 1.       QUIC Wire Protocol (the thing described by the QUIC Transport
> RFC)
> 2.       QUIC Library API (a library exposing some useful abstractions --
> such as blocking/non-blocking unidirectional streams and bidirectional
> “sockets” -- and implementing them using QUIC Wire Protocol)
> 3.       Application (something that uses QUIC Library APIs)

I think there is some argument to be made that Martin's original proposal
did not take into account how we would achieve (2) for bi-directional
streams.  (I don't think it strictly said "thou shalt not do (2)" either,
but that is up to interpretation.)

Several people have argued that we do not want every application to have to
re-implement bi-directional streams (3) for every application, and this is
not how g-quic (our largest deployment) works right now.  These arguments
make sense to me, but YMMV.

Just because the particular *mechanism* that is being proposed has some
issues, however, doesn't scream out to me, at least, that we should abandon
this particular *design goal*.  The goal being a transport protocol that
can elegantly fit with a uni/bi stream model.  Now, if we conclude that
there can never be an elegant model that achieves this goal, then so be
it.  But I also feel like we haven't reached that point in the discussion
yet.  (At the very least, this discussion has been fruitful to me in terms
of mapping the design space and elucidating requirements).

One of the reasons I still think this design goal is under consideration is
that Ian and Igor/Mike have been talking about alternate solutions which
have a similar flavor.  During the recent "quiet"ness on the thread,
personally, I've been waiting to hear more from them.

On Wed, Jun 28, 2017 at 9:41 AM, Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com
> wrote:

> In reply to Ranjeeth
>
> It is not only a matter of simplicity for the sake of simplicity:
>
> - A complex transport layer might end up being poorly implemented leading
> to reduced interoperability and ultimately adoption. This complexity is not
> only in implementation but also in understanding the exact semantics of
> stream lifetime. Even if the spec is sufficiently clear, it will still be
> open to misinterpretations.
>
> - Bi-directional state may have to be maintained longer and with more
> overhead than with uni-directional streams, especially under loss,
> potentially leading to poor performance and poor resource utilisation
> because the transport layer has insufficient information.
>
> - The extra complexity at the application layer may be overstated - it is
> significantly simpler to manage a map that associates to two streams than
> it is to maintain bi-directional state at the transport layer. It is even
> possible to implicitly link streams with same identifiers, e.g. in a RPC
> scenario. That said, I do see a potential benefit of a wrapper that
> implements the common bi-directional case.
>
> - Complexity at the application layer may be duplicated, but
> implementation errors are also isolated to that application. Specifically
> for HTTP I would assume that QUIC transport and QUIC HTTP implementers
> would be large the same for a long time to come, so I would not expect the
> tradeoff here to be particularly concerning.
>
> - Unix pipes are traditionally constructed as a pair of uni-directional
> file descriptors and that is a reasonably proven model. C’s standard
> library stdin, stdout and stderr is an example of an asymmetric model with
> implicit linkage between uni-directional file descriptors.
>
> - There are lots of use cases for non-HTTP like connectivity - Kafka high
> volume message queuing for example. The industry trend appears to move
> towards asynchronous processing and messaging. It depends on whether you
> look at QUIC as a TCP + TLS replacement, or as a HTTPS / REST RPC
> replacement.
>
> - Uni-directional streams may currently be unproven in the wild, but a
> proposal is needed before an implementation can be made and testet. I agree
> that it is easy to design into wrong assumptions without real world testing.
>
> - There will hopefully not be a large number of successors to QUIC -
> perhaps some purpose specific variants, e.g. for embedded use. Widespread
> adaptation and compatibility is very necessary so it makes sense to have
> QUIC being sufficiently simple and expressive to achieve this goal. A
> polymorf QUIC will not achieve that goal. On the other hand, a solid QUIC
> foundation can be used for a large number of application protocols.
>
> - Finally, it may turn out that uni-directional streams just is a bad idea
> - I doubt it, but I do believe real world tests are needed.
>
> Kind Regards,
> Mikkel Fahnøe Jørgensen
>
>
> On 28 June 2017 at 14.42.36, Dmitri Tikhonov (dtikhonov@litespeedtech.com)
> wrote:
>
> On Tue, Jun 27, 2017 at 02:31:38PM -0700, Ranjeeth Kumar Dasineni wrote:
> > 2. We are overplaying the simplicity of design. Even if we deem
> deployment
> > experience not a concern, if every application layer protocol that needs
> > support for bidirectional streams has to implement some correlators and
> > such above, that's a net negative in terms of complexity.
>
> This is an important point: we want QUIC adoption to be made easy.
> A program that speaks HTTP today should be able to use an existing QUIC
> library without having to emulate bidirectional streams in order to fit
> it into HTTP usage pattern. Forcing every one of these programs to do
> this is certainly a hurdle.
>
> - Dmitri.
>
>