Re: [mmox] LLSD and content schema

"Meadhbh Hamrick (Infinity)" <infinity@lindenlab.com> Sat, 21 February 2009 09:17 UTC

Return-Path: <infinity@lindenlab.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 59B6C3A6868 for <mmox@core3.amsl.com>; Sat, 21 Feb 2009 01:17:54 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.561
X-Spam-Level:
X-Spam-Status: No, score=-3.561 tagged_above=-999 required=5 tests=[AWL=0.038, BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 5qfVwm4saQxI for <mmox@core3.amsl.com>; Sat, 21 Feb 2009 01:17:53 -0800 (PST)
Received: from tammy.lindenlab.com (tammy.lindenlab.com [64.154.223.128]) by core3.amsl.com (Postfix) with ESMTP id 7A5983A67A3 for <mmox@ietf.org>; Sat, 21 Feb 2009 01:17:53 -0800 (PST)
Received: from [192.168.1.11] (dsl-63-249-112-43.cruzio.com [63.249.112.43]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tammy.lindenlab.com (Postfix) with ESMTP id DFE701414001; Sat, 21 Feb 2009 01:18:08 -0800 (PST)
Message-Id: <CAAD3457-49CD-4F62-BD42-90BE79DA232D@lindenlab.com>
From: "Meadhbh Hamrick (Infinity)" <infinity@lindenlab.com>
To: Jon Watte <jwatte@gmail.com>
In-Reply-To: <499F10D7.5080605@gmail.com>
Content-Type: text/plain; charset="US-ASCII"; format="flowed"; delsp="yes"
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (Apple Message framework v930.3)
Date: Sat, 21 Feb 2009 01:18:06 -0800
References: <62BFE5680C037E4DA0B0A08946C0933D501FE18E@rrsmsx506.amr.corp.intel.com><80E946E9-5C62-4E00-BE8C-A15513898F99@lindenla b.com><62BFE5680C037E4DA0B0A08946C0933D50262DA8@rrsmsx506.amr.corp.intel.com><29656.28734.qm@web82607.mail.mud.yahoo.com><C803B 307-0984-40AE-946A-00EDDA664502@lindenlab.com><61320.78349.qm@web82607.mail.mud.yahoo.com><FC42B493-529E-424B-9411-80781A570B12 @lindenlab.com><962799.66993.qm@web82608.mail.mud.yahoo.com> <53cd6c2e0902200741m2313b1eeqffc87c8601fd72e2@mail.gmail.com> <88DFFC67-0B59-4D65-86FB-8776899B794A@lindenlab.com> <499F10D7.5080605@gmail.com>
X-Mailer: Apple Mail (2.930.3)
Cc: "mmox@ietf.org" <mmox@ietf.org>
Subject: Re: [mmox] LLSD and content 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: Sat, 21 Feb 2009 09:17:54 -0000

On Feb 20, 2009, at 12:21 PM, Jon Watte wrote:

> Meadhbh Hamrick (Infinity) wrote:
>> * LLSD is implementable by mortals in a tractable amount of time  
>> and without the use of complicated third-party tools (ASN.1  
>> compilers, etc.)
>
> I don't see the LLSD interface compiler as any different in  
> conceptual complexity than an ASN.1 compiler. I did bring up the  
> question of ASN.1 before, and was told by you that you felt it was  
> "too buggy," which I think is not fair or accurate.

which LLSD compiler are you referring to? i wasn't aware that one was  
required or available.

> However, I believe ASN.1 and also LLSD have a problem that I'd like  
> to see addressed in a standard: they use implicit schema.
>
> If I want to send a piece of data from point A to point B, and the  
> points don't both exactly know what the data is, that's fine -- but,  
> in that case, you typically want to use something a little more open- 
> ended and more generally standardized, like XML. The benefit of XML  
> is that there are tons of tools that already support it (as there  
> are with ASN.1, btw); XML also allows well-formed documents to be  
> verified using XSD schema. If you need large binary blob support  
> (textures, etc), those can be included by reference uri. I think XML  
> is appropriate for those cases, and LLSD doesn't quite fit the bill  
> in that case.

Jon. i think you mis-understand LLSD. there is nothing in the LLSD  
specification that REQUIREs a schema be defined. In the current  
implementations of LLSD, it is not considered a transport-layer error  
to  add an additional field, or even to drop one that's defined by an  
application protocol. In this sense XML is more restrictive because it  
REQUIRES you to create a new DTD to extend an existing message flow  
(though presumably you would configure your DTDs or Schemas to be  
easily extensible.)

for instance.. if a parameter was defined as:

    &response = {
      success     : false ,
      description : string ,
      err_num     : integer
    }

    &response = {
      success     : true,
      description : string
    }
    %% foo <- undef -> & response
and you received an XML serialization that looked like:

<llsd>
   <map>
     <key>success</key>
     <boolean>true</boolean>
     <key>something_i_like_to_eat_on_sundays</key>
     <string>bananas</string>
   </map>
</llsd>

this i not an error. an implementation that attempted to get the value  
of "description" field from the map would retrieve the default for  
type string (i.e. - a zero length string.) that the  
'something_i_like_to_eat_on_sundays' information is passed may be a  
waste of bandwidth, but it might also be a new message format unknown  
by the consumer. a system that ignores unexpected input is a system  
that has a fighting chance of not having to upgraded in tandem with  
the client.

> If I want to send a piece of data from point A to point B, and point  
> A and point B know exactly what this data will be, then data type  
> information does not need to be sent as part of the serialization.  
> In fact, including data type information is redundant and consumes  
> network bandwidth unnecessarily.

however, sending type information in the serialization allows  
intermediary systems to reason about the content of the data they are  
receiving and potentially make routing and caching decisions based on  
the content.

LLSD is intended to be used in a "loosely coupled" environment. one  
"feature" of such an environment is that systems be resilient in the  
face of heterogeneity in terms of component version. for example,  
consider a logging system that received logging messages from a number  
of clients and stores them for later analysis. when the system is  
initially deployed, messages may be defined as the tuple (source,  
severity, description). it is not difficult to imagine the situation  
where one client wishes to add a value to that tuple to make it  
(source, facility, severity, description). in tightly bound systems,  
you might create a new message PDU format, but both the client and the  
server would need to know about this change at exactly the same time  
(otherwise the server would signal an error when it received an  
unknown message format. now imagine the mess if half of the systems  
were in one administrative domain and the rest in another.