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

David Schinazi <dschinazi.ietf@gmail.com> Fri, 07 August 2020 00:58 UTC

Return-Path: <dschinazi.ietf@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 1D7393A0B64 for <quic@ietfa.amsl.com>; Thu, 6 Aug 2020 17:58:42 -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 sGxI-5myspJJ for <quic@ietfa.amsl.com>; Thu, 6 Aug 2020 17:58:39 -0700 (PDT)
Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) (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 714253A0A55 for <quic@ietf.org>; Thu, 6 Aug 2020 17:58:39 -0700 (PDT)
Received: by mail-lf1-x136.google.com with SMTP id i80so113163lfi.13 for <quic@ietf.org>; Thu, 06 Aug 2020 17:58:39 -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=VTtaanmZ92YEsZVrjw0BvYi9D7/YnmMKWOhZtcf8L6k=; b=uqSzeoVrk6ZbGZTIE2Ob7oUhFLPsurCygsNGJBdzvVthzhOdzwCkCd8Lye5NeKY7nx s3FRDa5pXiZ2qrMX0fnwFcGcx2sLXbhoyOTbVnpNaNDScvencN2sAn0tK8HxLGrxdER1 l3FAx4AH8Z9IvEXcgI8uLU4EFFHmMqFnqz0BoSyUvJgVBpuoG89iTkzfMsr73CI+0zpY Ja6QaEdqerw/WR8dLfRqSc47Y7DBkgFanBgGqolEIu/W4N+oQI1oM12TMhjHYIkcKPhD V9X/KP3hst3soM/S8kwj5e/Jv8KS16VN1qvGwax1oJF/b+R8nnv+Bgdjkp3gstSJYpVi jMBw==
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=VTtaanmZ92YEsZVrjw0BvYi9D7/YnmMKWOhZtcf8L6k=; b=rjlp/a7fjiILieoubzGdCBG3o5lQvHM9g696YzoeGAYDT1dwvUAMIbad/Y/PDDPnv6 kZevnr8tc7hwUAQOOS2UuKcFRufAn4WGcfU1B5dTBrOrOGauQlfNB3sk0yGRcFjOnU1O rssw3jKKfp8sr1GZCn6WHlqlL9nuFCG5Bi8Oa5jJp6KKUB+MyQTm3BLEUBDbFrOJdQS6 EmjTsb7qbgQu6o7xn7jMAGJ3WT0kQcYXJfT53QFMNJOcIWroQKOB97kE9W90x/A8Z238 dR1xua0utwqms78ozrx78MZ0BccN++w87+jXmcZh888rcTyfaPebLmGg6Me2XRyS1ks1 SQ3Q==
X-Gm-Message-State: AOAM531k+LVtsurlnQs3fYTthKpNIsLTP4Ud+RgTkkwfnsJON2jyVfk6 tQjUwXuD+SPbkYDELIugIqF8SUY9L/1W0Q0U07g=
X-Google-Smtp-Source: ABdhPJwR2bm5I4E4EJ06gTLrUj9NrO38W6OY56L5x32xBHgEK6zuQ+1SLCDjGr0nXF/Gmu6mXQRO5Wer0pYQLeoc8DU=
X-Received: by 2002:a19:8c9:: with SMTP id 192mr5109958lfi.204.1596761917489; Thu, 06 Aug 2020 17:58:37 -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>
In-Reply-To: <CALGR9oacxe3EvYjeR_5yLpCga6EWcK_MLgvW_QCwidoH4Fjrzw@mail.gmail.com>
From: David Schinazi <dschinazi.ietf@gmail.com>
Date: Thu, 06 Aug 2020 17:58:26 -0700
Message-ID: <CAPDSy+4XZRFb6t_-caiH52TuaFib2dK8Ur8r3f8PhJGqL62JSg@mail.gmail.com>
Subject: Re: QUIC API (was: Re: Small size of core QUIC library to replace TCP for embedded system)
To: Lucas Pardue <lucaspardue.24.7@gmail.com>
Cc: Martin Duke <martin.h.duke@gmail.com>, Lars Eggert <lars@eggert.org>, quic <quic@ietf.org>, Paul Vixie <paul@redbarn.org>
Content-Type: multipart/alternative; boundary="000000000000e2066e05ac3f1a3a"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/TjZLXgXS-FAs6cIBpC64X_AyP7s>
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 00:58:42 -0000

What would be the purpose of defining a QUIC API?

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.

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.

David

On Thu, Aug 6, 2020 at 5:16 PM Lucas Pardue <lucaspardue.24.7@gmail.com>
wrote:

>
>
> On Fri, 7 Aug 2020, 00:37 Martin Duke, <martin.h.duke@gmail.com> wrote:
>
>> I am all for using TAPS concepts wherever possible, but I am not sure we
>> should put all of our eggs in that basket.
>>
>
> I'm no TAPS or SCTP aficionado so take my view with a pinch of salt.
>
> It's just that looking at RFC 6458 and seeing a 100 page document makes me
> wonder what would be required to do something for QUIC, who would implement
> that, and who would pick up the pen.
>
> It seems like a possible divergent effort from other API work, which seems
> like a fragmented outcome.
>
> How successful is RFC 6458?
>
> Also, I think it help would me to understand the incentives. The
> supposition was about an application wanting to use different QUIC stacks?
> Curl is already doing this and it doesn't seem too onerous. I'm sure there
> are other incentives though.
>
> Lucas
>
>
>
>
>
>> On Thu, Aug 6, 2020 at 4:27 PM Lucas Pardue <lucaspardue.24.7@gmail.com>
>> wrote:
>>
>>> Would TAPS fit your bill?
>>>
>>> https://tools.ietf.org/html/draft-ietf-taps-interface-09
>>>
>>> On Thu, 6 Aug 2020, 23:57 Martin Duke, <martin.h.duke@gmail.com> wrote:
>>>
>>>> On this subject, (speaking as individual) I think it would be useful to
>>>> define a QUIC application API. SCTP did one (
>>>> https://datatracker.ietf.org/doc/rfc6458/) and the idea that an
>>>> application would have to be written separately for each quic
>>>> implementation is silly.
>>>>
>>>> On Tue, Jul 21, 2020 at 11:18 PM Lars Eggert <lars@eggert.org> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> On 2020-7-21, at 20:02, Paul Vixie <paul@redbarn.org> wrote:
>>>>> > my question is, has any QUIC implementor been thinking along these
>>>>> lines? i
>>>>> > believe that the parameters to a QUIC "connect" syscall would be
>>>>> larger and
>>>>> > more numerous than for a TCP or SCTP or UDP "connect" syscall, for
>>>>> example.
>>>>>
>>>>> most QUIC implementations have an API that is at a high level pretty
>>>>> similar to the socket API, but different in all the details. And they are
>>>>> all different from each other.
>>>>>
>>>>> Since you asked about a "connect" equivalent, here is what some of the
>>>>> C stacks offer:
>>>>>
>>>>> quant:
>>>>> https://github.com/NTAP/quant/blob/master/lib/include/quant/quant.h#L110-L118
>>>>>
>>>>> msquic:
>>>>> https://github.com/microsoft/msquic/blob/master/src/inc/msquic.h#L745-L757
>>>>>
>>>>> quicly:
>>>>> https://github.com/h2o/quicly/blob/master/include/quicly.h#L892-L900
>>>>> <https://github.com/h2o/quicly/blob/master/include/quicly...h#L892-L900>
>>>>>
>>>>> Pretty different.
>>>>>
>>>>> Lars
>>>>>
>>>>