Re: [Cbor] tag optionality and dCBOR

Laurence Lundblade <lgl@island-resort.com> Wed, 08 March 2023 18:20 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 24EDFC1524DE for <cbor@ietfa.amsl.com>; Wed, 8 Mar 2023 10:20:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-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 D8tE6aKiEPfh for <cbor@ietfa.amsl.com>; Wed, 8 Mar 2023 10:20:53 -0800 (PST)
Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on20721.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eaa::721]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A69AAC1522AD for <cbor@ietf.org>; Wed, 8 Mar 2023 10:20:53 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jtgu3nAufErWBtyiio/8sH0P/g8hSiCHbYrUfBf1sniwhwaZEzARNUZPZeBau9ib3/DdAubB9avB1wuikT5sb99MAvIi4oyT3shS7wfI33ZAyPnOlCgtZe79Qo0/516zEyS3VBT97/qs3pu6JmA92Eht8KneKj3NFeuSaQEozgXjem6q1pUkUbwnF6fTN8uKz67RpLskEVUbYNaeAWeeUrOJXo2vOjmM56/Cx1nMpjeDH2CZNyImfVBcI4ArSjN0Facdif8cGLwnK9jgf2dRnqhycvlRHnyn2kaVDy1VBkOXT3IJI4dwCSq0ClHeRyJenWgTjjD1rldl8ZXUDVP9eQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=txFlBlpAE76IUNUtrXHJNku4C8nJxnN5YVrbOPTKW7s=; b=PGc+bxtBRAJPFesNSnVR2BPyqWWWfcEMbY1uQdpE+V0BtY6hDsA2HVZXb09YnhLbfdOkBhR/mlP0tXqE3bIv6CPrN2zQROMl12G4Qh7e+aCWj/kUJkRt1qVfJx/iYxkSR5qYzThvUwLjM4La7UiaL6ERCXRBqbQWD0xoZb3RekcjyuyZTmI1uZCOOX2PSBTQYEyfPi/B4BwObqrH/0gPl1NDRU5sC+qL9TNixxGMFHSp2OdNyTnOXktEHwYOwM6v2on4abIhqoExC1MwqKWD2P35bB6Kvh8+sCijutuqSQ20/UcrWV3JiJ46+rNBdI/fUsfWjB++eU6cwTtaC1wECA==
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
Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=island-resort.com;
Received: from PH7PR22MB3092.namprd22.prod.outlook.com (2603:10b6:510:13b::8) by PH0PR22MB2842.namprd22.prod.outlook.com (2603:10b6:510:f5::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.17; Wed, 8 Mar 2023 18:20:46 +0000
Received: from PH7PR22MB3092.namprd22.prod.outlook.com ([fe80::1aae:283a:d7b:3d58]) by PH7PR22MB3092.namprd22.prod.outlook.com ([fe80::1aae:283a:d7b:3d58%4]) with mapi id 15.20.6156.029; Wed, 8 Mar 2023 18:20:46 +0000
From: Laurence Lundblade <lgl@island-resort.com>
Message-Id: <EB1AB937-4DAF-454A-B803-5F9236E12B1D@island-resort.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_C51A0EDA-FEBF-44DA-BB82-9DF53C00F526"
Date: Wed, 08 Mar 2023 10:20:43 -0800
In-Reply-To: <F0CCF4B9-A486-4160-94DA-7D2177DA810F@tzi.org>
Cc: cbor@ietf.org
To: Carsten Bormann <cabo@tzi.org>
References: <5C727283-695E-4A47-B18F-B4FC85551CF3@island-resort.com> <F0CCF4B9-A486-4160-94DA-7D2177DA810F@tzi.org>
X-Mailer: Apple Mail (2.3445.104.21)
X-ClientProxiedBy: SJ0PR13CA0204.namprd13.prod.outlook.com (2603:10b6:a03:2c3::29) To PH7PR22MB3092.namprd22.prod.outlook.com (2603:10b6:510:13b::8)
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: PH7PR22MB3092:EE_|PH0PR22MB2842:EE_
X-MS-Office365-Filtering-Correlation-Id: fcc9343c-3b03-4b17-5bb9-08db2001d5c4
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: aq6buqBtb/aGaY7DMYfBIl8MouvLgKVLQkAd7abKFpycXIP+A43pY6vqxe/63BHpZ/sEm5qem7gBcu0v0BWTrGYa9Iucs02b90+eHZYllvJHF3cV/LLVys9sHWVRUIdLUiaoEVcYEiwtMGb91TXy8I9aJbr9IDeWZSi/T23xRADh4M+m0wde3xW22WNSeaWmBkv+i/AZdCtAR0h73Z96GIrZaQMSVsNzOZLGRS9pPNmJ6O1Kh3Nz+SM7XKm5mNprypkqMWvb6BG4M+DhXCkQCOWeSW2vJHeJgp5PGRYfK8mZb724fxs3f0a2KzgO0Q3a6cavqB6Mr97go1KKMivqqBq+r3HOkMIZwfv1xfE/TKcCEANdOqp3VcBF954wp9jolPg5SYOzS0Rp8aubEd74kVw3FJlE4uq5pvA+ybKAN5cmLSNeQwa7NyEovQm41e9bTxqsq3CGvnCkHW4OuxluBfv+x8FTKQsDQXdqc4+YoRB1EBpaIDsxt5UXELVHaf2wOav2tAsPwMMS1MeizB3/dBs2AUYP/QTeGNovKINPMNc4ZildztI4cNnLRXu87mu77SPO7V/2ReJBASekMSPZ4cgiEL8baoGxQhWljLaCgwIOQZ5wKzg6TmX/eFKAMw2X9UGg8aGBif6/HZ9Wbf+s9g/Mm4fXAUE3Yv+T+Im47L4pnZDBbNIHk0SlDLVqU5k51DIO+J1dxKOhQoifCxA6Y+n9H2JP3yQVUDWtaD40WM8=
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:(13230025)(346002)(366004)(39830400003)(136003)(376002)(396003)(451199018)(36756003)(83380400001)(33656002)(52116002)(316002)(38100700002)(38350700002)(478600001)(6486002)(2616005)(6512007)(6666004)(6506007)(33964004)(186003)(41300700001)(53546011)(26005)(5660300002)(8936002)(6916009)(66476007)(66556008)(4326008)(86362001)(2906002)(66946007)(8676002)(45980500001); DIR:OUT; SFP:1102;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: AfHZA3l/6m/MBISrskWRQRVQJzBcwuNh1BWF9NLV8FMTiRbhg4Jv3T1sOEC1pnebYLiZQgRK4W1eb8OX/gXqiGA2PZKSq3Jt14nqr1uUlVipqYYRx+A8vkwzBZrlcila0GeZjbFGU1R/HwlfBehZ+y7CCA9+QMAqW2oGcLZ4oD8oo253yU5L1Ih8WOZbBqvOtJPuGx2mlvLrr+fEG7i4cEvzurqlPvbXzfUDaNht5kaOoWM/lVPzu84OpuJr4ysVAJPWi/Xh+qfXbTBQTO/JbHw42FLWT9vl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sko9l5QqnaDVyi5g+ptWaNrFCaawAH+8NQuPH9pC9vGXor+rIvHFPVfOpAVf3faKCaknhkc8OF5A6Y5avjMvZ8nCLU3OX72GBJQpMlWb1NDzHpE0kAk3YnMZmSUjJk47S1Qr9U0Qt1z9eVVlF6QZ5ehNTUQvoumOh2dnlnPpmgh0++l1u1Dp2/X4KL3/SOE4F10zBwpRdEKkvTimr6lTrUv0MkxQjReTfnU0XVrMaNpuOJLo9dlEaCeaQQ12Q==
X-OriginatorOrg: island-resort.com
X-MS-Exchange-CrossTenant-Network-Message-Id: fcc9343c-3b03-4b17-5bb9-08db2001d5c4
X-MS-Exchange-CrossTenant-AuthSource: PH7PR22MB3092.namprd22.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2023 18:20:45.8715 (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: TW1GIMmYxrVcZz/B99C535Sm7eVX186dZcQqTo1tzVG4C/WjbhfKTlU3lqodZeW9nrfIz6zqxpOIAnExVFSRZA==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR22MB2842
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/NUX4CxrRUnJ2ThWxeJ0A5ifvP7s>
Subject: Re: [Cbor] tag optionality and dCBOR
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: Wed, 08 Mar 2023 18:20:56 -0000

I like the distinction between deterministic serialization and deterministic representation.

No complaints about having text that discusses tag use for deterministic representation but it might be better in section 5 as the title of section 4 is “Serialization Considerations”.

LL



> On Mar 7, 2023, at 10:01 AM, Carsten Bormann <cabo@tzi.org> wrote:
> 
> On 2023-03-07, at 18:42, Laurence Lundblade <lgl@island-resort.com> wrote:
>> 
>> Section 4.2 of 8949 discussed tags in relation to deterministic encoding and around 5 minutes into the dCBOR video this is discussed.
>> 
>> I’d like to drive a wedge between serialization variability (e.g. integer lengths, map sorting) and tag optionality and would like there to be no requirements in dCBOR around tag optionality. I think tag optionality is a protocol/application design characteristic.
> 
> Indeed.  Section 4.2 really talks about different ways an application may represent something (using the presence or absence of tag 1 as an example).
> Since we did have protocols that considered representing the same information  both with and without a tag, the text is quite useful to recommend against this practice.
> 
> If your application likes representing today as 1678212055 and 1(1678212055) half of the time each, or the number 1 as integer 1 and float 1.0 half of the time each, you have a deterministic encoding issue.  That is not a CBOR problem.  But CBOR gives you the tools to make that difference, and if the application jitters about uncontrollably, that’s a problem.  The text might have been a bit shorted by just saying “folks, deterministic representation is not just a representation format layer problem, your application also needs to play”.
> 
>> This is a little bit of a round about way to highlight this — A protocol that sends three integers (e.g. red, green and blue for a pixel) could use an array where red is first, green is second and blue is third. Or it could use a map and label the three integers. I expect dCBOR to be completely silent on this choice. It’s an application/protocol design issue with nothing to do with serialization variability.
> 
> No, but with deterministic representation.  See above.
> 
>> I think the choice of whether to identify items in a protocol/application by tag is of the same nature.
> 
> Yes.
> 
>> I also think that discussion of tag optionality should probably not be in section 4 of 8949. It’s not really a related to serialization.
> 
> It is the example we were using because there were protocols around that were just about to make this mistake.
> 
> Grüße, Carsten
>