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

Dahlia Trimble <dahliatrimble@gmail.com> Mon, 29 March 2010 08:07 UTC

Return-Path: <dahliatrimble@gmail.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 B7A2B3A6878 for <ogpx@core3.amsl.com>; Mon, 29 Mar 2010 01:07:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.132
X-Spam-Level: *
X-Spam-Status: No, score=1.132 tagged_above=-999 required=5 tests=[BAYES_50=0.001, DNS_FROM_OPENWHOIS=1.13, HTML_MESSAGE=0.001]
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 UCWw8XGfzrcy for <ogpx@core3.amsl.com>; Mon, 29 Mar 2010 01:07:56 -0700 (PDT)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by core3.amsl.com (Postfix) with ESMTP id 6A3CF3A689F for <ogpx@ietf.org>; Mon, 29 Mar 2010 01:07:56 -0700 (PDT)
Received: by vws12 with SMTP id 12so2973065vws.31 for <ogpx@ietf.org>; Mon, 29 Mar 2010 01:08:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type; bh=pWVytRiggLn/2dIYo9zVAdV7VZvxV3h/Nxeyj0fjWhc=; b=eeYrisuHHmkiyxBk3MyIclp4RkGz4UtZy/OVsEk7o8AH1ysh3niwbRJgkbWqQEHLmS Sntq4ElADHCdN+PRJceaa66NmqZCK1ZjQjIc4HPvPZZDCkL1ExPeed6aM2nUXB4qtHEo lDPbyFJC352U+N2pn67jVKatduEovI7aISgZQ=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=XVJhwqByOg6om6irAWVsVT6W8JJrkBT0ROyXVmsbWMbmiocKnABPEGVcOkyjxAogmX QQ6WjmVnV3kZ7U2Fs+s1Hr4LcDhDBlPJ/0646kKVv7BfM+TblwWl4sYdlf1o+Zl2bbUD a3R/WNCUTKODWDnYoTiUzlDhRkDK+IU1phL64=
MIME-Version: 1.0
Received: by 10.220.126.200 with HTTP; Mon, 29 Mar 2010 01:08:19 -0700 (PDT)
In-Reply-To: <201003290028.22977.bobby@sharedrealm.com>
References: <b325928b1003281034x68725d0h555d608e4c8a5d36@mail.gmail.com> <201003282129.59068.bobby@sharedrealm.com> <68104EE8-753D-4D6F-9FB1-CC9640C8BE91@gmail.com> <201003290028.22977.bobby@sharedrealm.com>
Date: Mon, 29 Mar 2010 01:08:19 -0700
Received: by 10.220.88.81 with SMTP id z17mr2926688vcl.34.1269850099517; Mon, 29 Mar 2010 01:08:19 -0700 (PDT)
Message-ID: <ab84ceb11003290108k17256acg560eed9e9cdf0d37@mail.gmail.com>
From: Dahlia Trimble <dahliatrimble@gmail.com>
To: "Robert G. Jakabosky" <bobby@sharedrealm.com>
Content-Type: multipart/alternative; boundary="0016e6470cf8198bf30482ec0472"
Cc: ogpx@ietf.org
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 08:07:57 -0000

I've used binary LLSD for scene update messages in a prototype viewer and
protocol for OpenSim, and I haven't found deserialization overhead to be an
issue. When you do things like sort 10000 scene nodes by distance from the
camera a couple times a second while you're also constructing 100+
procedural objects and hashing hundreds of material descriptions,
deserializing a few messages is insignificant. I suspect there's probably
other delay causing problems with LLSD in general, or possibly related to
the transport mechanism, but I haven't seen any specifically with binary
serialization/deserialization. Note: this was using the libomv
implementation.

On Mon, Mar 29, 2010 at 12:28 AM, Robert G. Jakabosky <bobby@sharedrealm.com
> wrote:

> 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
> _______________________________________________
> ogpx mailing list (VWRAP working group)
> ogpx@ietf.org
> https://www.ietf.org/mailman/listinfo/ogpx
>