[ogpx] content negotiation for LLSD over HTTP connections
Infinity Linden <infinity@lindenlab.com> Fri, 26 June 2009 23:47 UTC
Return-Path: <infinity@lindenlab.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 F2B123A6B07 for <ogpx@core3.amsl.com>;
Fri, 26 Jun 2009 16:47:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.665
X-Spam-Level:
X-Spam-Status: No, score=-1.665 tagged_above=-999 required=5 tests=[AWL=0.312,
BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
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 SMjwRS9vjwJu for
<ogpx@core3.amsl.com>; Fri, 26 Jun 2009 16:47:49 -0700 (PDT)
Received: from an-out-0708.google.com (an-out-0708.google.com
[209.85.132.251]) by core3.amsl.com (Postfix) with ESMTP id 0824D3A6A09 for
<ogpx@ietf.org>; Fri, 26 Jun 2009 16:47:48 -0700 (PDT)
Received: by an-out-0708.google.com with SMTP id c37so928318anc.4 for
<ogpx@ietf.org>; Fri, 26 Jun 2009 16:48:01 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.100.107.8 with SMTP id f8mr5436100anc.197.1246060081117;
Fri, 26 Jun 2009 16:48:01 -0700 (PDT)
Date: Fri, 26 Jun 2009 16:48:00 -0700
Message-ID: <3a880e2c0906261648k1a14024cudd4cbccb57d8753f@mail.gmail.com>
From: Infinity Linden <infinity@lindenlab.com>
To: ogpx@ietf.org
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Subject: [ogpx] content negotiation for LLSD over HTTP connections
X-BeenThere: ogpx@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Virtual Worlds and the Open Grid Protocol <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: Fri, 26 Jun 2009 23:47:50 -0000
so... we have three serialization formats for LLSD messages over HTTP:
XML, JSON and Binary. each has it's own uses and constituency.
but it _does_ leave implementers and deployers with questions like:
* must i support each and every LLSD defined serialization?
* under what circumstances should i choose one over the other?
* what if i am a server and i only want to use one serialization?
* what if i am a client and i only want to use one serialization?
i have some opinions (of course). but i wanted to ask implementer's
opinions on these questions... so here's a starting point for
discussion...
THE BACKSTORY
way back in the day, some people noticed SL's proto-LLSD "annotation
format" looked an aweful lot like JSON. users with a copy of ethereal
/ wireshark could see lotsa XML flying around too. so when public
discussions of OGP came along, people naturally thought that LLSD
SHOULD be serialized using JSON ("cause... you know.. like the whole
web is movign to JSON, dude.") well... except those people who thought
it should be serialized using XML, since XML was the king of all
structured information interchange formats. and then there were the
people who said, "oh noes! you have to use a binary format to get
efficiency!"
all these different stakeholders have valid points. and that's part of
why we have LLSD as an abstract type system with three defined
serializations today.
THE MORE RECENT BACKSTORY
then last year when we started the interop work, software engineers
had to code message parsers and the like. for the most part, we
ignored JSON and binary serializations and focused on XML. but.. we
know we can't do that moving forward.
THE PROBLEM
what we only started handling last year was addressing the questions
above: should my service support ALL serializations? what do i do if i
get a serialization i don't like? or can't understand?
THE SOLUTION (we wanted to implement last year but didn't have time for)
inspired by the words "an implementation should be conservative in its
sending behavior, and liberal in its receiving behavior," [RFC760] we
figured a generally available service SHOULD accept messages
serialized with all three defined serializations (XML, JSON & Binary,)
but SHOULD probably try to send things using one serialization.
we're using the word "SHOULD" here in case you're building a service
where you control both the producer and consumer of a service and only
want to support one serialization (maybe you have a super-fancy
hardware XML parser and you choke when you get JSON or something.) i
think there's general agreement that we don't want to force deployers
/ implementers in these situations to use a serialization that will be
difficult for them.
and maybe you're a developer building a new client, and you were able
to get the JSON library to build on your system, but expat remains
unavailable. we don't want to force you to support XML in this case.
but... in all these cases there are probably very good ideas to
support the other serializations, but we're going to let you analyze
the trade-offs.
so... back to the questions above... should a well defined service
accept requests using all three LLSD serializations? i vote "yes." it
is in keeping with internet tradition and a generally good idea. when
a client uses HTTP to transport an OGP message from client to server
via PUT or POST, it may include a Content-Type: header to tell the
server about the serialization it is using. if the client wants a
response using a particular serialization, it can use the Accept:
header.
so.. question... what should happen if the server doesn't want to use
the serialization(s) specified in the Accept: header? or the client
identifies a serialization the server just doesn't understand? Maybe a
406 or 415 response?
anyway. this is just an initial post to get the discussion started.
if you have any opinions one way or another, please voice them here.
-cheers
-meadhbh
- [ogpx] content negotiation for LLSD over HTTP con… Infinity Linden
- Re: [ogpx] content negotiation for LLSD over HTTP… Hurliman, John
- Re: [ogpx] content negotiation for LLSD over HTTP… Infinity Linden
- Re: [ogpx] content negotiation for LLSD over HTTP… Carlo Wood
- Re: [ogpx] content negotiation for LLSD over HTTP… Carlo Wood
- Re: [ogpx] content negotiation for LLSD over HTTP… Carlo Wood
- Re: [ogpx] content negotiation for LLSD over HTTP… Joshua Bell
- Re: [ogpx] content negotiation for LLSD over HTTP… Carlo Wood