Re: analysis of YANG vs. RELAX NG

"Rohan Mahy" <rohan.mahy@gmail.com> Thu, 29 November 2007 19:00 UTC

Return-path: <discuss-bounces@apps.ietf.org>
Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com) by megatron.ietf.org with esmtp (Exim 4.43) id 1Ixod9-0006fb-CB; Thu, 29 Nov 2007 14:00:59 -0500
Received: from discuss by megatron.ietf.org with local (Exim 4.43) id 1Ixod8-0006fR-PA for discuss-confirm+ok@megatron.ietf.org; Thu, 29 Nov 2007 14:00:58 -0500
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1Ixod8-0006fI-FV for discuss@apps.ietf.org; Thu, 29 Nov 2007 14:00:58 -0500
Received: from nz-out-0506.google.com ([64.233.162.226]) by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1Ixod7-0004Pn-A1 for discuss@apps.ietf.org; Thu, 29 Nov 2007 14:00:58 -0500
Received: by nz-out-0506.google.com with SMTP id v1so1351091nzb for <discuss@apps.ietf.org>; Thu, 29 Nov 2007 11:00:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=0Zi5uL4cHuGj4e7Cgl2H4IUhW3lihopp1rlUVAipmHc=; b=wo+o+UWdYgmVfnp8kwPm64p1CwjMW+BfIkqGlkluBZ/1yNeQoNTr1iIWBxhmk6CgvbUHcp8kcyqyEAoMRBKB4Hr47S0Tri/E860moDmrrYR9gPYNlfQxwpzF/Kw/icuZH7qeC2NhwTWzGxB4Tz9HxC94mfbAEn+sTjRfp/9Jg1w=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=xQ8b3wHOveJn86DrsjOCE44h7wKxVye39HiscX16KTbpbMJYMsw9MfsZaC0XuIE2baJ/1QZ80BXZJDJcDb19l/ZKzwl1ZWvAOIxBTHQQYCDROV9mGO/dWvC6I+tUkqN4BZsG9kJd13FM4COCi3RnUEqY/U4dOh2noN8RuSw7xuM=
Received: by 10.142.125.5 with SMTP id x5mr356918wfc.1196362855823; Thu, 29 Nov 2007 11:00:55 -0800 (PST)
Received: by 10.142.214.15 with HTTP; Thu, 29 Nov 2007 11:00:55 -0800 (PST)
Message-ID: <953beacc0711291100lfe8cb6xeba5ac28b091b6fb@mail.gmail.com>
Date: Thu, 29 Nov 2007 11:00:55 -0800
From: Rohan Mahy <rohan.mahy@gmail.com>
To: Balazs Lengyel <balazs.lengyel@ericsson.com>
Subject: Re: analysis of YANG vs. RELAX NG
In-Reply-To: <474E83A4.3050000@ericsson.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_Part_3115_10710629.1196362855740"
References: <20071127.130355.18118495.mbj@tail-f.com> <953beacc0711271504y7aea5f21jc301ccad886d3611@mail.gmail.com> <474D9194.3060103@ericsson.com> <953beacc0711281025w4d993dd7u77d729111074496c@mail.gmail.com> <474E83A4.3050000@ericsson.com>
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 21bf7a2f1643ae0bf20c1e010766eb78
Cc: discuss@apps.ietf.org
X-BeenThere: discuss@apps.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: general discussion of application-layer protocols <discuss.apps.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/discuss>, <mailto:discuss-request@apps.ietf.org?subject=unsubscribe>
List-Post: <mailto:discuss@apps.ietf.org>
List-Help: <mailto:discuss-request@apps.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/discuss>, <mailto:discuss-request@apps.ietf.org?subject=subscribe>
Errors-To: discuss-bounces@apps.ietf.org

On Nov 29, 2007 1:17 AM, Balazs Lengyel <balazs.lengyel@ericsson.com> wrote:

> Hello Rohan,
> Thanks for your response. Here are some replies.
> Balazs
>
> Rohan Mahy wrote:
> ...
> > These aspects are not *missing* from Relax NG.  Some of these things are
> > not in the scope of the Relax NG schema, but can be defined as an
> > additional layer on top of a specific Relax schema.
> [BALAZS]: Yes but if you need to extend RelaxNg, you loose much/most of
> the advantage of using
> a standard language. As we agreed all the extensions will need custom
> tools. These tools are
> already available for Yang, but not for RelaxNg. The experience with
> SNMP/SMI tools in the last
> decades also tells us that at the end nearly all SNMP tools were custom
> built and not based on
> standard ASN.1 tools. So the gain of following the standard is even more
> limited.
> > We can even write
> > schema which describes what syntax is allowed for these annotations in a
> > netconf-semantics namespace.
> >
> >
> >     - what does a default mean for configuration data
> >
> >
> > this is semantic.
> >
> [BALAZS]: Yes, you recognized one of our main points: NETCONF needs
> semantics and processing
> rules. These have to be defined. Current schema languages don really do
> this. Thats one of our
> reasons to do YANG.
> A quote from the book RelaxNg by Eric van der List you recommended:
>
> "XML reintroduces a clean separation between data and processing. "


yes

However Netconf does need rules about processing,


yes


> so RelaxNg is not enough for us.


This does not logically follow.  You need chocolate and you need peanut
butter, but it does not follow logically that you need a Reese's Peanut
Butter Cup.

I am proposing that you could combine syntax and semantics, or you can layer
one on top of the other. Right now YANG is neither pure semantics, nor pure
syntax. For example the distinction between the leaf-list and list objects
in YANG is pretty syntactic. (One of the YANG team's "little-rules").
Likewise, creating containers automatically is a syntactic construction.
(Another "little-rule", but at least this one is explicit). Defining new
data types in YANG is completely gratuitous syntax.

I think having semantics for configuration information in general would be a
boon for the IETF, as we have several protocol that are used for
configuration.  Providing a way to describe semantics of common
configuration concepts like default values, list keys, constraints among
non-parent-child objects, all looks like great work to me, but I don't want
to this so tied to NETCONF that I cannot use it elsewhere for other
configuration data.

I also don't want this rigidly attached to a specific syntax either.  A lot
of existing XML-based data formats use attributes extensively. Some
XML-based languages (ex: GML) implement the equivalent of leaf-list using a
single attribute with whitespace separated values (there is even a built-in
data type (called "list") to handle this case).

thanks,
-rohan


We can
> reintroduce processing hints into RelaxNg, but is that still RelaxNg.
> Processing features
> needed include:
> - handling semantics of NETCONF edit-config
> - the meaning of default data for operational and configuration data
> - ordering of list data
> - automatic creation of some data (containers)
> - placement of data in normal structures, notifications or RPCs
> - others ???
>




> >
> > Maybe I have different implementors, but the implementor is more likely
> > to have some XML experience than to be a "network management person".
> > Following the principle mentioned in Section 3.1 of
> > draft-schoenw-sming-lessons-01.txt, the implementor is a "reader" and
> > simplicity for the reader takes precedence:
> >
> >    As a consequence, preference should be give to solutions that
> >    simplify the task of readers.  Reduction of the efforts required by
> >    writers is of secondary importance and the reduction of the efforts
> >    required by tool developers is of least important preference.  While
> >    this perhaps seems obvious, it is at times difficult to take
> >    according design decisions, especially if the group working on a new
> >    data modeling language is dominated by tool developers or data model
> >    writers.
> >
> [BALAZS]: Yes as the above quote says it is NOT the implementors but the
> readers i.e. network
> operators that are important. I think they are much more familiar with the
> concept of a managed
> object or a list then "Pattern Compositions".
>