Re: [ogpx] type-system : version tag and handling unknown tags

"Robert G. Jakabosky" <bobby@sharedrealm.com> Mon, 29 March 2010 05:29 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 650BD3A677E for <ogpx@core3.amsl.com>; Sun, 28 Mar 2010 22:29:06 -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 nsAKVkH89ouX for <ogpx@core3.amsl.com>; Sun, 28 Mar 2010 22:29: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 D29683A6818 for <ogpx@ietf.org>; Sun, 28 Mar 2010 22:28:59 -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 1Nw7XR-0002gN-T3 for ogpx@ietf.org; Sun, 28 Mar 2010 22:29:25 -0700
From: "Robert G. Jakabosky" <bobby@sharedrealm.com>
To: ogpx@ietf.org
Date: Sun, 28 Mar 2010 21:29:21 -0800
User-Agent: KMail/1.9.10
References: <b325928b1003281033j1ccaa3dend06ebbce29a13359@mail.gmail.com>
In-Reply-To: <b325928b1003281033j1ccaa3dend06ebbce29a13359@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <201003282229.21448.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 : version tag and handling unknown tags
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 05:29:12 -0000

On Sunday 28, Meadhbh Hamrick wrote:
> at least one person has commented privately about the need to add a
> version tag to the binary serialization. i was initially resistant,
> but now think it makes sense. the use case is we may want to have
> future versions of the binary serialization with new tags.
>
> so i propose we add this verbage to section 4.3 of the type system draft:
>
> "version - this optional tag MUST be the first tag in a serialization
> stream. it identifies the an optional version identifier, to be used
> for future extension of the binary serialization. the version tag is
> the lower case 'v' octet and is followed by a 32 bit value
> representing the version."

What would old implementations be required to do, when they receive a 
new/different version?  The only use a version tag like this would provide, 
is to mark a new incompatible binary formats.  In that case, why not just add 
the version to the MIME type "application/llsd+binary+v2".

If a version is included in the spec, then it will need to have rules on how 
to handle new versions.  Will there be a way for older implementations to ask 
the sender of a LLSD message to downgrade?

> related to the version tag is the idea of what to do with tags you
> don't understand. many tools that process XML have a "ignore but
> preserve" semantic that i think works quite well. our situation is
> mildly complicated as we don't have a way to know the length of each
> tag content defined in the future. ergo, i suggest we say that all
> future tags consist of a tag octet followed by a 32 bit network order
> unsigned integer representing the length of the tag contents in
> octets. that way, if someone has inserted an experimental tag you
> don't understand into a binary encoding, you can at least skip over
> it.

XML tools may support ignoring unknown tags, but JSON doesn't have that type 
of flexibility atleast not with how LLSD types map to JSON types.

I don't really like the idea of supporting experimental/extended/private tags.  
Since some companies will create proprietary extentions and cause divergence 
from the spec.

Also how would these experimental tags be preserved if one needs to convert 
from the binary format to JSON/XML formats?  There is already support for 
binary values in all the formats.  Wouldn't it be better to use a binary 
value instead of an unknown tag?

> so i also propose we add the following verbiage to section 4.3 of the
> type system draft:
>
> "implementers MAY choose to include experimental or private tags in a
> binary serialization. implementations that receive tags they cannot
> handle MUST preserve the tag in the serialization. to facilitate
> processing of binary serializations with unknown tags, tags not
> defined in this specification MUST be of the form: a single tag octet,
> a 32 bit network order unsigned integer representing the length of the
> tag's content, and the content."
>
> -cheers
> -meadhbh
>
> --
> meadhbh hamrick * it's pronounced "maeve"
> @OhMeadhbh * http://meadhbh.org/ * OhMeadhbh@gmail.com
> _______________________________________________
> ogpx mailing list (VWRAP working group)
> ogpx@ietf.org
> https://www.ietf.org/mailman/listinfo/ogpx



-- 
Robert G. Jakabosky