Subject: Re: [netmod] canonical order

From: David Partain <[email-masked]>
Date: Wed, 11 Feb 2009 11:22:18 +0100

Hi,

An unclosed thread...

On Tuesday 06 January 2009 17.50.31 Andy Bierman wrote:
> Phil Shafer wrote:
> > Andy Bierman writes:
> >> Do we at least agree that the order must be consistent within
> >> a single implementation?
> >
> > Sounded like you and Martin disagree on whether XPath allows this
> > sort of order issues.   Within a single element type, I don't see
> > how para[3] could differ between implementations, but I certainly
> > see that *[3] or node()[3] would be implementation specific.
>
> We are just talking about 1 manager issuing a <commit>
> or a <get> with a an XPath filter to 1 particular agent.
>
> If the manager issues the same command 2 times in a row
> with the same XPath (I don't care what it is), and no nodes
> have been added or removed from the database,
> and no values in the database have changed at all:
>
> Will the manager get the same answer or not?
>
> If not, why not?
>
> I understand that results from different agents
> may not be the same, even for the same (*)
> database contents.
>
>
> * configurations can only be compared outside the database,
>    represented as XML documents.

Previously, Andy also wrote:

> Do we at least agree that the order must be consistent within
> a single implementation? 

> If the affected portion of the database has not 
> changed at all, and if a manager retrieves /foo[3] or 
> runs a must-test on /foo[3] at T0 and then T1, will 
> the result be the same each time? 

> IMO, MUST be yes. 

I absolutely think that, within an implementation, this should be consistent.  
Should the text that Andy suggested be added?

David

---

From: Andy Bierman <[email-masked]>
Date: Wed, 11 Feb 2009 09:38:16 -0800

> Should the text that Andy suggested be added?

Not so sure about the must-test anymore.
Just <get> and <get-config>.

What about a warning that the order MAY NOT be stable instead?
It is possible that internal natural sort order
within the agent changes due to tree balancing
or some internal periodic 'cleanup routine'.
Let's stay far away from standardizing agent internals,
and stick to the PDU exchanges instead.

IMO, the first point is the main one -- an application
can compare the content of <rpc-reply> PDUs. Period.
That is the only XML instance document in NETCONF, and the
only way full XPath can be used reliably.

> David

Andy

---

From: "tom.petch" <[email-masked]>
Date: Mon, 16 Feb 2009 17:58:07 +0100

----- Original Message -----
From: "Andy Bierman" <[email-masked]>
To: "David Partain" <[email-masked]>
Cc: <[email-masked]>
Sent: Wednesday, February 11, 2009 6:38 PM
Subject: Re: [netmod] canonical order

> > An unclosed thread...

Yup, just one of .... :-(

> What about a warning that the order MAY NOT be stable instead?

That is what I expect from a database, unless there is a defined sort order.

One large, highly respectable, relational database gives me a different answer
almost every time to my identical SQL query, even a few seconds later.  I have
found empirically that unless I specify a sort, the order is that of least
recently used, except that a large reply will have several blocks within each of
which the order is least recently used and the order of the blocks is To Be
Ascertained:-(  All doubtless very natural to the implementer of the code.

Some schemes of object identifiers have a fairly natural and obvious sort order;
YANG does not so I do not think that positional predicates will
ever make sense.

So,

IMO, MUST be No.

Tom Petch