Re: [ogpx] type-system : eliminate closing tags for collections in binary serialization?

"Robert G. Jakabosky" <bobby@sharedrealm.com> Mon, 29 March 2010 07:28 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 6631E3A69C3 for <ogpx@core3.amsl.com>; Mon, 29 Mar 2010 00:28:05 -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 84rYBx6WG5Pw for <ogpx@core3.amsl.com>; Mon, 29 Mar 2010 00:28:04 -0700 (PDT)
Received: from mail.neoawareness.com (ns2.sharedrealm.com [IPv6:2001:470:1f05:4f4::13]) by core3.amsl.com (Postfix) with ESMTP id 725D63A69BA for <ogpx@ietf.org>; Mon, 29 Mar 2010 00:28:04 -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 1Nw9Og-0002qh-OF for ogpx@ietf.org; Mon, 29 Mar 2010 00:28:30 -0700
From: "Robert G. Jakabosky" <bobby@sharedrealm.com>
To: ogpx@ietf.org
Date: Sun, 28 Mar 2010 23:28:22 -0800
User-Agent: KMail/1.9.10
References: <b325928b1003281034x68725d0h555d608e4c8a5d36@mail.gmail.com> <201003282129.59068.bobby@sharedrealm.com> <68104EE8-753D-4D6F-9FB1-CC9640C8BE91@gmail.com>
In-Reply-To: <68104EE8-753D-4D6F-9FB1-CC9640C8BE91@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <201003290028.22977.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 : eliminate closing tags for collections in binary serialization?
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 07:28:05 -0000

On Sunday 28, Han Sontse wrote:
> My instinct is to have the closing tag AND the object count.
> And apply the rule that count MUST equal the enclosed objects.
>
> Having both is a basic sanity check on the content.
>
> Robert's comments earlier about potential to exploit the
> protocol are found first within the ambiguities of the specification.

The main reason for my first e-mail was about the security issues related to 
being too lenient with malformed LLSD messages.  I am not going to complain 
too much if the current binary format is kept as is, as long as the rules are 
tightend to remove those ambiguities from the spec.

I am not a big fan of the current LLSD binary format, but it is not the worst 
binary format that I have seen.  I just hope that it isn't going to be used 
for the high-frequency low-latency messages needed for scene updates, since 
the cpu/latency cost of doing lookups on the map keys will be to high.

> Being a little pedantic in the object structure is good for
> security and consistency.   Some things should not be shortcut
> to save a few transmitted symbols.   UDP wrappers are a good
> example why it's a bad idea.

The issue with the SecondLife UDP protocol is how it is used to transfer 
reliable non-realtime messages, also it doesn't have support for 
encrypting/authenticating high security messages (i.e. money transfers).  
Which is why atleast some of those messages have been moved over to the 
https "Event queue".

The message encoding format isn't that bad, I like that it doesn't use tags in 
the encoded messages.

Here is an example of a nice data serialization system that doesn't require 
type info or tags to be encoded with every message:
http://hadoop.apache.org/avro/docs/current/spec.html

Avro uses JSON schema's to define records, enums, arrays, maps, unions, and 
fixed (i.e. binary values).  To handle forward/backwards compatibility, they 
have a section in the spec on schema resolution.  Avro even has a RPC 
protocol that allows the client/server to verify that they are both using the 
same schema.

I am not saying that VWRAP needs to switch from LLSD/LLIDL to Avro.  It is 
just a good idea to look at how other similar serialization systems have 
designed there binary protocols.

-- 
Robert G. Jakabosky