[mmox] Three serializations

Catherine Pfeffer <cathypfeffer@gmail.com> Thu, 26 February 2009 10:07 UTC

Return-Path: <cathypfeffer@gmail.com>
X-Original-To: mmox@core3.amsl.com
Delivered-To: mmox@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id A97A23A6A35 for <mmox@core3.amsl.com>; Thu, 26 Feb 2009 02:07:52 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.351
X-Spam-Level:
X-Spam-Status: No, score=-2.351 tagged_above=-999 required=5 tests=[AWL=0.247, BAYES_00=-2.599, HTML_MESSAGE=0.001]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id stmouP0nyWZd for <mmox@core3.amsl.com>; Thu, 26 Feb 2009 02:07:51 -0800 (PST)
Received: from mail-bw0-f178.google.com (mail-bw0-f178.google.com [209.85.218.178]) by core3.amsl.com (Postfix) with ESMTP id CDDCA3A688C for <mmox@ietf.org>; Thu, 26 Feb 2009 02:07:48 -0800 (PST)
Received: by bwz26 with SMTP id 26so414445bwz.37 for <mmox@ietf.org>; Thu, 26 Feb 2009 02:08:09 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=5nv3xrSFGw6S1kZs0SEIxHqV5rj+aGyPeyccr2DsmQ4=; b=As9IHXog7Argf0eSFNaGMo/+59hJpkAltQBmBF59Rh42zDwiAugOmzB1HLpXhVgen8 ERk3V2ak7ulIU/wf0zBoajdH+9L2qZIFITF+kgqhWT0iMSKrJdpsqqbQonfjmnTdXhhM 4zlcrm3oOcIsWkUQWuheNJmlRzLFOoSxAChm0=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=UOfn2sezMCx33mrZPLp4Uca6lhAvTmMqd/p+cS2XjpYjKsEl0b2tiOO18UwZ5o8OOH q2k9hd+Q3HYi+O1WKDuTBA7LRZibvqKe2Eet67UMnU/c3Kpogjvu8hOQ/1bgM8iKIslP BCdLz+TL/4AUEDn0qCcSiBm99Y5EXI6Ae4oEM=
MIME-Version: 1.0
Received: by 10.181.199.6 with SMTP id b6mr395250bkq.137.1235642889272; Thu, 26 Feb 2009 02:08:09 -0800 (PST)
Date: Thu, 26 Feb 2009 11:08:09 +0100
Message-ID: <ebe4d1860902260208l53fe0cfbk4641e1db03a1fdc7@mail.gmail.com>
From: Catherine Pfeffer <cathypfeffer@gmail.com>
To: mmox@ietf.org
Content-Type: multipart/alternative; boundary="001636c5a2677bfc6b0463cf872d"
Subject: [mmox] Three serializations
X-BeenThere: mmox@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Massively Multi-participant Online Games and Applications <mmox.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/mmox>, <mailto:mmox-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/mmox>
List-Post: <mailto:mmox@ietf.org>
List-Help: <mailto:mmox-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/mmox>, <mailto:mmox-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 26 Feb 2009 10:07:52 -0000

> so. again. let me reiterate the issues we have with "the XML way."
>
> first off, XML is for us, not a first order representational system.

Finally! I'm really glad to hear that.

If XML serialization is not a first class citizen in the protocol, then why
is it presented at the same level as the other serializations in the LLSD
draft? Why bother with it at all?

Implementing three serializations (plus perhaps a serialization negotiation)
mechanism will mean tons of more work for everyone.

Excuse me, but the considerations you expressed behind the choice of having
a XML serialization ("because we need JSON too", and "not co-mingle
application semantics with presentation logic") do not explain why an XML
serialization would be necessary. To me this sounds like, "We'd like to
separate our data view from the on the on-the-wire protocol. Oh cool, that
means we could change serialization of the fly. As a proof of concept, here
is an XML serialization that could please the XML nerds out there!". That is
not a valid argumentation in favour of an XML serialization.

Virtual Worlds exchange lots of data: spatial, graphical, multimedia. That
makes binary formats an obvious choice, be it LLSD (or whatever its future
name), Google buffers, or anything else.

You have come with something great, Infinity. Your binary format is an
extraordinary middle way between compactness and flexibility. It achieves
what Corba and UNO and others have always tried to do, but in a much
simpler, bullet-proof, way.

On the other hand, transposing it one-to-one to XML does not really work.
When it takes you 1 byte to encode "integer" in the binary serialization, it
take you 19 bytes in the XML serialization (<integer> ... </integer>).

Again, your XML might look like XML, but it is not real XML:


1) You don't take profit of XML validation mechanisms

Having very low-level data types like <integer> or <float> makes validation
look like more a wellformed-ness test than real validation.

There is not even a way to control that a color is in the RGB range, or even
that a vector has three coordinates.

This XML really works at a semantics level that is too low. It's like
writing an assembler program with binary codes in an array of char in a C++
program ;-). The external grammar is C++, but the inside content is still
assembler.


2) Your XML format does not fit well into DOM parsing or XSLT/XPath
transformations

The XPath expression
      map/key[. = 'Taper_X']/following-sibling::float[position() = 1]
speaks for itself, at a place where people normally do
      @Taper_X
(I have not checked that this expression works, but the real one must not be
very far away in terms of complexity)

Jon was right when saying about maps that this is "a terrible
serialization".


3) One of the major advantages of XML is that it's human-readable. But the
data types like <integer> or <array> clutter the file. Embedded XML tags are
replaced with nested <map>s. So even that does not work well.


So, if the native XML tools are of little use, why bother with XML at all?

-- 
Cathy