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

Alexander Pelov <a@ackl.io> Tue, 08 December 2015 13:10 UTC

Return-Path: <a@ackl.io>
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 497F41A90C4 for <core@ietfa.amsl.com>; Tue, 8 Dec 2015 05:10:51 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.25
X-Spam-Level:
X-Spam-Status: No, score=-2.25 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HELO_EQ_FR=0.35, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham
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 eAmzapYrYipC for <core@ietfa.amsl.com>; Tue, 8 Dec 2015 05:10:49 -0800 (PST)
Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5B7141A1B6D for <core@ietf.org>; Tue, 8 Dec 2015 05:10:49 -0800 (PST)
Received: from mfilter15-d.gandi.net (mfilter15-d.gandi.net [217.70.178.143]) by relay6-d.mail.gandi.net (Postfix) with ESMTP id C1A0FFB8C8 for <core@ietf.org>; Tue, 8 Dec 2015 14:10:47 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at mfilter15-d.gandi.net
Received: from relay6-d.mail.gandi.net ([IPv6:::ffff:217.70.183.198]) by mfilter15-d.gandi.net (mfilter15-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id HUGz3KPlV0MW for <core@ietf.org>; Tue, 8 Dec 2015 14:10:44 +0100 (CET)
X-Originating-IP: 192.44.77.246
Received: from dhcp-salsa-i-129-152.rennes.enst-bretagne.fr (nat-asr-salsa.rennes.enst-bretagne.fr [192.44.77.246]) (Authenticated sender: alex@ackl.io) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id C60FDFB881 for <core@ietf.org>; Tue, 8 Dec 2015 14:10:44 +0100 (CET)
To: core@ietf.org
References: <20151207091044.GA59864@elstar.local> <BLUPR06MB1763ABFE8DE1E0E18F5F06A5FE090@BLUPR06MB1763.namprd06.prod.outlook.com> <20151207194229.GA61491@elstar.local> <BLUPR06MB1763B7F9EBF812C06DB04252FE090@BLUPR06MB1763.namprd06.prod.outlook.com> <20151207203826.GA61647@elstar.local> <BLUPR06MB1763E9AB0D1E4A0478D47C05FE090@BLUPR06MB1763.namprd06.prod.outlook.com> <20151208093350.GA62650@elstar.local> <5666AE1A.2040908@ackl.io> <20151208105530.GA62785@elstar.local> <64B950CF-863D-4440-AF7A-F8DF79C80409@telecom-bretagne.eu> <20151208115310.GA62928@elstar.local>
From: Alexander Pelov <a@ackl.io>
Message-ID: <5666D6D4.3090006@ackl.io>
Date: Tue, 08 Dec 2015 14:10:44 +0100
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.4.0
MIME-Version: 1.0
In-Reply-To: <20151208115310.GA62928@elstar.local>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: <http://mailarchive.ietf.org/arch/msg/core/PjGElUHe9D4N27d84SbSlgZfQMI>
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: Tue, 08 Dec 2015 13:10:51 -0000

Dear Juergen,

Thanks for the great remarks! Indeed, we have had lots of lengthy 
discussions on the way structured data node IDs work, and there are 
several ways to handle the situations you describe.

We've reached a consensus to first detail the most demanded and least 
controversial part - the YANG-CBOR mapping. Having structured data node 
IDs allows for all existing designs to operate with this.

I've provided you with the baseline algorithm, which covers one aspect 
of the data node IDs. Structured data node IDs also allow for private 
module ID space, and for non-managed modules (e.g. as the example you 
provide). They also allow for having COMI-style hashes if you need them. 
The draft which will describe the full operation will come shortly after 
the YANG-CBOR draft.

I think that it would be nice if you can contribute, as your remarks can 
help clear the readability of the document and point on examples that 
must be provided to cover the full spectrum of YANG use-cases.

Best,
Alexander


Le 08/12/2015 12:53, Juergen Schoenwaelder a écrit :
> On Tue, Dec 08, 2015 at 12:11:00PM +0100, Alexander Pelov wrote:
>> Dear Juergen,
>>
>> See inline.
>>
>>> Le 8 déc. 2015 à 11:55, Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> a écrit :
>>>
>>> On Tue, Dec 08, 2015 at 11:16:58AM +0100, Alexander Pelov wrote:
>>>> Dear Juergen,
>>>>
>>>> The algorithm is straightforward - assign in increasing order a data
>>>> node ID to each element on the schema tree. If you have a revision of a
>>>> module, you do the diff between the old and the new tree, and add the
>>>> new data node IDs at the end of the numbering.
>>> So I need access to the complete revision history in order to determine
>>> data node IDs, correct?
>> It is not a must. You can manually indicate the node IDs of the newly added elements. If you want a completely automated allocation of IDs, then yes. The way I think this will work is - the publisher of a module will use the automatic tool to generate the statements, which will then be indicated in the YANG definition.
>>
> I want independently developed systems to interoperate. In general, I
> can't assume modules have data node IDs (since a YANG module like lets
> say ietf-interfaces simply does not define them).
>
>>> What about imports without a revision (a nasty
>>> source of ambiguity)?
>>>
>> There are two points in your question. The first is straightforward - Data node IDs make sense within the scope of a module. Changing a module does not affect the different modules which import it, with the possible exception of groupings, where the classical data node ID algorithm assignment kicks in (or manual ID assignment if the module author prefers so). In any case, I would refer you to RFC 6020, section 5.1.1. where the question of acceptability of imported modules is treated.
> I am talking about imports _into_ a module that may be ambigous from
> the viewpoint of the importing module. Section 5.1.1 is about import
> by revision, my question was about what happens if there is an import
> without revision. We had lengthy discussions in NETMOD what this means
> for conformance and the outcome roughly is that this requires a
> runtime lookup to find out which module revisions have been used by a
> given implementation, that is, your algorithm would not only need the
> complete revision history but also runtime information in order to
> calculate unique data node ids.
>
> There are alternate designs possible in the solution space. I like to
> understand the trade-offs between them.
>
> /js
>