Re: [ogpx] type-system : guidance for binary serialization implementers

"Robert G. Jakabosky" <bobby@sharedrealm.com> Mon, 29 March 2010 04:18 UTC

Return-Path: <bobby@sharedrealm.com>
X-Original-To: ogpx@core3.amsl.com
Delivered-To: ogpx@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 2951F3A66B4 for <ogpx@core3.amsl.com>; Sun, 28 Mar 2010 21:18:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.131
X-Spam-Level: *
X-Spam-Status: No, score=1.131 tagged_above=-999 required=5 tests=[BAYES_50=0.001, 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 Rh-abUSmOS5Q for <ogpx@core3.amsl.com>; Sun, 28 Mar 2010 21:18:11 -0700 (PDT)
Received: from mail.neoawareness.com (ns2.sharedrealm.com [IPv6:2001:470:1f05:4f4::13]) by core3.amsl.com (Postfix) with ESMTP id BF9683A6877 for <ogpx@ietf.org>; Sun, 28 Mar 2010 21:18:10 -0700 (PDT)
Received: from localhost ([127.0.0.1] helo=[10.200.0.30]) by mail.neoawareness.com with esmtpa (Exim 4.69) (envelope-from <bobby@sharedrealm.com>) id 1Nw6Qu-0002Z5-Ge for ogpx@ietf.org; Sun, 28 Mar 2010 21:18:36 -0700
From: "Robert G. Jakabosky" <bobby@sharedrealm.com>
To: ogpx@ietf.org
Date: Sun, 28 Mar 2010 20:18:31 -0800
User-Agent: KMail/1.9.10
References: <b325928b1003281034s55fae732n7be979446759bd12@mail.gmail.com> <ab84ceb11003282104mc2b02cfg326bc163d0fd279e@mail.gmail.com>
In-Reply-To: <ab84ceb11003282104mc2b02cfg326bc163d0fd279e@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <201003282118.31873.bobby@sharedrealm.com>
X-SA-Exim-Connect-IP: 127.0.0.1
X-SA-Exim-Mail-From: bobby@sharedrealm.com
X-SA-Exim-Scanned: No (on mail.neoawareness.com); SAEximRunCond expanded to false
Subject: Re: [ogpx] type-system : guidance for binary serialization implementers
X-BeenThere: ogpx@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Virtual World Region Agent Protocol - IETF working group <ogpx.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/ogpx>, <mailto:ogpx-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/ogpx>
List-Post: <mailto:ogpx@ietf.org>
List-Help: <mailto:ogpx-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ogpx>, <mailto:ogpx-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 29 Mar 2010 04:18:13 -0000

Here is a link to the LLSD binary implementation from libopenmetaverse:
http://openmetaverse.org/viewvc/index.cgi/omf/libopenmetaverse/trunk/OpenMetaverse.StructuredData/LLSD/BinaryLLSD.cs?revision=2507&view=markup

The code is BSD licensed so I don't think there is a problem with people on 
this list reading it.

It handles missing closing tags or wrong "object counts" by throwing an 
exception, which would cause it to reject malformed LLSD messages.  I think 
this is the best way to handle any malformed LLSD message, weather it is in 
binary/JSON/XML format.

Also it doesn't check for duplicate map keys.  Only the last key/value pair 
with the same key would be kept.  We will have to decide if duplicate keys 
are allowed by the spec.

On Sunday 28, Dahlia Trimble wrote:
> OpenSim in general uses the serializer and deserializer classes in
> libOpenmetaverse (1). There may be a few lingering places in the code base
> where they are hard coded with other methods, but I suspect they would be
> converted to using the libOpenmetaverse implementation rather than be
> modified to conform to any spec modifications.
>
>
> 1. http://www.openmetaverse.org/projects/libopenmetaverse
>
> <http://www.openmetaverse.org/projects/libopenmetaverse>


-- 
Robert G. Jakabosky