[Cbor] Re: EDN redux

Rohan Mahy <rohan.mahy@gmail.com> Wed, 07 August 2024 15:08 UTC

Return-Path: <rohan.mahy@gmail.com>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4E5FFC1516E0 for <cbor@ietfa.amsl.com>; Wed, 7 Aug 2024 08:08:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.107
X-Spam-Level:
X-Spam-Status: No, score=-2.107 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, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] 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 ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g1PkB2pNrn09 for <cbor@ietfa.amsl.com>; Wed, 7 Aug 2024 08:08:08 -0700 (PDT)
Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id BE65DC15108C for <cbor@ietf.org>; Wed, 7 Aug 2024 08:08:08 -0700 (PDT)
Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-5a79df5af51so1601404a12.0 for <cbor@ietf.org>; Wed, 07 Aug 2024 08:08:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723043287; x=1723648087; darn=ietf.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=/I41XZSDWnyhhNG2ddMEf2IdrQEkcpRQG7cEoeX5NlU=; b=lwYzHvls2cbY/4rEcqnOecfeykwLFUenRqmLTzheGWlik4K4ioVXKFfsAte8kdtlMS iaTSuIq5Vsbjtqgg/6HY44ZEBjiS5NEQ3btMv0A1pvKK7ZXQhPdtzsChUU973fE4E+Y0 uOrvhKrJV/WAdb6GIUPUyf9ObI45A2y7O0eSPfG6MczfZYMMfwGaxQbqCc1zD1XgT3Ix F3WB9N9R5nwjKDYl8iK7CIeaSPwcUltaC6qHQYifc3oJk3gm+0b3MjQngPOY1xhX34MV kzFT8jOLqAo41JZq1cWq1K0p9q6b15E2NNgtL+vRyuY2MJKWhRI8ax5GPmaMUpnLykRv A12w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723043287; x=1723648087; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/I41XZSDWnyhhNG2ddMEf2IdrQEkcpRQG7cEoeX5NlU=; b=JrkCUY7tNDnb9zHoGXlijVOZIALcOutrt8enHjT2eV07+Ds558Qg6SFmU6LO7vzdcm fW8MrYNmuIvXUSFrACaY99M7Te9EDxz6sG4XBAFuPaWOU/Md16pKcPKOQbXpj+rv2c5I 4Lr7J+RupAXJUX3Zxuq+X6RUdcePmgeKTWhJk82rY9IJjJK0+LzkpAfZQIr91eiYVmPY uhFGk81u7lum7xQ+aKUzSsTSHeu8DewkGustGFxPR8e/dnD6g3Q1UcQTayJ7Ym+D53cW 2/T6Y1i9cLIU7i8i/qnNgp5GAdPCBlGq+/hoCgNfZ99b6ZZP3jpMGXspRg6wp0n5DnfK gM9g==
X-Gm-Message-State: AOJu0YwCAfu00uRtuwP3hiPwLHrIfdYdjrRbXS7EVOSC/lJHB75bYDZp Qw9jenY4fBMmRhEb2zCJTupnkAPrRCRTYl7B0XAC+8PFif50D8o+9py3ldefhVizhDb4b1ocOnb uawNzFIYhY6bWluBYpkOiltMelHg=
X-Google-Smtp-Source: AGHT+IHl2rQhVw9JH2BM1/psO60gFuVi/vQGevZCKVIWI1RBsOzXuDYWM4LERcj8c3jmR92IdGRVroYTAqTUqca3q/A=
X-Received: by 2002:a17:906:fe42:b0:a77:dbf9:118f with SMTP id a640c23a62f3a-a8079036d20mr180943466b.13.1723043286243; Wed, 07 Aug 2024 08:08:06 -0700 (PDT)
MIME-Version: 1.0
References: <7C93E178-2D2A-44E1-96A2-EB55048052DD@tzi.org> <CAKoiRuZebuHWhZ1AK6TPZDAdYgvQQBkM7Hdeyi7X=aFfFeQ3PQ@mail.gmail.com> <D7E13419-35FE-4ACC-BBE6-CDBAE83F4570@tzi.org>
In-Reply-To: <D7E13419-35FE-4ACC-BBE6-CDBAE83F4570@tzi.org>
From: Rohan Mahy <rohan.mahy@gmail.com>
Date: Wed, 07 Aug 2024 08:07:54 -0700
Message-ID: <CAKoiRubpwB6=JE=Bk5oh5o=wfxk0TGjA9_6MmcDRiXpRvVEVnQ@mail.gmail.com>
To: Carsten Bormann <cabo@tzi.org>
Content-Type: multipart/alternative; boundary="00000000000002618c061f1947ee"
Message-ID-Hash: HHOPHN6WZO2P3ZA7OY76RRXEP42XRHMX
X-Message-ID-Hash: HHOPHN6WZO2P3ZA7OY76RRXEP42XRHMX
X-MailFrom: rohan.mahy@gmail.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-cbor.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: CBOR <cbor@ietf.org>
X-Mailman-Version: 3.3.9rc4
Precedence: list
Subject: [Cbor] Re: EDN redux
List-Id: "Concise Binary Object Representation (CBOR)" <cbor.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/nLzSL-qyH3xfENdT4TpdiaGBLe0>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Owner: <mailto:cbor-owner@ietf.org>
List-Post: <mailto:cbor@ietf.org>
List-Subscribe: <mailto:cbor-join@ietf.org>
List-Unsubscribe: <mailto:cbor-leave@ietf.org>

Since you have gone so far as to propose no ABNF, a radically simple
solution would be to not allow extensibility of app-strings. Define a set
of them now and be done.

thanks,
-rohan

On Wed, Aug 7, 2024 at 7:49 AM Carsten Bormann <cabo@tzi.org> wrote:

> On 2024-08-07, at 15:41, Rohan Mahy <rohan.mahy@gmail.com> wrote:
> >
> > The analogy with JSON is critically flawed because the JSON format is
> used "on the wire" as is, while EDN app-strings need to be converted to a
> specific format (often bstrs) in CBOR, each with their own grammar.
>
> I don’t see how that is a flaw of the analogy — this observation is even
> more of a motivation to keep up the separation (think: tag 999).
>
> > All other substantive applications of ABNF at IETF use a single pass
> definition of the grammar.
>
> This look at the past may have been true up to October 2017 (publication
> date of RFC 8288); I didn’t analyze all use of ABNF in the IETF.
> But, looking more closely, that is just an artifact of defining layers of
> a grammar in such a way that you don’t immediately see that they are layers.
>
> > Using the ABNF in another way goes against 40+ years of precedent.
>
> There is no “use of ABNF in another way”.  There is a use of ABNF
> according to the layering of the protocol.  Just as you wouldn’t cram SDP
> ABNF into a single layer SIP ABNF.
>
> > It is just weird and will trip up other implementers.
>
> I don’t agree with this prediction.
>
> > The examples given where someone wanted to include an ABNF in an
> app-string from an earlier specification which is broken or inconsistent,
> clearly signal to me that spec writers need to take the time to fix those
> problems by writing a clean ABNF rather than write new specs that import
> garbage productions wrapped with extra layers of encoding and processing.
>
> I was in the room when Julian Reschke explained the rationale for cleaning
> up RFC 5988 to become RFC 8288, echoing all the concerns we had found
> independently when doing RFC 6690.  Not everybody had this kind of
> background.  Indeed, many people did not immediately understand why the
> separation of layers makes sense.  But in the end, the benefits of proper
> layering prevailed.
>
> > Overall this two-pass concept has been optimized to make life harder for
> implementers
>
> It sure makes *my* implementations simpler, so I can’t follow.
>
> > and easier for people who want to specify new app-strings.
>
> That is indeed one benefit (not just easier, but likely more correct).
>
> > We should not be writing IETF specifications with that property.
>
> HTTP has decided to go for structured fields [1] as its layering on top of
> the text-based (HTTP/1.1) and binary (H2, H3) serializations.
> (For backwards compatibility reasons, they had to come up with something
> specific to HTTP, and they are experiencing problems in using ABNF as is.
> In EDN, we so far don’t.)
>
> [1]: RFC 8941, with the replacement draft-ietf-httpbis-sfbis in the
> RFC-editor queue
>
> More generally speaking, these days we are writing specifications while
> considering that extension points should be easy to employ (both when
> writing the specifications and when writing the implementations).
>
> I’m having a hard time understanding why CBOR EDN, which isn’t even meant
> as an interchange format, triggers this hardline “we must do it like we did
> 20 years ago” [for one understanding of what that may have been] response.
>
> As a way forward, we could simply remove the ABNF — it is available in the
> WG draft for implementers that want to base their work on ABNF.  That would
> be counterproductive, but might allow us to move forward in this
> inexplicable situation.  I would prefer a solution with less damage, though.
>
> Grüße, Carsten
>
>