Re: [core] Comments on draft-ietf-core-yang-cbor-00

Carsten Bormann <cabo@tzi.org> Sat, 21 May 2016 13:15 UTC

Return-Path: <cabo@tzi.org>
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 5BED512D572 for <core@ietfa.amsl.com>; Sat, 21 May 2016 06:15:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.601
X-Spam-Level:
X-Spam-Status: No, score=-2.601 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001] autolearn=unavailable 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 noPT0XSyXZbc for <core@ietfa.amsl.com>; Sat, 21 May 2016 06:15:26 -0700 (PDT)
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 B019212D0F4 for <core@ietf.org>; Sat, 21 May 2016 06:08:44 -0700 (PDT)
Received: from mfilter16-d.gandi.net (mfilter16-d.gandi.net [217.70.178.144]) by relay6-d.mail.gandi.net (Postfix) with ESMTP id 26817FB8A9; Sat, 21 May 2016 15:08:43 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at mfilter16-d.gandi.net
Received: from relay6-d.mail.gandi.net ([IPv6:::ffff:217.70.183.198]) by mfilter16-d.gandi.net (mfilter16-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id VDJ7qGGugjSG; Sat, 21 May 2016 15:08:41 +0200 (CEST)
X-Originating-IP: 93.199.242.26
Received: from nar-3.local (p5DC7F21A.dip0.t-ipconnect.de [93.199.242.26]) (Authenticated sender: cabo@cabo.im) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 172A5FB883; Sat, 21 May 2016 15:08:40 +0200 (CEST)
Message-ID: <57405DD6.2020109@tzi.org>
Date: Sat, 21 May 2016 15:08:38 +0200
From: Carsten Bormann <cabo@tzi.org>
User-Agent: Postbox 4.0.8 (Macintosh/20151105)
MIME-Version: 1.0
To: Carsten Bormann <cabo@tzi.org>, Ladislav Lhotka <lhotka@nic.cz>, Core <core@ietf.org>
References: <CABCOCHRRACvVXx2S_hZm2TxbvP48aO4Q4REkh0LFjmHkMkZ1Vg@mail.gmail.com> <m2y473svm0.fsf@nic.cz> <57401CC2.2040002@tzi.org> <20160521112857.GA4437@elstar.local>
In-Reply-To: <20160521112857.GA4437@elstar.local>
X-Enigmail-Version: 1.2.3
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
Archived-At: <http://mailarchive.ietf.org/arch/msg/core/R7S5cfdTAN5aKVMh2Nb_jImvozw>
Subject: Re: [core] Comments on draft-ietf-core-yang-cbor-00
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.17
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: Sat, 21 May 2016 13:15:28 -0000

Hi Jürgen,

"broken" is indeed a strong word -- I deliberately used it as a way to
provoke reactions, and that seems to have worked :-).

> YANG's native serialization of values are untyped strings.

Hmm.  YANG is increasingly being positioned as a data modeling language.
Unless my entire world revolves around TCL :-), my data models need a
richer set of types than just strings.

Having serialization details invade the (information and data) modeling
levels is exactly what brought down XML, and finding that YANG inherits
(a mild form of) these problems is very worrisome.

> Not necessarily. It may start to look broken once you have
> serializations that are typed and for some reasons people think the
> type information should impact how YANG works (that assumes values
> serialized as untyped strings). Note that type rules differ for
> different serializations so you actually have no chance to get away
> without any weird corner cases.

Separation of concern between the data model level and the serialization
level is an important aspect of a data modeling language -- processing
rules should operate on the data model, not on the serialization (again,
the related XML problem is rearing its head).

>> I'm not sure that it can be fixed, though, so we'll likely have to work
>> around this breakage.
> 
> I disagree that YANG is broken.

Well, I take that word back, but I do think this is one place where YANG
as a data modeling language has a serious shortcoming, and it does not
look likely that the YANG-CBOR mapping can work around that shortcoming
in a particularly clean way.

As a way of coping, we probably should develop some "best practices"
(read: describe problematic cases) around the use of YANG unions that
then at least can be considered by the YANG doctors for IETF modules.

Grüße, Carsten