Re: Proposed HTTP SEARCH method update

"henry.story@bblfish.net" <henry.story@bblfish.net> Sun, 26 April 2015 10:57 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 16F781A92DC for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 26 Apr 2015 03:57:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.912
X-Spam-Level:
X-Spam-Status: No, score=-6.912 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, 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 VyQP552aeEd5 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 26 Apr 2015 03:57:42 -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 A10B91A9252 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sun, 26 Apr 2015 03:57:42 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1YmKBg-00053y-Pc for ietf-http-wg-dist@listhub.w3.org; Sun, 26 Apr 2015 10:53:24 +0000
Resent-Date: Sun, 26 Apr 2015 10:53:24 +0000
Resent-Message-Id: <E1YmKBg-00053y-Pc@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.80) (envelope-from <henry.story@bblfish.net>) id 1YmKBb-000533-Lb for ietf-http-wg@listhub.w3.org; Sun, 26 Apr 2015 10:53:19 +0000
Received: from mail-wg0-f48.google.com ([74.125.82.48]) by maggie.w3.org with esmtps (TLS1.2:RSA_ARCFOUR_SHA1:128) (Exim 4.80) (envelope-from <henry.story@bblfish.net>) id 1YmKBa-00087e-AK for ietf-http-wg@w3.org; Sun, 26 Apr 2015 10:53:19 +0000
Received: by wgen6 with SMTP id n6so89561059wge.3 for <ietf-http-wg@w3.org>; Sun, 26 Apr 2015 03:52:51 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=AoRgS5DZy1XLlxlQ1Hbw4CGYofc92sOEHcvXYjqwyJ8=; b=h7XTF3D7/Jh5NjMDEhEB0ozZY2eYNaIbSuxk2m05dCyAcheDbw4N0EoSsABPkV3C90 Sjg7UZ3mqrWalN8LBkLzyvc1IlkJsXITHV/O6HIe83sMYgtNrAbgbmCCgL3WWn0fF52v FB7icKT6hgaOcBL5Il3MCWMDG8kR+9g5HWiVazluaS/CE+5zVC0MoBPifyPblHl/uTdK QAW03m6x+89MRgiGnYfbEgzsjfOLeCpV0ToRTYeo9FvxY1b/qzsmJHzqf92tzXFLB7ys WEQxkzkZzVeZXtVmnxa58n5h4nvVqjik6mSM1A1QW+uNPrri6C4VeQpZiHbwDCDgx5Xa RdcQ==
X-Gm-Message-State: ALoCoQnqhF8gymrPWp2HVsicBUM8dxyxGv0gNn3biMQzkUpdj/JYrTPGGlMOA7z67TaW4fMJ/MQ0
X-Received: by 10.180.78.65 with SMTP id z1mr11922660wiw.14.1430045571545; Sun, 26 Apr 2015 03:52:51 -0700 (PDT)
Received: from ?IPv6:2a01:e34:ec28:72a0:ac78:8a9c:642a:e768? ([2a01:e34:ec28:72a0:ac78:8a9c:642a:e768]) by mx.google.com with ESMTPSA id o6sm6843070wiz.24.2015.04.26.03.52.50 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 26 Apr 2015 03:52:50 -0700 (PDT)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\))
From: "henry.story@bblfish.net" <henry.story@bblfish.net>
In-Reply-To: <553CAD43.4000202@gmx.de>
Date: Sun, 26 Apr 2015 12:52:49 +0200
Cc: Mark Nottingham <mnot@mnot.net>, James M Snell <jasnell@gmail.com>, ashok malhotra <ashok.malhotra@oracle.com>, ietf-http-wg@w3.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <30026A40-487C-42AD-BB61-442C7228EFB4@bblfish.net>
References: <DEEC7135-C5AD-402C-B592-D9F735242C4A@bblfish.net> <5532C62B.3080108@oracle.com> <ABC8CB5C-0152-4CDD-ABA4-08878162B2E0@bblfish.net> <CABP7Rbf2sNq+HUTG1V769SGUN5SxvKMHi9VS2K3B-kZGDLcQPA@mail.gmail.com> <BA9C8760-E9D2-4139-ACD3-14B47106671A@mnot.net> <B2A55DFD-7847-461E-ADCB-7272B63E19B8@bblfish.net> <248DAEB5-D983-47A3-AB10-1393B4991868@mnot.net> <38B851F8-F102-40D1-927E-56698BC605E0@bblfish.net> <3C5DD81E-2D57-4DDD-860D-7B81C2DA7084@mnot.net> <E7294216-06F9-433C-8258-DDE11AD0A988@bblfish.net> <553CAD43.4000202@gmx.de>
To: Julian Reschke <julian.reschke@gmx.de>
X-Mailer: Apple Mail (2.2098)
Received-SPF: none client-ip=74.125.82.48; envelope-from=henry.story@bblfish.net; helo=mail-wg0-f48.google.com
X-W3C-Hub-Spam-Status: No, score=-6.1
X-W3C-Hub-Spam-Report: AWL=-0.429, RCVD_IN_DNSWL_LOW=-0.7, W3C_IRA=-1, W3C_IRR=-3, W3C_WL=-1
X-W3C-Scan-Sig: maggie.w3.org 1YmKBa-00087e-AK 5c3faf70c6ee6e2a9300f53d879ab666
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Proposed HTTP SEARCH method update
Archived-At: <http://www.w3.org/mid/30026A40-487C-42AD-BB61-442C7228EFB4@bblfish.net>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/29390
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>

> On 26 Apr 2015, at 11:17, Julian Reschke <julian.reschke@gmx.de> wrote:
> 
> On 2015-04-26 07:40, henry.story@bblfish.net wrote:
>> ...
>> Great!  We are getting closer to the core of the problem, which I had tried to address earlier :-)
>> 
>> I agree that HTTP caching should operate upon representations of resource state. My point it that SEARCH always returns a partial representation of the resource state, so that it should be cachable too. This means
>> improving the caching stack so that it knows how to update partial representations.
> 
> And you seriously believe that people are going to upgrade their caching stack specifically for SEARCH?

I suppose you are talking about more difficult to change caching stacks like those deployed by ISPs or even countries. ( In 1994 I remember the UK had a country wide cache to help us get pages from the  USA faster ). Those caches will presumably only change when the need for it is strong enough. Luckily they don't have to change those services until they feel like it. 

What will happen immediatley though is that people like me and others on this list, will write  local JS caches for data using any of the numerous storage mechanisms available in browsers.  We will also write servers that can implement SEARCH for local and remotely proxied resources, as I have partly done here in Scala here

  https://github.com/read-write-web/rww-play/wiki/Curl-Interactions#sparql-queries

Some people may wish to implement SEARCH for XML query languages, other for CSV formats, others for JSON, etc. I'll be doing something for JSON-LD.

But we might as well write the spec for SEARCH in such a way that when the market grows enough that the large infrastructure companies will want to buy new enhanced proxies tuned for the languages that are most used ( probably nothing to do with what I am doing ) to improve the service for their customers, that these can then together with the stacks the initial group has deployed to satisfy their more limited needs.

> 
>> To illustrate the different cases, let us take the example from http://datatracker.ietf.org/doc/draft-snell-search-method/ . The resource <http://example.org/contacts> is a small table of contacts.
>> Let us imagine that
>> 
>> A. GET followed by SEARCH
>> -------------------------
>> 
>> 1. James makes a GET request on <http://example.org/contacts> via a cache C and C caches the returned  representation with etag1 ( and the same Location header )
>> 2. Ashok then makes a conditional SEARCH request on <http://example.org/contacts> via the same cache C with etag1 too
>> 
>> I think it is important that SEARCH guarantee the following:
>> 
>> it should not be necessary for the cache C to send the search request all the way back to the server example.org if it knows the query lanuage used in the SEARCH request, because it should be able to answer that
>> itself using the information from the GET in 1. above.
> 
> That not only implies that caches special-case the SEARCH method, but also know the semantics of SEARCH payloads.

yes, and I am just building a client Scala-JS store and a server Scala store to do that for a couple of query formats, under the Apache licence. 

> 
>> ...
> 
> 
> I'd prefer to concentrate on the concrete method definition first.
> 
> As Mark said, once you leave the world of GET and HEAD, standard caches won't help you anymore.

Yes, but I am not relying on standard caches. I am writing in-browser and server caches myself. The server caches are needed anyway because of the limitations of CORS.

> 
> Of course a server can indicate that a specific SEARCH response is indeed cacheable (cache-control!), but it's unlikely that generic caches will start to implement that.
> 
> If what's needed is a mechanism to discover GETtable resources that implement a specific query, something like <https://greenbytes.de/tech/webdav/draft-reschke-http-get-location-latest.html> might be needed.

It is important for me that the query be made directly on the resource, and that it be clear to the intermediate caches that the results are partial views on that resource, so that the intelligent cache can built these partial views together into ever more complete ones.

> 
> Best regards, Julian

Social Web Architect
http://bblfish.net/