Re: QUIC API (was: Re: Small size of core QUIC library to replace TCP for embedded system)

Kazuho Oku <kazuhooku@gmail.com> Fri, 07 August 2020 09:17 UTC

Return-Path: <kazuhooku@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 E913C3A0DF8 for <quic@ietfa.amsl.com>; Fri, 7 Aug 2020 02:17:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 gQkO0RsBfAr4 for <quic@ietfa.amsl.com>; Fri, 7 Aug 2020 02:17:49 -0700 (PDT)
Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) (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 11EF43A0DF9 for <quic@ietf.org>; Fri, 7 Aug 2020 02:17:49 -0700 (PDT)
Received: by mail-ej1-x62b.google.com with SMTP id a26so1367240ejc.2 for <quic@ietf.org>; Fri, 07 Aug 2020 02:17:48 -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; bh=5DLjUbQ4kmy0dEKI7CuLf0XOVAeQyBoa3vKoSmO7Gck=; b=b17KJoxtBIS1094DWe/Mfbpx4rOCShQDcEM4hL1UZOGQM8yiPBN90lHSYvH29J8iXr bG1gGC/uAcJ98e+MFI8fHhWuonCSYY1eypf1+iAZbrlUh2IzkbDk0V44xHpin0e3GA30 I0rXVEFUG1pw1jOxIFXjcsPid+9HZZvN4zr9k+P9WZEDI/WWOeENVwQLJGhLhl4pVmon dHCBIHSDBmwY5F6JW+8cmqrq5U0GkB/xhBiBDu9/MGG/YKoqAX055zCM08GvSN9di5vy dDrOL7GEmA7DEIhkxWIJEOIxPqs57jtDGkGvBKCjETYSMMUZeb7hb2QK7WZtY4ecxkD0 IwHA==
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; bh=5DLjUbQ4kmy0dEKI7CuLf0XOVAeQyBoa3vKoSmO7Gck=; b=HBk9h1C4r5gYb8Kkaiyc1mWZa3FifbVBCLxDfV9+U300p/+rEKhi2++lCTAkNNXAMZ 4fdikK1pXwtVrDLHyY7CkRi087VjG68+bXq6IsfwyPiI9kZP13VizwKqKYm67k/C84No 1Goc+86MGFFjMWvBMg8DOmE6kFKyHrCBUGIPCjT3dSiXcOvFc8T47KKl0CsKB6R+FEhV gOpK85rNfVwwNL5Z4/rGckTh2ncehJZiue09omjl0fYTOw1bIKmJ8lofOXD5C2zydM3z sD64z2iaLMOD9u6I8xSOeNagXgCtskZHEvZW5u3dHDuNZ7iUaGBzUSq3PT1uEgacSzm6 zNOg==
X-Gm-Message-State: AOAM5310QuJNQFQGUEJve0WYCpQiKZYRPsmyvxEhDWbwUUTR8nIQYLQw 4bHFRBZHxsJ7kIPx4kCJJ+kXS88cl/20cucCBMk=
X-Google-Smtp-Source: ABdhPJwAuZQaMu7ZH94ggaiffl2URBAjCeUrqXHrTZndzOIBVjC46FHA/Ds0aN4m2H24oDutuXchOyGXmS3FJXEM4Sk=
X-Received: by 2002:a17:906:fc10:: with SMTP id ov16mr8696903ejb.171.1596791867357; Fri, 07 Aug 2020 02:17:47 -0700 (PDT)
MIME-Version: 1.0
References: <CAA=hcWS0V8ipsoAEFK3ejdA++Vzi+czth37=ntP4mnt8d=mtRg@mail.gmail.com> <F384B33C-70F8-45EF-AB5C-30D0A145659A@eggert.org> <CAA=hcWQ60GH2TnjvqBEGvVQ1whxNYwEWjQ+b9FW948GKvN570Q@mail.gmail.com> <2499749.AO4zfZtjs8@linux-9daj> <3D493D2B-BC8D-4CE9-B189-48770C3FA06F@eggert.org> <CAM4esxR+s-SCVOWb_-3TciVRk8Sp5NVWtjggqXM_XD2r3jup=Q@mail.gmail.com> <CALGR9oYDtdRyGAQ50OMFH2CTo=PR0ZwButK2DC26JkUhoifj1g@mail.gmail.com> <CAM4esxSkzijT8PMW7m2SY1j5c_AW=8L9tuq17RXWy+mmp4a0SA@mail.gmail.com> <CALGR9oacxe3EvYjeR_5yLpCga6EWcK_MLgvW_QCwidoH4Fjrzw@mail.gmail.com> <CAPDSy+4XZRFb6t_-caiH52TuaFib2dK8Ur8r3f8PhJGqL62JSg@mail.gmail.com> <fb0490e8-f275-13a7-2f08-0b5b179ceb68@huitema.net> <CAC7UV9bFS8-xc6WphNRc4yc=01YehX4vVfcPq6HxbzPw3=QaZA@mail.gmail.com>
In-Reply-To: <CAC7UV9bFS8-xc6WphNRc4yc=01YehX4vVfcPq6HxbzPw3=QaZA@mail.gmail.com>
From: Kazuho Oku <kazuhooku@gmail.com>
Date: Fri, 07 Aug 2020 18:17:36 +0900
Message-ID: <CANatvzzFJrQKsusHLgXMBT8iwB_y-kP-6KX6pDu_Z=JAf8kb4Q@mail.gmail.com>
Subject: Re: QUIC API (was: Re: Small size of core QUIC library to replace TCP for embedded system)
To: Robin MARX <robin.marx@uhasselt.be>
Cc: Christian Huitema <huitema@huitema.net>, Paul Vixie <paul@redbarn.org>, Lucas Pardue <lucaspardue.24.7@gmail.com>, David Schinazi <dschinazi.ietf@gmail.com>, Lars Eggert <lars@eggert.org>, quic <quic@ietf.org>, Martin Duke <martin.h.duke@gmail.com>
Content-Type: multipart/alternative; boundary="00000000000008bfea05ac46143a"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/pUqyEAQAOnkSJtfDZnC9excSXPc>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.29
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: Fri, 07 Aug 2020 09:17:51 -0000

+1 to others pointing out that it is difficult to define a common API.

In fact, I would point out that the APIs provided by existing QUIC stacks
are very different. Some QUIC stacks are designed like a layer. Others are
designed like a codec that takes inputs (of bytes) and returns an output
(of bytes). Some QUIC stacks are designed under the assumption that
applications "push" data, whereas other QUIC stacks are designed under the
assumption that the QUIC stacks would "pull" the data from application when
there's room to send something.

There are pros and cons in these approaches, and I do not think it would
be productive to agree on one particular approach through discussion.

At the same time, I would point out sometimes it is inevitable to define a
standard API, and I had assumed that that is happening in WebTransport (on
the W3C side). So maybe people looking for an API can contribute there?


2020年8月7日(金) 17:18 Robin MARX <robin.marx@uhasselt.be>:

> Personally, I would agree that creating a general purpose API just for
> QUIC would be difficult.
> I'm mainly thinking about what the interface for steering stream
> multiplexing/prioritization would look like, seeing as the specs are very
> light on details for these.
> Speccing something out for HTTP/3 should be do-able (and is being
> contemplated by some, e.g., https://github.com/hyperium/h3/pull/1),
> though potentially not as useful.
>
> I would echo Lucas' reference in thinking that abstracting from QUIC to a
> more high-level view of transport features with something like TAPS is more
> logical in the long run.
> Rather than putting all eggs in one basket, it would be good to get at
> least this one egg into that particular basket imo.
>
> Like Lucas and David, I'm also not sure how common/realistic of a use case
> the "I want to switch ad-hoc between QUIC implementations" argument will
> be.
> To me, a common API would be mostly interesting in writing re-usable
> high-level coding tutorials and teaching materials to help new devs use the
> protocol more quickly.
> From that perspective, you can make an even stronger argument for TAPS
> imo.
>
> With best regards,
> Robin
>
>
>
> On Fri, 7 Aug 2020 at 08:39, Christian Huitema <huitema@huitema.net>
> wrote:
>
>>
>> On 8/6/2020 5:58 PM, David Schinazi wrote:
>> > In theory, it could mean that one could write an application
>> > in such a way that it could swap QUIC implementations.
>> > I don't see that happening in practice. The application
>> > developer would have to periodically test against these
>> > implementations for them to work reliably, so the idea
>> > of a drop-in replacement sounds unreal to me.
>>
>> Yes. We had an example of that when testers wanted to plug their tools
>> to different QUIC stacks. Not impossible, but there was a lot of glue
>> required.
>>
>> >
>> > Additionally, in 2020, networking APIs are asynchronous.
>> > That means that a QUIC API would need to be tied to
>> > a specific asynchronous IO model, and those are tied
>> > to programming language and library choices. So any
>> > API would only work for applications that pick the same
>> > language and standard libraries.
>>
>>
>> People today are experimenting with a variety of application--stack
>> interactions. I think that's a good thing at this point. Take the
>> example of out-of-order delivery: really cool potential, but we have
>> very little experience. It might require tight integration with the
>> application, dealing with the intricacies of video codecs. I think that
>> in the next year or two we will gain some experience and maybe see a
>> small number of API models emerge. But attempting standardization before
>> that seems very premature.
>>
>> -- Christian Huitema
>>
>>
>>
>
> --
>
> Robin Marx
> PhD researcher - web performance
> Expertise centre for Digital Media
>
> T +32(0)11 26 84 79 - GSM +32(0)497 72 86 94
>
> www.uhasselt.be
> Universiteit Hasselt - Campus Diepenbeek
> Agoralaan Gebouw D - B-3590 Diepenbeek
> Kantoor EDM-2.05
>
>
>

-- 
Kazuho Oku