Re: [mmox] More LLIDL questions
Mark Lentczner <markl@lindenlab.com> Fri, 20 February 2009 01:15 UTC
Return-Path: <markl@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 84AD03A68C8 for <mmox@core3.amsl.com>; Thu, 19 Feb 2009 17:15:19 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.451
X-Spam-Level:
X-Spam-Status: No, score=-3.451 tagged_above=-999 required=5 tests=[AWL=0.148, 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 bMQUo0IC2TFM for <mmox@core3.amsl.com>; Thu, 19 Feb 2009 17:15:18 -0800 (PST)
Received: from tammy.lindenlab.com (tammy.lindenlab.com [64.154.223.128]) by core3.amsl.com (Postfix) with ESMTP id 938003A69E3 for <mmox@ietf.org>; Thu, 19 Feb 2009 17:15:18 -0800 (PST)
Received: from nil.lindenlab.com (nil.lindenlab.com [10.1.16.4]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tammy.lindenlab.com (Postfix) with ESMTP id D00223DBC45C for <mmox@ietf.org>; Thu, 19 Feb 2009 17:15:31 -0800 (PST)
Message-Id: <80E946E9-5C62-4E00-BE8C-A15513898F99@lindenlab.com>
From: Mark Lentczner <markl@lindenlab.com>
To: mmox@ietf.org
In-Reply-To: <62BFE5680C037E4DA0B0A08946C0933D501FE18E@rrsmsx506.amr.corp.intel.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: Thu, 19 Feb 2009 17:15:31 -0800
References: <62BFE5680C037E4DA0B0A08946C0933D501FE18E@rrsmsx506.amr.corp.intel.com>
X-Mailer: Apple Mail (2.930.3)
Subject: Re: [mmox] More LLIDL questions
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: Fri, 20 Feb 2009 01:15:19 -0000
On Feb 18, 2009, at 12:39 PM, Hurliman, John wrote: > ; An LLSD value containing { member1 : true, member2 : true } comes > in. Is member3 a string or an int? > &a = { member1 : true, member2 : false, member3 : string } > &a = { member1 : false, member2 : true, member3 : int } In our LLIDL implementation, if you matched that LLSD against the LLIDL value "&a", with those variants in scope, the answer would come back INCOMPATIBLE. This is because no variant matched the value. In the case of the selectors in LLIDL, they all need to match. Had the variants been: &a = { member1: true, member3: string } &a = { member2: true, member3: int } The answer would be MIXED. This is because the actual value matched each variant with the same result: In each case, the the data had parts that were ADDITIONAL (member2 or member1), and parts that were DEFAULTED (member3). The state of having both DEFAULTED parts and ADDITIONAL parts is MIXED. Matching variants returns the best match, but in this case they were both MIXED, so the result is MIXED. Hope that was clear. Please note: The notion of returning a confidence level from a LLIDL to actual LLSD match is a function of our library, not part of the specification. This was intentional: LLSD is defined in such a way that given *any* LLSD, and code that expects any particular structure - the code can safely extract values, receiving defaults if things don't match as expected. Hence, LLIDL isn't a way of expressing a hard "go/no-go" conformance, it is a way of expressing what is expected. > ; How is a parser supposed to handle this? > &b = { $ : &b } > ; Or this? > &c = { $ : &d } > &d = { $ : &c } We could declare recursive LLIDL is illegal. It isn't too hard to detect. On the other hand, since LLSD data values can't be recursive, even if you have a recursive LLIDL description, any actual match operation is bounded. Our implementation handles recursive LLIDL and it took no extra work to do so. > ; The first variant has the type uri. The second variant has the > type string? > &e = uri > &e = "http://www.google.com/" The second doesn't have the type string, it is a selector of a specific string. Here's how our LLIDL would match these LLSDs: string "http://www.google.com/" --> MATCHED (matches the selector exactly) string "http://www.example.com/" --> CONVERTED (convertable to a uri) uri "http://www.google.com/" --> MATCHED (matches the type uri) uri "http://www.example.com/" --> MATCHED (matches the type uri) string "" --> INCOMPATIBLE (neither matches the specific selector string, nor is a reasonable conversion to uri) The notion of "reasonable conversion" is going to be implementation specific, since LLSD defines a result no matter what is converted to what. In our case, we took the notion that if the transmitted value only converts to the desired value via a defaulting, well, then, that doesn't really increase the confidence in the match. (There is some subtlety in our choices here... I can go into it more if you like.) > ; Forward-slash seems like an odd addition to 0-9+A-Z. Why this > character? > &f/ = "hello slash" As a trailer, sure, but we like using slash as a name space delimiter in our protocols for resource names, member names, fixed selector strings, and, as you indicate, selector names: %% thing/operation_x -> { id: uuid } <- { name: string, system_a/count: int, system_b/count: int, system_c: &system_c/info } &system_c/info = { name: string, count: int } &system_c/info = { name: string, count: real, extended: true } - Mark Mark Lentczner Sr. Systems Architect Technology Integration Linden Lab markl@lindenlab.com Zero Linden zero.linden@secondlife.com
- [mmox] More LLIDL questions Hurliman, John
- Re: [mmox] More LLIDL questions Mark Lentczner
- Re: [mmox] More LLIDL questions Hurliman, John
- [mmox] LLSD Charles Krinke
- Re: [mmox] LLSD Meadhbh Hamrick (Infinity)
- Re: [mmox] More LLIDL questions Meadhbh Hamrick (Infinity)
- Re: [mmox] LLSD Charles Krinke
- Re: [mmox] LLSD Meadhbh Hamrick (Infinity)
- Re: [mmox] More LLIDL questions Hurliman, John
- Re: [mmox] LLSD Charles Krinke
- Re: [mmox] LLSD Jesrad
- Re: [mmox] LLSD Charles Krinke
- Re: [mmox] More LLIDL questions Mark Lentczner
- Re: [mmox] LLSD Meadhbh Hamrick (Infinity)
- [mmox] LLSD and content schema Jon Watte
- Re: [mmox] LLSD and content schema Morgaine
- Re: [mmox] LLSD and content schema Meadhbh Hamrick (Infinity)
- Re: [mmox] LLSD and content schema Jon Watte
- Re: [mmox] LLSD and content schema Lisa Dusseault
- Re: [mmox] LLSD and content schema Jon Watte