Browse thread
Serialisation of PXP DTDs
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Mauricio Fernandez <mfp@a...> |
| Subject: | Re: [Caml-list] Re: Serialisation of PXP DTDs |
On Fri, Oct 24, 2008 at 11:11:10AM +0200, Mikkel Fahnøe Jørgensen wrote:
> I guess this discussion is an overkill for the problem at hand, but
> speaking of binary extensible protocols, have you looked at ASN.1? It
> is an abstraction over any number of encodings. At least one binary
> encoding has extension bits to allow future growth of object
> collections and similar.
Yes, I referred to it indirectly in my previous message. Indeed, ASN.1
supports disjoint unions ("tagged types") that would allow to extend a type.
It is obviously possible to build extensible protocols with ASN.1, but if I
understand it correctly, not all protocols expressed in ASN.1's abstract
syntax are automatically extensible --- it requires some care when designing
them (i.e., tagging).
My main problem with ASN.1 is that even the distinguished encoding rules are
fairly complex; also, explicit tagging results in relatively heavy
serialization too. My protocol family is both substantially simpler and better
adapted for extensibility. For example, the generic pretty-printer (able to
decode any message) takes ~40 lines of code.
--
Mauricio Fernandez - http://eigenclass.org