Subject: [netmod] Issues with draft-ietf-netmod-nmda-diff-00

From: Andy Bierman <[email-masked]>
Date: Tue, 6 Nov 2018 09:31:19 -0800

Hi,

I understand the WG is going to delay this work 1 or 2 meetings to
see if any proposals for a diff format are proposed.

Any diff command assumes some algorithm that requires:
  (1) copy of the source document
  (2) set of diffs against the source document
  (3) procedure for applying diffs

With this information the tool can produce the target document.

The WG has to decide if this <compare> operation is for
textual representation of a datastore or is it a conceptual compare
of a datastore.  They are not the same.

The first problem that comes up with a textual compare is document order.
There is no defined order for top-level data nodes within a datastore.
There is no defined order for augmenting nodes which are siblings.

The next problem is that some data types have no canonical representation.

A textual compare will be affected by both types of false positives.

So while we are waiting up to 8 months for proposals...
What problem is this new diff format trying to solve?

Andy

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Tue, 6 Nov 2018 18:41:42 +0100

> The next problem is that some data types have no canonical representation.

YANG requires a canonical format, xpath expressions for example are
evaluated against the canonical representation. Data types that have
no canonical representation need to be fixed if we want interoperable
behaviour (independent of any diff solutions).

That said, I tend to agree with your other points that diff should be
calculated on the data tree and not its serialization and that a diff
and patch algorithm has to be smart to take different orders, that are
entirely possible, into account (unless we want to go down the path of
defining a canonical order for the tree itself, which I expect to hit
quite some resistance).

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>