[Cbor] Re: Data model versus serialization (was Re: Scrapping the CDE "Application Profile" concept)

"lgl island-resort.com" <lgl@island-resort.com> Tue, 20 August 2024 19:46 UTC

Return-Path: <lgl@island-resort.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 4744AC169419 for <cbor@ietfa.amsl.com>; Tue, 20 Aug 2024 12:46:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.907
X-Spam-Level:
X-Spam-Status: No, score=-6.907 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] 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 PWcc1qBwhsPS for <cbor@ietfa.amsl.com>; Tue, 20 Aug 2024 12:46:04 -0700 (PDT)
Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2123.outbound.protection.outlook.com [40.107.96.123]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 65691C14CE5D for <cbor@ietf.org>; Tue, 20 Aug 2024 12:46:04 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xt9fT48fSIw1RUjdi2TTWygXxoNiTeF8iLOdJR6tmqQDtNZkNatuo+Wav7wVrqtIZpc3s+U4lE8Lq0RKdsRais2YMwfhudo3unns3WQ6yisc4Z/YspYDyYDYzRWxEUUF4zsdnIxrS6iyIR7gyvXW0H3Z+qLmj7CzSD3znq44DPZI9jCRaGtwl4WkvbuqhzlMAu1fn7v2KQrmvvAoDItSxVWZ8JE36ierem03IME/a713sFHxzF10md9/KjunYh2lyFamoxOAswzMai4YNHyrcQ/7BTFxLFrB53n8V09sluukCLwNPvUSRfp1Vj2k2U7OUdZOWPXqYtSR/hiz/weO6w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tTeo63OVMRTrDZWHrE3+HZnFvkh+UKIn23yfyv7faGE=; b=MJ/3h/PRPLPz4NVVhmChNik58yqo97YcOlpFGVyt8/yIVMbDtvcYVolIeAIjzFAd+5OB9Sq3kzvIcV6MjBSBp7RO/Oa82Ujqn2l19mppTi0ME6uE+T2YRdOlbaQTlFWX5J45qN+7XtXxUc3OxzgQ6VH2gEyerUF+rx39LUSjHrv3aHQD5GWGxqp5gEhZjHr9ZhqiDSCh9+1LYuilosytW80+aDseJpRf1l593b2v8iCik+0p0mebuf7GpalWrJ6J5Y7tAi8MBG8uzkA5qYQY8jQLOxj6uNiZvwkcIUkHcKpzCn+8czrRqAJ4VinTo1s7b+5VgXXc6TiIPtVV6iiEYA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=island-resort.com; dmarc=pass action=none header.from=island-resort.com; dkim=pass header.d=island-resort.com; arc=none
Received: from PH7PR22MB3092.namprd22.prod.outlook.com (2603:10b6:510:13b::8) by SJ0PR22MB2863.namprd22.prod.outlook.com (2603:10b6:a03:3db::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.21; Tue, 20 Aug 2024 19:46:00 +0000
Received: from PH7PR22MB3092.namprd22.prod.outlook.com ([fe80::8515:3aa6:3ced:15e]) by PH7PR22MB3092.namprd22.prod.outlook.com ([fe80::8515:3aa6:3ced:15e%6]) with mapi id 15.20.7875.019; Tue, 20 Aug 2024 19:45:59 +0000
From: "lgl island-resort.com" <lgl@island-resort.com>
To: Anders Rundgren <anders.rundgren.net@gmail.com>
Thread-Topic: Data model versus serialization (was Re: [Cbor] Scrapping the CDE "Application Profile" concept)
Thread-Index: AQHa8mBlkl0F/eoEQUeZ8vqwl0nKNrIu/uiAgAGPcYA=
Date: Tue, 20 Aug 2024 19:45:59 +0000
Message-ID: <1DF1E531-0B7B-483D-9183-1DBCC78B2B50@island-resort.com>
References: <fbeade60-0c40-4bbc-b233-0c30c23f7426@gmail.com> <EA998EF2-421C-491B-86B7-D9A51F218AA1@tzi.org> <3385efbd-473f-482b-887b-0f40c704f279@gmail.com> <3B1F1ED4-68CA-48EC-8B56-C916ACF55E84@tzi.org> <bcb84f8e-c817-43c2-ac0d-6b401c29857b@gmail.com> <CB2D9A13-8ADD-4CA1-AD71-0F5429CD2C11@island-resort.com> <6fac715f-84fc-4868-b1d7-398c98353f3d@gmail.com>
In-Reply-To: <6fac715f-84fc-4868-b1d7-398c98353f3d@gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=island-resort.com;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: PH7PR22MB3092:EE_|SJ0PR22MB2863:EE_
x-ms-office365-filtering-correlation-id: c4f1c808-2a88-422b-810e-08dcc150b6f3
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;ARA:13230040|376014|1800799024|366016|38070700018;
x-microsoft-antispam-message-info: FlchunD50qzd0g/LzAugKg09BWmsFczHMikpVOwprU3tubTVmyamWX2p19QzzlvZ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GGnMLWz9MqEvHN7TH2mD5remWkf3eaJ2mwpvZl33U3qnRGVNDhaJjaQrbAcZ7hJAyHm6Nknlbi2aKsZ9ZgXCI1Nhkb71+F1Dn+ep3PQbs8tYreSUckbjg+WkHclUT2DjeGJanOnnzw2LORITrnIQPgZkaYGZxy9zTFZPcS24Dhvpy52zhMjYAl+3jKZebI4XJLx7gyIzpQLzWq9hnmQ3GoBLXu13RScDM1A14LrbETQNRaU1s=
x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR22MB3092.namprd22.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(366016)(38070700018);DIR:OUT;SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: 5yNqN5pcEJaGZb5xWizm7yBQkpFjfL8YI1h2AqzxqQ3hdhFpOPNbQeYDTkFkDsZf5qTsHgjNqLuScyKkDb5xLXaXyS+kNEeLv1mpO07eNjaqO7M/hL5RA/+RoircGUwXqpFg+0mHBxOkvpcbbxujj/buX7ZgMFEzaPxhiDIVjEGt3CU6sXJY9ZwPXxzEmjAl0oWKtn6leRnsy61/msiAJKtnRc+b60S4bwfG45zPAOkxz7EqVnYtSWRJLmirN07nwPDFCg/CR7qAKbFi6mngjcrcx6fjDxRWnQc5/oYfg70TMouVJ27xJyk9BDYePKsS3RoqwAxc044VLKZ/0TCWEP79gNlh/FRcTorXeGV8Esofj/oRTa4RPI2dP75fd700cpbNLwxQDcPI9U3iwoQmGm2ZGHbIN8Yv12yAnQtN3sKpbZ+MhqZn/E2YWmQ9qCtBQNcKZoDw+PPWk1ONizOJD6xVuwnOqdzMx1RmWEXnLRNzAIbO+86MKAoLPjn4KvOn0qtG2JaDnHeNd44My3MKvEX9GMXs+D23M056IEU8On34QuzGAGfxr0ig/iNUERMlsNdQ1LooIDCr8FTA7Z5QwgkPGddXfvcLom2gB8xUItZ4WuU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version: 1.0
X-OriginatorOrg: island-resort.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: PH7PR22MB3092.namprd22.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: c4f1c808-2a88-422b-810e-08dcc150b6f3
X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Aug 2024 19:45:59.0214 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: ad4b5b91-a549-4435-8c42-a30bf94d14a8
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: EAI9iH90xoS2kmR7ZuZAc74/pf/APftIqxsCN8301NjIpxXh5I+Q9swaiI6bvt0AuUsL/VpEkVc2xHX8JYk/ow==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR22MB2863
Message-ID-Hash: VLIYATQRMJXSFWI3M55FA7MXYGU2JFBP
X-Message-ID-Hash: VLIYATQRMJXSFWI3M55FA7MXYGU2JFBP
X-MailFrom: lgl@island-resort.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@ietf.org" <cbor@ietf.org>, Carsten Bormann <cabo@tzi.org>
X-Mailman-Version: 3.3.9rc4
Precedence: list
Subject: [Cbor] Re: Data model versus serialization (was Re: Scrapping the CDE "Application Profile" concept)
List-Id: "Concise Binary Object Representation (CBOR)" <cbor.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/tBFkZaIR1i2b_yRsG5MHSqMKkRI>
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>


On Aug 19, 2024, at 12:56 PM, Anders Rundgren <anders.rundgren.net@gmail.com> wrote:

On 2024-08-19 19:51, lgl island-resort.com<http://island-resort.com/> wrote:
Trying for a bit of clarity on data model versus serialization...
== Data model ==
- Fundamentally, the data types supported — the CBOR generic data model (plus extended data model)
- Most protocol designs are in terms of data types (not serialization)
== Serialization ==
- Says how to encode a particular data type
- A particular serialization is chosen for message size and implementation constraints
- Also, specific serialization is needed for deterministic encoding
- Serialization choices don't narrow or otherwise change the CBOR data model
- Actual implementations of a protocol must agree on serialization to achieve interoperation
Seems to me that JSON has no such split at all. ASN.1 has a little one with DER/BER. CBOR is quite different in having this separation. Necessarily so to support very constrained environments.
Preferred Serialization, CDE and Basic/CIE are primarily serialization specifications (however, they stray into data model with the reduction of big numbers and integers (RFC 8949 3.4.3)).
dCBOR is primarily about the data model. It specifies no new serialization, just re uses CDE. Its main contribution is reduction of floats and integers and exclusion of a few data types.
Does this sound right?

I don't bother too much about the terminology, more about the consequences.

Understanding the difference between serialization and data model was important for me. Made it clear that serialization needs to support the whole data model, including NaN payloads. Made it also clear why we’re spending huge efforts here — other serialization schemes don’t have much serialization variability.


 Carsten talks about mapping.  Numeric reduction is mapping?

Application Profiles are described as exclusions and reductions.

Disallowing “undef” is an exclusion

Folding floats and ints together is a reduction. Similarly folding ints and big nums. Should dCBOR reduce “undef” to “null”?

Makes sense to me as a general way to characterize what an Application Profile does (but still not a fan of Application Profiles).

LL