[core] removing names from yang-cbor rules

Michael Richardson <mcr+ietf@sandelman.ca> Sun, 19 September 2021 20:53 UTC

Return-Path: <mcr@sandelman.ca>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 351373A3E00 for <core@ietfa.amsl.com>; Sun, 19 Sep 2021 13:53:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.958
X-Spam-Level:
X-Spam-Status: No, score=-0.958 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URI_TRY_3LD=0.941] autolearn=no autolearn_force=no
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 NPk0XLpdI9p5 for <core@ietfa.amsl.com>; Sun, 19 Sep 2021 13:53:21 -0700 (PDT)
Received: from relay.sandelman.ca (relay.cooperix.net [176.58.120.209]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id BC2093A3DFF for <core@ietf.org>; Sun, 19 Sep 2021 13:53:21 -0700 (PDT)
Received: from dooku.sandelman.ca (cpe788a207f397a-cmbc4dfb96bb50.sdns.net.rogers.com [174.116.121.43]) by relay.sandelman.ca (Postfix) with ESMTPS id C6D691F448; Sun, 19 Sep 2021 20:53:17 +0000 (UTC)
Received: by dooku.sandelman.ca (Postfix, from userid 179) id 496FA1A0529; Sun, 19 Sep 2021 16:53:16 -0400 (EDT)
From: Michael Richardson <mcr+ietf@sandelman.ca>
To: core@ietf.org
cc: "Murray S. Kucherawy" <superuser@gmail.com>
X-Attribution: mcr
X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 26.3
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-="; micalg="pgp-sha512"; protocol="application/pgp-signature"
Date: Sun, 19 Sep 2021 16:53:16 -0400
Message-ID: <106211.1632084796@dooku>
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/x-3rzlcVUt4fMbgizccCs4HA2Tw>
Subject: [core] removing names from yang-cbor rules
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 19 Sep 2021 20:53:26 -0000

Hi, in Murray's review, he asks about why we have two ways to encode keys for
YANG-CBOR.  This review comment is captured at:

https://github.com/core-wg/yang-cbor/issues/54

   A generic comment about the operational issue of supporting TWO ways to
   encode a data node: either normal string or the SID. This means that
   either there is a 2-way negotiation mechanism or that all CORE nodes must
   support both encoding and have agreed on a common SID mappings. Section 7
   only briefly touches this issue with "Content-Type" but not with
   "Accept".

   -- Section 4.2.1 & 4.4.1 --
   BTW, I like the idea of encoding a container with sequential SID and the delta CBOR encoding ;-)

I also wonder about this.
I think that the SID concept is advanced enough that we can just rely upon
it.  Murray's comment is that if we support two things, then an encoder needs
to pick one, and it's likely wrong.  Since this is often data at rest, there
is no possible negotiation either.

I propose to remove section 4.1.2:


  4.1.2.  Using names in keys
     CBOR diagnostic notation:
     {
       "ietf-system:hostname" : "myhost.example.com"
     }

     CBOR encoding:
     A1                                         # map(1)
       74                                      # text(20)
          696574662D73797374656D3A686F73746E616D65
       72                                      # text(18)
          6D79686F73742E6578616D706C652E636F6D

--
Michael Richardson <mcr+IETF@sandelman.ca>, Sandelman Software Works
 -= IPv6 IoT consulting =-