[mmox] Automatic generation of the schema

Catherine Pfeffer <cathypfeffer@gmail.com> Thu, 26 February 2009 12:10 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 DFED93A6803 for <mmox@core3.amsl.com>; Thu, 26 Feb 2009 04:10:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.345
X-Spam-Level:
X-Spam-Status: No, score=-2.345 tagged_above=-999 required=5 tests=[AWL=0.253, 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 kuE857mFZte6 for <mmox@core3.amsl.com>; Thu, 26 Feb 2009 04:10:30 -0800 (PST)
Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.187]) by core3.amsl.com (Postfix) with ESMTP id 8DC523A6801 for <mmox@ietf.org>; Thu, 26 Feb 2009 04:10:29 -0800 (PST)
Received: by fk-out-0910.google.com with SMTP id f33so258803fkf.5 for <mmox@ietf.org>; Thu, 26 Feb 2009 04:10:50 -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=lq9Db5C92Zy1eNjmiMaB17DTzl+usgZqvXbTvY0YJLE=; b=wf8I9x1VL+mGu3NEpaCiElWAzokWmct61B3ZKsqW0QwejtbKcJ8gCUDlHe95ri0Mfb /h2zqfeE7LU88wkZgfWPBrkzzgrGfBU7mreBNk55Gg6itvaYGL+yEPlM5bnXqmUwpifX hiflzmzgLna0k3DIfAjLYyFSQFSsV5Q0Ilx78=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Ybb4QgXKRpJLm+DFvLpy5UWTwOxmPinngKCFECly3cJFsuhs5WC59NDpCSoSGb9SJg h1QGabhlC0rdVzcBg1Y4DIbk8bg2R7YkFm9DmI7NYZ+khRzpSk8wfLhrEYhPYiJlDbpX 7b+ncoJOwQIFQTTOOgMyNG0rFkdLRPGaMBnFQ=
MIME-Version: 1.0
Received: by 10.181.209.1 with SMTP id l1mr429030bkq.139.1235650250016; Thu, 26 Feb 2009 04:10:50 -0800 (PST)
Date: Thu, 26 Feb 2009 13:10:49 +0100
Message-ID: <ebe4d1860902260410n5e19fao96b2c5f71b7bd890@mail.gmail.com>
From: Catherine Pfeffer <cathypfeffer@gmail.com>
To: mmox@ietf.org
Content-Type: multipart/alternative; boundary="0016e6d6484e3808dc0463d13ed9"
Subject: [mmox] Automatic generation of the schema
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 12:10:31 -0000

Jon said:
> My question is not just to you, but to the list:
> We view the xxSD description language as a source language, from which
> we could compile various outputs.
> Could one of those outputs be a DTD and an XSD? Thus, we don't create
> the DTD or XSD directly; we create the mapping from xxSD input to DTD
> and XSD output.

I can't answer for the list, so I will answer for myself ;-) :

Yes, that should be possible. Infinity asked too if there would be a
mechanical way to map conceptual xxSD into the "XML way". I think the answer
is "yes", although it has more a chance to be a "compilation" from xxIDL to
XSD or DTD, than from binary xxSD. Or it could even take the form of a C++
library that would produce both the schema and the data. Not sure. That
would need to be investigated.

Currently, LLSD data flow mixes three things:
  - the data (102.5 meters);
  - the data type (float);
  - the field name (POSITION_X).

While this is acceptable in a binary stream, and provides an incredible
flexibility, it is most unusual in the XML world, and also wastes a lot of
bandwidth (compare 'i' to "<integer></integer>"). Okay, you can compress
with gzip, but then you both lose human readability and processor cycles.

In the XML world,
  - data (102.5 meters) appears in the data packets;
  - data type (integer) goes to the XSD schema;
  - the field name (POSITION_X) appears both in the data packets (but as a
tag, not as ordinary data), and in the XSD schema.

The advantage of separating the schema from the data is that you can send
the schema only once at the beginning of the communication of a viewer with
a given simulator. You don't need to repeat that the X position is a float
each time your avatar moves 10 centimeters to the left.

Of course, all these efforts make sense only if there is a real need for XML
stuff.

-- 
Cathy