Re: NEW PREFERENCE - return=query-result

Ning Dong <ning.dong@oracle.com> Sat, 03 October 2015 05:39 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C9CA41ACCF4 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 2 Oct 2015 22:39:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.312
X-Spam-Level:
X-Spam-Status: No, score=-6.312 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, J_CHICKENPOX_45=0.6, RCVD_IN_DNSWL_HI=-5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KDAQ0M6wD6Vc for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 2 Oct 2015 22:38:59 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C0B8B1A90DB for <httpbisa-archive-bis2Juki@lists.ietf.org>; Fri, 2 Oct 2015 22:38:59 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1ZiFTM-0008WM-Uu for ietf-http-wg-dist@listhub.w3.org; Sat, 03 Oct 2015 05:35:04 +0000
Resent-Message-Id: <E1ZiFTM-0008WM-Uu@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <ylafon@w3.org>) id 1ZiFTI-0007CM-UV for ietf-http-wg@listhub.w3.org; Sat, 03 Oct 2015 05:35:00 +0000
Received: from raoul.w3.org ([128.30.52.128]) by maggie.w3.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <ylafon@w3.org>) id 1ZiFTH-0000ix-Rt for ietf-http-wg@w3.org; Sat, 03 Oct 2015 05:35:00 +0000
Received: from homard.platy.net ([80.67.176.7] helo=[192.168.1.37]) by raoul.w3.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from <ylafon@w3.org>) id 1ZiFTH-0007EW-2a for ietf-http-wg@w3.org; Sat, 03 Oct 2015 05:34:59 +0000
Mime-Version: 1.0 (Mac OS X Mail 9.0 \(3094\))
Content-Type: text/plain; charset="us-ascii"
To: James M Snell <jasnell@gmail.com>, Matthew Kerwin <matthew@kerwin.net.au>, "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
From: Ning Dong <ning.dong@oracle.com>
In-Reply-To: <CABP7RbfQyqdak+rkosLqPup=DxtiWd3GFoc4jSqMdZVwP9DX2w@mail.gmail.com>
Resent-From: Yves Lafon <ylafon@w3.org>
Date: Fri, 02 Oct 2015 21:05:01 +0000
Cc: Phil Hunt <phil.hunt@oracle.com>
Content-Transfer-Encoding: quoted-printable
Resent-Date: Sat, 03 Oct 2015 07:34:57 +0200
Message-Id: <560EF14B.9050606@oracle.com>
X-Name-Md5: efe3dad792d606410c9cc49cedaffc94
References: <55F1FAB3.2050808@oracle.com> <44321676-D9B4-484C-A490-F5FFCE071D26@oracle.com> <CABP7RbcMTDEM6VOT7ydBTvbH0B6eTYWqVbeV6qcj-KSh7ertLw@mail.gmail.com> <383F7C4D-A006-420B-9504-FD343996ED95@oracle.com> <CACweHNAk-_EfScpgRigTL4pE5BhTrpN=5m1_DZpdR=NSAJy94A@mail.gmail.com> <1206D3FD-4221-4FFC-AD97-BE4B92E749DF@oracle.com> <55F36031.2050602@oracle.com> <CACweHNC85_-QVpqEKWUoyq-n5neAXMqkyxD3dFCjLCAXPKDZ8Q@mail.gmail.com> <55F70AEC.7010708@oracle.com> <CABP7RbfQyqdak+rkosLqPup=DxtiWd3GFoc4jSqMdZVwP9DX2w@mail.gmail.com>
Resent-To: ietf-http-wg@w3.org
X-Mailer: Apple Mail (2.3094)
X-W3C-Hub-Spam-Status: No, score=-4.7
X-W3C-Hub-Spam-Report: ALL_TRUSTED=-1, AWL=-2.251, BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01, W3C_NW=0.5
X-W3C-Scan-Sig: maggie.w3.org 1ZiFTH-0000ix-Rt eddb9eb51891e4ee01dda46fe0f07b69
X-Original-To: ietf-http-wg@w3.org
Subject: Re: NEW PREFERENCE - return=query-result
Archived-At: <http://www.w3.org/mid/560EF14B.9050606@oracle.com>
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/30317
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

Hi,
   Is there more information that I should provide to get the proposed preference added?

   Besides sending email to this mailing list, do I need to do something else?


   Thanks.

Ning

On 9/14/2015 11:01 AM, James M Snell wrote:
> The "transient" preference looks just fine to me.
> 
> On Mon, Sep 14, 2015 at 10:59 AM, Ning Dong <ning.dong@oracle.com> wrote:
>> Matt,
>>     Thanks for the comments.
>> 
>>     The proposed "transient" preference is a preference in the sense that
>> the server still can ignore it. In that case, the server would just create
>> the query definition. The client side will do the following:
>>     1. POST /searches (with body=query definition)
>>         Server returns something like:
>>         201 CREATED
>>         Location: /searches/foobar
>>     2. GET /searches/foobar/result
>>         to get the query executed and return the query result
>>     3. DELETE /searches/foobar
>>         A responsible client needs to delete the resource since it won't be
>> used any more.
>> 
>>     I agree that the "transient" preference alters the server behavior. I
>> think any preference header alters the server behavior in some way but I
>> think your concern is that this alters the most basic behavior of the server
>> (the basic part is creating the resource).
>> 
>>     We have been exploring different options of supporting the adhoc query
>> in a "standard" way. We could do the 3 steps way, but it is a lot of
>> overhead.
>>     We could enhance out specific media type and include "transient"
>> information inside the query definition itself in the payload. It works only
>> for our query definitions and won't work for other media types.
>>     (If we had SEARCH verb, it would solve our problem, but it has not been
>> approved yet.)
>> 
>>     I have been thinking whether this can be make more generic and applied
>> to broader scope instead of this narrow use case. Yes it is kind of related
>> to caching. Following that line of thought, would it make sense to do
>> something like?
>>     Prefer: time-to-live=0
>>     or
>>     Prefer: time-to-live=short (we can have other values like medium, long)
>> 
>>     BTW, this is the first time for me to send a request and discuss
>> something in this mailing list. Please let me know if there is a better
>> communication channel so that I don't pollute everybody's mailbox.
>> 
>>     Thanks a lot.
>> 
>> Ning
>> 
>> 
>> On 9/11/2015 8:06 PM, Matthew Kerwin wrote:
>> 
>> 
>> On 12/09/2015 9:14 AM, "Ning Dong" <ning.dong@oracle.com> wrote:
>>> I submitted two requests, and both of them are related to search. If we
>>> have the SEARCH verb, then we don't have this problem.
>>> 
>>> For the case where client wants to execute an ad hoc query against a
>>> collection, [...]
>>> We don't want to save the query definition though since it won't be
>>> useful. We really just want the server to use the query definition in the
>>> payload, execute query and return the result.
>>> 
>>> A second use case is a query definition might be reused later, but we want
>>> the query to be executed when the query definition resource is created to
>>> save a server round trip. That is the return=query-result proposal. This use
>>> case is achievable with two requests: one to create the query definition
>>> resource, and another to execute the query.
>>> 
>>> Thanks.
>>> 
>>> Ning
>>> 
>> The problem I'm having is that you're mixing things up strangely. The
>> endpoint definition seems to be: POST here to store a procedure. On top of
>> that you layer a preference for "also execute it and return the result." Ok,
>> I can understand that, and maybe 'query-result' is different enough from
>> 'representation' to make sense.
>> But with 'transient' you seem to instead be saying: the endpoint definition
>> is to store a query, and immediately execute it and return the result. On
>> top of that you're layering a preference to not store the query? It seems
>> quite convoluted, or at least not well engineered, and smells a bit like
>> server-side caching of requests.
>> If I'm reading it wrong, and it's actually the *same* endpoint (i.e. store
>> the query, and maybe return an immediate result) then 'transient' isn't a
>> preference, it's an instruction to alter the base behaviour of the endpoint
>> -- an instruction which should be signalled, not with a preference, but with
>> a mechanism like those I mentioned earlier.
>> Cheers
>> 
>>