Re: analysis of YANG vs. RELAX NG

Balazs Lengyel <balazs.lengyel@ericsson.com> Thu, 29 November 2007 10:11 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 1IxgNC-0006Sw-QX; Thu, 29 Nov 2007 05:11:58 -0500
Received: from discuss by megatron.ietf.org with local (Exim 4.43) id 1IxgNB-0006Sc-5a for discuss-confirm+ok@megatron.ietf.org; Thu, 29 Nov 2007 05:11:57 -0500
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1IxgNA-0006SR-Ph for discuss@apps.ietf.org; Thu, 29 Nov 2007 05:11:56 -0500
Received: from mailgw3.ericsson.se ([193.180.251.60]) by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1IxgNA-00007i-4n for discuss@apps.ietf.org; Thu, 29 Nov 2007 05:11:56 -0500
Received: from mailgw3.ericsson.se (unknown [127.0.0.1]) by mailgw3.ericsson.se (Symantec Mail Security) with ESMTP id AAFDF20778; Thu, 29 Nov 2007 11:11:55 +0100 (CET)
X-AuditID: c1b4fb3c-aff97bb0000030cf-01-474e906be032
Received: from esealmw127.eemea.ericsson.se (unknown [153.88.254.122]) by mailgw3.ericsson.se (Symantec Mail Security) with ESMTP id 976732072E; Thu, 29 Nov 2007 11:11:55 +0100 (CET)
Received: from esealmw129.eemea.ericsson.se ([153.88.254.177]) by esealmw127.eemea.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830); Thu, 29 Nov 2007 11:11:55 +0100
Received: from [159.107.198.61] ([159.107.198.61]) by esealmw129.eemea.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830); Thu, 29 Nov 2007 11:11:55 +0100
Message-ID: <474E9061.9040209@ericsson.com>
Date: Thu, 29 Nov 2007 11:11:45 +0100
From: Balazs Lengyel <balazs.lengyel@ericsson.com>
User-Agent: Thunderbird 2.0.0.4 (X11/20070604)
MIME-Version: 1.0
To: Rohan Mahy <rohan.mahy@gmail.com>
Subject: Re: analysis of YANG vs. RELAX NG
References: <20071127.130355.18118495.mbj@tail-f.com> <953beacc0711271504y7aea5f21jc301ccad886d3611@mail.gmail.com> <474D9194.3060103@ericsson.com> <953beacc0711281025w4d993dd7u77d729111074496c@mail.gmail.com>
In-Reply-To: <953beacc0711281025w4d993dd7u77d729111074496c@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 29 Nov 2007 10:11:55.0296 (UTC) FILETIME=[44DA9200:01C83270]
X-Brightmail-Tracker: AAAAAA==
X-Spam-Score: -1.0 (-)
X-Scan-Signature: bdc523f9a54890b8a30dd6fd53d5d024
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

Hello Rohan,
Further comments below.
regards Balazs

Rohan Mahy wrote:

>     - what is considered a compatible or incompatible change
> 
> 
> I believe I already covered this. Adding an additional choice (adding a 
> new rpc method), adding via interleave (adding additional data within a 
> container), and copying and redefining via restriction or addition 
> (reusing parts of one container for a new container) are all pretty easy.
[BALAZS]: So if I change the default value of a leaf/attribute is that compatible? Do I have to 
rename my model in this case? If I extend/restrict the value range of a variable is that 
compatible?
I see a number of questions here that are not obvious for me. I feel they need work.
>  
> 
>     - ordering of items within list, leaf-lists
> 
> 
> The schema I described preserves ordering.
[BALAZS]: Yes but is that the order in which the user inputs the leafs, or some order defined 
by the system? If it is user defined how do you insert in the middle.  For me your answer is 
not complete. As we say in Hungary: "The devil lurks in the details. And there are many little 
devils still hiding here.
 >
>     - differentiating between RPCs, notifications and data containers
>     (in YANG you have separate
>     statements)
> 
> 
> This is easy to do using pure syntax.  As in my example, to add an RPC 
> method or response, you just "combine with choice" and you insure that 
> the method isn't used as a notification or a data container.
[BALAZS]: yes but more work
> 
>     - Netconf specific error messages
> 
> 
> If you are talking about error messages sent on the wire, this is a 
> syntactic issue that Relax can handle out of the box.
[BALAZS]: I mean questions like what will be the content of the <error-app-tag> NETCONF element 
be on the wire, if the uniqueness constraint on interface names is violated? By the way how do 
you declare it in RelaxNg that interface names must be unique?
>  
> 
>     One important advantage of YANG is that the number of features in
>     YANG is much smaller then in
>     RelaxNg. 
> 
> 
> This is a preposterous statement. There is no need for an operator to 
> learn features of Relax (or XSD even) that they will never use in order 
> to read and write schema. 
[BALAZS]: I agree that there is no need to learn RelaxNg fully. But there are some dangerous 
constructs in RelaxNg that they need to understand e.g. like redefining patterns. Or is this 
not a problem?
>     In the network management world there is a general dislike for so
>     called "little rules". Things
>     like
>     - you can use RelaxNg but don't use attributes
>     - you can use RelaxNg but don't use mixed pattern
>     - you can use RelaxNg but don't redefine or remove patterns
> 
>     With RelaxNg we will need a number of such rules. With a problem
>     specific solution - YANG -
>     the number of such rules is minimal.
> 
> 
> I disagree. It looks like you have lots of implicit little rules in the 
> YANG draft. A network management person might have become desensitized 
> to these rules to the point of not noticing them, but they are there and 
> there are plenty of them.
>
[BALAZS]: Could you please list YANG's  implicit little rules. We will try to remove as many as 
possible.

regards Balazs