APNIC Home APNIC Home
Info & FAQ |  Resource services |  Training |  Meetings |  Membership |  Documents |  Whois & Search |  Internet community

You're here:  Home  Mailing Lists rescert 


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proposed Up/Down protocol description



On 19/05/2007, at 3:52 AM, Rob Austein wrote:

5. Namespace URN
I would have thought that the URN should include a version number (and
yes, I know that you disccuss this later, am not sure I'm convinced on
this point yet).

<message xmlns="http://example.com/version1"/> and <message xmlns="http://example.com/version2"/> are different elements, and a valid XML parser that recognises the first MUST not consider the second as the same element. If the namespace URI includes a version number, you lose the ability for v1 implementations to interpret v2 and up documents. See below for how we arrived at the conclusion that this would be bad.

7. namespace and versioning
---------------------------

We've discussed this at some length, and come up with the following:

  - propose to remove the version information from the content type
    (leaving the content type of "aplication/x-rpki")

- propose to keep any version number out of the namespace identifier

  - propose to restore the "version" attribute of the message element
    and define its value as "1" for this specification.

It would be easier to evaluate these recommendations if you shared the
reasoning by which you reached them. :)

  - note that there may be a requirement for explicit version
    negotiation in future versions of this protocol, but defer the
    specification of any such negotiation until the next version

"Once you start down the dark path, forever will it dominate your
destiny, consume you it will...."

  - allow implementations to accept any message, irrespective of the
    version value as long as the recipient understands the namespace
and the recipient understands all elements and attributes that are
    used in the message.

That's probably ok.  Other opinions?

One good (and ancient) example of relatively sane protocol versioning
specification is RFC 1058, the RIPv1 spec, section 3.4 of which says:

   Before processing the datagrams in detail, certain general format
   checks must be made.  These depend upon the version number field in
   the datagram, as follows:

      0   Datagrams whose version number is zero are to be ignored.
          These are from a previous version of the protocol [...].

      1   Datagrams whose version number is one are to be processed
          as described in the rest of this specification.  All fields
that are described above as "must be zero" are to be checked.
          If any such field contains a non-zero value, the entire
          message is to be ignored.

1  Datagrams whose version number are greater than one are
          to be processed as described in the rest of this
          specification.  All fields that are described above as
          "must be zero" are to be ignored.  Future versions of the
          protocol may put data into these fields.  Version 1
          implementations are to ignore this extra data and process
          only the fields specified in this document.

In other words: If it's a higher version number than you understand,
you process the fields you recognize and ignore everything else.
Unstated corollary: old fields may not be reused for new purposes.  In
the pathological case of needing to do a completely incompatable
change to the protocol without just starting over as a new protocol,
abandon all of the old fields except for the version number.

Your proposed rule here is stricter than that, so I don't think your
proposed rule will cause a problem.

Before your feedback, we proposed having a namespace URI that incremented with major changes, causing non-compliant implementations (of client or server) to reject messages they should not try to understand. We also proposed that implementations should ignore any element or attribute they do not recognise in a message with a namespace URI they do recognise. This would have allowed us to add elements or attributes that caused extra behaviour without breaking backwards compatibility, as long as that extra behaviour could be safely ignored by older servers or clients.

After your feedback, we came to the conclusion that this is probably not a good place to be -- there are likely to be very few changes that can be ignored safely. Instead, we decided to remove the version number from the namespace URI so that a v1 server can continue understanding messages from all future clients as long as possible. To facilitate that, we also require that any implementation should reject a message containing any element or attribute it does not recognise, but otherwise process any message it fully recognises, regardless of version number. For a v3 client sending a list request to any server, this means it can simply construct a <message ... version="3" .../> element containing just the list query syntax outlined in the current document, and any version server should be able to respond to that. A v2 or v3 server might be able to recognise that the client is v3 and thus include extra detail in the response that is not defined at this point, but a v1 server can still respond with the v1 list response.

This is different to the RIP versioning scheme in one key way: any data you do not recognise MUST be considered as potentially altering the request in such a way that acting upon the request without using that extra data will lead to an incorrect state.

--
bje