Re: [vwrap] [ogpx] type-system : guidance for binary serialization implementers
Mark Lentczner <markl@lindenlab.com> Thu, 01 April 2010 05:54 UTC
Return-Path: <markl@lindenlab.com>
X-Original-To: vwrap@core3.amsl.com
Delivered-To: vwrap@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix)
with ESMTP id 96C253A693C for <vwrap@core3.amsl.com>;
Wed, 31 Mar 2010 22:54:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.736
X-Spam-Level: *
X-Spam-Status: No, score=1.736 tagged_above=-999 required=5 tests=[AWL=0.277,
BAYES_20=-0.74, DATE_IN_PAST_06_12=1.069, DNS_FROM_OPENWHOIS=1.13]
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 3nqixLeGY1ye for
<vwrap@core3.amsl.com>; Wed, 31 Mar 2010 22:54:22 -0700 (PDT)
Received: from mail-gw0-f44.google.com (mail-gw0-f44.google.com
[74.125.83.44]) by core3.amsl.com (Postfix) with ESMTP id C435E3A693A for
<vwrap@ietf.org>; Wed, 31 Mar 2010 22:54:13 -0700 (PDT)
Received: by gwj15 with SMTP id 15so676685gwj.31 for <vwrap@ietf.org>;
Wed, 31 Mar 2010 22:54:42 -0700 (PDT)
Received: by 10.90.24.20 with SMTP id 20mr1113546agx.81.1270101281418;
Wed, 31 Mar 2010 22:54:41 -0700 (PDT)
Received: from [192.168.1.192] (m208-18.dsl.rawbw.com [198.144.208.18]) by
mx.google.com with ESMTPS id c21sm7782381ibr.16.2010.03.31.22.54.40
(version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 31 Mar 2010 22:54:40 -0700 (PDT)
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0 (Apple Message framework v1078)
From: Mark Lentczner <markl@lindenlab.com>
In-Reply-To: <b325928b1003281034s55fae732n7be979446759bd12@mail.gmail.com>
Date: Wed, 31 Mar 2010 16:54:01 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <A64E850A-27FF-4598-AFC6-A1FB71E1789C@lindenlab.com>
References: <b325928b1003281034s55fae732n7be979446759bd12@mail.gmail.com>
To: vwrap <vwrap@ietf.org>
X-Mailer: Apple Mail (2.1078)
Subject: Re: [vwrap] [ogpx] type-system : guidance for binary serialization
implementers
X-BeenThere: vwrap@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Virtual World Region Agent Protocol - IETF working group
<vwrap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/vwrap>,
<mailto:vwrap-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/vwrap>
List-Post: <mailto:vwrap@ietf.org>
List-Help: <mailto:vwrap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/vwrap>,
<mailto:vwrap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 01 Apr 2010 05:54:23 -0000
To summarize, there are several possible mal-formed conditions in a binary serialized LLSD value: 1&2) The "object count" is inconsistent with the number of objects bound by the matching opening and closing tags for an array or map. (Original e-mail had these as two cases, too few and too many) 3) No matching closing tag is found for an array or map 4) Something other than a 'k' tag found where 'k' required in a map 5) A 'k' tag encountered either outside a map, or where a value is required in a map 6) Duplicate keys in a map My reading of the intention of the Linden Lab C++ implementation is that cases 1, 2, 3, 4, and 5 result in a parse failure for the entire binary LLSD. Duplicate keys (case 6) are handled by "last one wins". I believe that the mal-formed cases 1 through 5 should result in rejection. I can see no benefit to trying to repair what can only have been generated by incorrect code. (And yes, I lament the redundancy between the object counts and the closing tags.) Case 6 is tricker. I'm loathe to say that duplicate keys result in rejection, since that my difficult or awkward in some implementations. That would lead me to say "if there are duplicates, the result is undefined." But then I worry that people will do things like hide values from some implementations by relying on the priority they use. Which leads me to just say "last wins", though that too might be more awkward for some implementations. Still mulling.... - Mark Mark Lentczner Sr. Systems Architect Technology Integration Linden Lab markl@lindenlab.com Zero Linden zero.linden@secondlife.com
- Re: [vwrap] [ogpx] type-system : guidance for bin… Mark Lentczner