Re: [vwrap] Notes ... 9) query arguments to LLIDL
Mark Lentczner <markl@lindenlab.com> Thu, 01 April 2010 22:20 UTC
Return-Path: <markl@lindenlab.com>
X-Original-To: vwrap@core3.amsl.com
Delivered-To: vwrap@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix)
with ESMTP id 5DDB23A68B8 for <vwrap@core3.amsl.com>;
Thu, 1 Apr 2010 15:20:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.083
X-Spam-Level: *
X-Spam-Status: No, score=1.083 tagged_above=-999 required=5 tests=[AWL=-0.416,
BAYES_50=0.001, DNS_FROM_OPENWHOIS=1.13, URI_HEX=0.368]
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 whnB5bNNL6Td for
<vwrap@core3.amsl.com>; Thu, 1 Apr 2010 15:20:05 -0700 (PDT)
Received: from mail-yw0-f200.google.com (mail-yw0-f200.google.com
[209.85.211.200]) by core3.amsl.com (Postfix) with ESMTP id 487E93A68AA for
<vwrap@ietf.org>; Thu, 1 Apr 2010 15:20:05 -0700 (PDT)
Received: by ywh38 with SMTP id 38so1118700ywh.29 for <vwrap@ietf.org>;
Thu, 01 Apr 2010 15:20:34 -0700 (PDT)
Received: by 10.101.2.18 with SMTP id e18mr1245944ani.193.1270160434297;
Thu, 01 Apr 2010 15:20:34 -0700 (PDT)
Received: from nil.lindenlab.com ([38.99.52.137]) by mx.google.com with ESMTPS
id 39sm2014689yxd.6.2010.04.01.15.20.33 (version=TLSv1/SSLv3 cipher=RC4-MD5);
Thu, 01 Apr 2010 15:20:33 -0700 (PDT)
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0 (Apple Message framework v1078)
From: Mark Lentczner <markl@lindenlab.com>
In-Reply-To: <4BAA59BB.90300@gmail.com>
Date: Thu, 1 Apr 2010 15:20:30 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <0B2F17AC-9A1B-4D29-B57B-496CC3CD2F0E@lindenlab.com>
References: <180093C2-AC6E-435B-8AD5-A58B81CCD9FB@lindenlab.com>
<4BAA59BB.90300@gmail.com>
To: vwrap <vwrap@ietf.org>
X-Mailer: Apple Mail (2.1078)
Subject: Re: [vwrap] Notes ... 9) query arguments to LLIDL
X-BeenThere: vwrap@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Virtual World Region Agent Protocol - IETF working group
<vwrap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/vwrap>,
<mailto:vwrap-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/vwrap>
List-Post: <mailto:vwrap@ietf.org>
List-Help: <mailto:vwrap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/vwrap>,
<mailto:vwrap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 01 Apr 2010 22:20:06 -0000
Mark Lentczner wrote: > **9) No one had concerns or issues with the addition of query arguments to LLIDL... On Mar 24, 2010, at 11:28 AM, Dzonatas Sol wrote: > Just to clarify from IETF session chat to make sure we are on the same page: > > This is an acceptable standard query: /Resource/Path/<uuid> > This is not standard, but an acceptable customization: /Resource/Path/<uuid>?encode=text&format=json I don't have the context of the chat session, but, no, this doesn't speak to what I was getting at. Let me see if I can clarify: The VWRAP foundation doesn't ever look at the form of URLs used to access resources. They are either "well known" (as in published), or received in response to a seed-capability request. In all cases, the entity using such a URL to access a resource never looks at the structure of the URL (except to perhaps verify that it doesn't resolve to localhost.) Any of these URLs would be acceptable: http://example.com/Resource/Path/f5771b22-239d-4497-9575-55494863c1ac http://example.com/f5771b22-239d-4497-9575-55494863c1ac?r=resource/path http://example.com/YWdlbnQ9OTkmb3A9cHJvZmlsZSZkZXRhaWw9Mw== http://path.resource.example.com/f5771b22-239d-4497-9575-55494863c1ac http://f5771b22-239d-4497-9575-55494863c1ac.example.com/resource-path In other words, the provider of the resource is free to choose ANY scheme they like for associating URLs and resources. This is one of the essential tenets of the REST thesis. > We shouldn't expect the customization to be supported across the board on all implementations. Instead, from feedback and various reads, we should make use of the Content-Type: field where possible instead of path arguments. > > For example: Content-Type: text/json > Or: Content-Type: application/xml+llsd Correct. The second example URL you gave is clearly wrong in intent: The format negotiation is intended to be handled in the transport layer, not at the resource layer. When the transport is HTTP, HTTP has a well defined and widely implemented content negotiation system and that should be the sole method of content selection. > Other operation arguments are probably best found in the body of the query rather than the header. > Please clarify further is this what was not intended. The LLIDL addition of support for query arguments enables a declaration of a resource that tells the client of that resource that some (or all) of the data supplied with the invocation should be added to the otherwise opaque URL for a resource. Without this addition, all client supplied data with a request would have to be in the request body. Consider: %% thing/description << { name: string, id: uuid, mod_time: date, thing/comments: uri } %% thing/comments ?? { from: int, to: int } << [ { n: int, when: date, who: uuid, text: string }, ... ] The intent of this interface is that the client should take the URI returned for thing/comments in response to invoking a thing/description URL, and then append the desired range of comments to that URI. So, for example, imagine the client has a URL for a given thing/description: http://example.com/gizmo-1231415144592/desc It invokes that and gets back (in JSON): { "name": "Widget", "id": "f5771b22-239d-4497-9575-55494863c1ac", "mod_time": "2001-04-01T23:03:00Z", "thing/comments": "http://comments.example.com/gizmo-1231415144592" } To get comments 1 through 25, it would then construct and invoke this URL: http://comments.example.com/gizmo-1231415144592?from=1&to=25 Nothing in VWRAP currently uses this style, and judging from past discussion there are many who would strongly discourage using it. Defining how to add the query args is tricky, full of corner cases, and would be a fair bit of work, especially if the base URI already has query args! That said, backends seem to often use this style of URL, in part because it enables caching based on some of the client's arguments. Because there was desire to use a single IDL language for specifying REST like interfaces, we implemented the '??' feature of LLIDL here at Linden Lab. It was my point that I think VWRAP implementors will find this feature generally useful, even if not used directly by the standards, for the same reasons as we did. Lastly, I was asking if implementors felt a similar need for being able to define client supplied arguments that go into the path of a URL. Inside of Linden Lab there is some desire for this, though less so than the query argument declaration. Further, it is also less clear just how much expressive power is needed for path arguments. - Mark Mark Lentczner Sr. Systems Architect Technology Integration Linden Lab markl@lindenlab.com Zero Linden zero.linden@secondlife.com
- Re: [vwrap] [ogpx] Notes from my parts of the VWR… Mark Lentczner
- Re: [vwrap] [ogpx] Notes from my parts of the VWR… David W Levine
- Re: [vwrap] Notes ... 9) query arguments to LLIDL Mark Lentczner
- Re: [vwrap] Notes ... 6) LLIDL "event-like" resou… Mark Lentczner