Re: [core] CBOR Encoding of Data Modeled with YANG

Ladislav Lhotka <lhotka@nic.cz> Fri, 11 December 2015 15:31 UTC

Return-Path: <lhotka@nic.cz>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 313CE1B2B18 for <core@ietfa.amsl.com>; Fri, 11 Dec 2015 07:31:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.661
X-Spam-Level:
X-Spam-Status: No, score=-0.661 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HELO_EQ_CZ=0.445, HOST_EQ_CZ=0.904, T_RP_MATCHES_RCVD=-0.01] autolearn=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 ex-F-zidYNoD for <core@ietfa.amsl.com>; Fri, 11 Dec 2015 07:31:54 -0800 (PST)
Received: from mail.nic.cz (mail.nic.cz [IPv6:2001:1488:800:400::400]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A2CE51B2B00 for <core@ietf.org>; Fri, 11 Dec 2015 07:31:53 -0800 (PST)
Received: from [IPv6:2001:718:1a02:1:35a8:f200:6e13:d928] (unknown [IPv6:2001:718:1a02:1:35a8:f200:6e13:d928]) by mail.nic.cz (Postfix) with ESMTPSA id 5DF3B181890; Fri, 11 Dec 2015 16:31:52 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1449847912; bh=FP2kswW0IDb28qu6nL1gh2JaMlw7QrB2TN+9E3/KT2M=; h=From:Date:To; b=H9/xceo/LrrrWla7s98x3XMQW9vlelY7T1APwdjw3coJ+K4e59ZBemVmGxhnkdJ5Q Wo6pwulF9YbUdDLj6NDyeF7QcZnA6O8YbOpNUvvAO6aAl1zbxux09vS19j0aTnhegL LXrhN/HAzOpkqewGkemW0/8URiy/tQTiEutxY420=
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\))
From: Ladislav Lhotka <lhotka@nic.cz>
In-Reply-To: <BLUPR06MB1763FBE41C0F67D60F4C6CBDFEEA0@BLUPR06MB1763.namprd06.prod.outlook.com>
Date: Fri, 11 Dec 2015 16:31:52 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <88AA67DA-65ED-445A-9BD6-C06DCC270E54@nic.cz>
References: <BLUPR06MB176391F16B5E9D6CCC531771FE0E0@BLUPR06MB1763.namprd06.prod.outlook.com> <m2zixhwcl2.fsf@birdie.labs.nic.cz> <566A9D84.8020809@tzi.org> <BLUPR06MB1763219CCE11D928B2168FFBFEEA0@BLUPR06MB1763.namprd06.prod.outlook.com> <E1492607-F3BA-4FA5-9BD4-4F7746171747@nic.cz> <BLUPR06MB1763FBE41C0F67D60F4C6CBDFEEA0@BLUPR06MB1763.namprd06.prod.outlook.com>
To: Michel Veillette <Michel.Veillette@trilliantinc.com>
X-Mailer: Apple Mail (2.3112)
X-Virus-Scanned: clamav-milter 0.98.7 at mail
X-Virus-Status: Clean
Archived-At: <http://mailarchive.ietf.org/arch/msg/core/9wzuSdzUDkdFwFUcrIAxZ81G1p4>
Cc: Core <core@ietf.org>
Subject: Re: [core] CBOR Encoding of Data Modeled with YANG
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.15
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: Fri, 11 Dec 2015 15:31:55 -0000

> On 11 Dec 2015, at 16:22, Michel Veillette <Michel.Veillette@trilliantinc.com> wrote:
> 
> I plan to propose an update to section 3.1.7 based on the text of draft-ietf-netmod-yang-json-06 section 6.8.
> I can either use the module name or the module ID as namespace identifier.
> For compactness, I intent to initially propose the module ID.
> 
> For example, if the module ID registered for iana-if-type is 72, we will have "72:ethernetCsmacd".

Sure, but my impression from sec. 3.1.7 is that the encoding attempts to alleviate the need for determining the chain of identity derivations from a data model and simply encode the chain in the identityref value. But maybe I am just confused.

Cheers, Lada 

> 
> Is this make sense?
> 
> Regards,
> Michel
> 
> -----Original Message-----
> From: Ladislav Lhotka [mailto:lhotka@nic.cz] 
> Sent: December-11-15 10:05 AM
> To: Michel Veillette <Michel.Veillette@trilliantinc.com>
> Cc: Carsten Bormann <cabo@tzi.org>; Core <core@ietf.org>
> Subject: Re: [core] CBOR Encoding of Data Modeled with YANG
> 
> 
>> On 11 Dec 2015, at 15:50, Michel Veillette <Michel.Veillette@trilliantinc.com> wrote:
>> 
>> Hi Ladislav
>> 
>> About tagging and tag 4 specifically, the overhead require by them will need to be justified.
>> We need to identify which specific applications require schemaless processing of unknown data nodes.
> 
> Fair enough.
> 
>> 
>> About identitities
>> This issue have already been mentioned by Juergen and the current 
>> intent is to adopt the same representation as 
>> draft-ietf-netmod-yang-json-06
> 
> Juergen questioned the need for a new namespace notation but if I understand correctly the example in sec. 3.1.7, in
> 
>  iana-interface-type.ethernetCsmacd
> 
> there is no namespace at all: iana-interface-type is an identity, and so is ethernetCsmacd.
> 
> Lada
> 
>> 
>> Regards,
>> Michel
>> 
>> -----Original Message-----
>> From: Carsten Bormann [mailto:cabo@tzi.org]
>> Sent: December-11-15 4:55 AM
>> To: Ladislav Lhotka <lhotka@nic.cz>
>> Cc: Michel Veillette <Michel.Veillette@trilliantinc.com>; Core 
>> <core@ietf.org>
>> Subject: Re: [core] CBOR Encoding of Data Modeled with YANG
>> 
>> my 2 µJ for now...
>> 
>>> 1. Would it make sense to use semantic tagging (major type 6) to
>>>  distinguish numbers or strings with special semantics? Possible
>>>  candidates that come to my mind are instance-identifier and
>>>  identityref values.
>> 
>> In general, the assumption has been that semantic information would come out of the YANG schema.  Is there a case where that is not so, and we need to represent it at the representation level?
>> 
>>> 2. Why is the "decimal64" type encoded as an integer and not as "decimal
>>>  fraction" (major type 6, tag 4)? Whilst the decimal value can be
>>>  obtained by using the leaf's definition,
>> 
>> Because we can get the exponent value out of the schema, we don't need to transmit it.
>> 
>>> perhaps it may simetimes be
>>>  useful to be able to correctly interpret the values without using a
>>>  schema.
>> 
>> Right.  We probably have to make up our mind how useful YANG-based information should be in a schemaless environment.  If we want to make it useful, that requires quite some different thinking than what we have now.
>> 
>>> 3. I think it is necessary to include namespaces/module names in the
>>>  encoding of identitities (sec 3.1.7). It is probably not very likely
>>>  in that particular example, but somebody could define another
>>>  "iana-interface-type" identity in another module. Identities were
>>>  designed to be extensible in a decentralised fashion, so the CBOR
>>>  encoding should IMO also represent the namespace.
>> 
>> We should take note of this problem and put it as one more objective for the identifier discussion (the hashes vs. structured IDs vs. ... one).
>> 
>> Grüße, Carsten
> 
> --
> Ladislav Lhotka, CZ.NIC Labs
> PGP Key ID: E74E8C0C
> 
> 
> 
> 

--
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C