Re: [Cbor] Unusual map labels, dCBOR and interop

Carsten Bormann <cabo@tzi.org> Mon, 25 March 2024 00:42 UTC

Return-Path: <cabo@tzi.org>
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 C603AC14F61A for <cbor@ietfa.amsl.com>; Sun, 24 Mar 2024 17:42:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.909
X-Spam-Level:
X-Spam-Status: No, score=-1.909 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, 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
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 2y0DZIUmQWpX for <cbor@ietfa.amsl.com>; Sun, 24 Mar 2024 17:42:26 -0700 (PDT)
Received: from smtp.zfn.uni-bremen.de (smtp.zfn.uni-bremen.de [IPv6:2001:638:708:32::21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 43BE3C14F609 for <cbor@ietf.org>; Sun, 24 Mar 2024 17:42:25 -0700 (PDT)
Received: from smtpclient.apple (unknown [118.200.2.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4V2vK73N99zDCbW; Mon, 25 Mar 2024 01:42:19 +0100 (CET)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.500.171.1.1\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <CAN8C-_KCLv_cAt-0-C_=i6DXjZFkgkmgZ8DNq48RcxcvV+jEUQ@mail.gmail.com>
Date: Mon, 25 Mar 2024 08:42:04 +0800
Cc: "lgl island-resort.com" <lgl@island-resort.com>, cbor@ietf.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <D2295CE3-0E93-422E-BABE-DFDED1C8883B@tzi.org>
References: <8C245824-1990-4616-AB70-FFD4FACB1AE9@island-resort.com> <11E8A8A5-D891-49FF-AF16-697C06F463B3@tzi.org> <9A0CE364-C141-4EBE-9703-292C416D12F5@island-resort.com> <3D62C4F0-D570-4EE4-AF6A-163C708AA6BE@tzi.org> <58BA8F8C-0C63-4534-9BF7-255C32D02C16@island-resort.com> <CAN8C-_KCLv_cAt-0-C_=i6DXjZFkgkmgZ8DNq48RcxcvV+jEUQ@mail.gmail.com>
To: Orie Steele <orie@transmute.industries>
X-Mailer: Apple Mail (2.3774.500.171.1.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/M4zDMehkxGJxB741crBuT6sljaA>
Subject: Re: [Cbor] Unusual map labels, dCBOR and interop
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 25 Mar 2024 00:42:30 -0000

On 25. Mar 2024, at 04:11, Orie Steele <orie@transmute.industries> wrote:
> 
> Why do we need both CDE and dCBOR?

I’d like to answer to different questions?

(1) Do we need CDE?

RFC 8949 (and before it RFC 7049) left a number of decisions about deterministic encoding to the application.
(a) At the time, we simply didn’t have as many applications for deterministic encoding to guide a more nailed-down definition of the Core Deterministic Encoding Requirements (Section 4.2);
(b) there *are* application-level decisions that need to be made in mapping an application data model to the CBOR generic data model;
(c) we didn’t understand that this problem could be made more tractable by proper layering.

The approach to leave decisions to the application made it hard to write generic encoders for Core Deterministic Encoding Requirements.

During the discussion of dCBOR, we found that we can layer the problem:
(i) define a single common deterministic encoding profile that should cover the vast majority of application requirements (CDE),
(ii) introduce the concept of defining of Application Profiles on top of CDE, which encapsulate the application specific requirements (e.g., dCBOR).

So we can have our cake (get to work with generic encoders in the deterministic encoding space) and eat it too (get to define application-specific rules about data equivalence and the deterministic encoding of potential sets of equivalent data, effectively taking out the other data items in the equivalence set from the generic data model).

CDE is intended as a complement to RFC 8949 that provides the so far undecided details for writing common generic encoders for deterministic serialization, so it should have the same standards track status as RFC 8949 itself.

(2) Do we need dCBOR?

Depends on “we” and “need”.

As I mentioned, it is good to have at least one example of an application profile.
CDE can be used without one (defining no further equivalence sets), or, one could say, with a null application profile.
But it is much easier to validate the architecture by defining at least one useful application profile.
So do we “need" dCBOR?  It is definitely useful for the work leading up to CDE at least in the sense of providing validation for the two-layer approach.

We differ in our perception how useful dCBOR is as an application profile — clearly there are different areas of application of CBOR, and dCBOR is not for all of them; different WG members naturally have a different perspective here (providing different “we”s).

I believe we also need to acknowledge that the change control for this specific application profile better rests with the group that has that application area in focus.  Clearly, there are further aspects of deterministic representation at the application level that dCBOR does not discuss (for an obvious example: do you use tag 0, 1, or 1001, and what specific configuration [e.g., the use of timezones on tag 0 RFC3339 content], for representing timestamps?).  Not all of these need to be part of an application profile, and it would hinder evolution of applications that use the application profile if they did.

So, as the CBOR WG, we haven’t worked on deciding which form of publication the dCBOR application profile should take.
I believe having an RFC would be good so it is easier to use CDE with dCBOR as an example.
(There are several ways to get this RFC published: From ISE to IETF WG informational or experimental or standards-track.)

Grüße, Carsten