From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: *** X-Spam-Status: No, score=3.4 required=5.0 tests=AWL,DNS_FROM_RFC_ABUSE, DNS_FROM_SECURITYSAGE,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id D9711BBAF for ; Fri, 24 Oct 2008 23:39:19 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiECAFPdAUnAXQImgWdsb2JhbACBdpICAQEWIq1ug1A X-IronPort-AV: E=Sophos;i="4.33,480,1220220000"; d="scan'208";a="16463880" Received: from discorde.inria.fr ([192.93.2.38]) by mail2-smtp-roc.national.inria.fr with ESMTP; 24 Oct 2008 23:39:19 +0200 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id m9OLdJs8008503 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Fri, 24 Oct 2008 23:39:19 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlkBANvcAUnVBJXyfGdsb2JhbACBdpICAQELCQoHEQWtdoNQ X-IronPort-AV: E=Sophos;i="4.33,480,1220220000"; d="scan'208";a="19164896" Received: from outmailhost.telefonica.net (HELO ctsmtpout2.frontal.correo) ([213.4.149.242]) by mail1-smtp-roc.national.inria.fr with ESMTP; 24 Oct 2008 23:39:18 +0200 Received: from NANA.localdomain (83.59.9.219) by ctsmtpout2.frontal.correo (7.2.056.6) (authenticated as ferferse$telefonica.net) id 4901A98A000265CA for caml-list@inria.fr; Fri, 24 Oct 2008 23:39:18 +0200 Received: from mfp by NANA.localdomain with local (Exim 4.69) (envelope-from ) id 1KtUNJ-0003rV-LU for caml-list@inria.fr; Fri, 24 Oct 2008 23:39:17 +0200 Date: Fri, 24 Oct 2008 23:39:17 +0200 From: Mauricio Fernandez To: caml-list@inria.fr Subject: Re: [Caml-list] Re: Serialisation of PXP DTDs Message-ID: <20081024213917.GF32611@NANA.localdomain> Mail-Followup-To: caml-list@inria.fr References: <20081023210527.GB32611@NANA.localdomain> <278256.11946.qm@web54605.mail.re2.yahoo.com> <20081023233657.GE32611@NANA.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-Miltered: at discorde with ID 49024087.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; pxp:01 dtds:01 0200,:01 mikkel:01 rgensen:01 overkill:01 abstraction:01 encodings:01 unions:01 syntax:01 wrote:01 abstract:01 extensible:01 extensible:01 caml-list:01 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