Why Range doesn't work for LDP "paging" (cf 2NN Contents-of-Related)

Sandro Hawke <sandro@w3.org> Tue, 16 September 2014 01:16 UTC

Return-Path: <ietf-http-wg-request@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 64A711A00D7 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 15 Sep 2014 18:16:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.554
X-Spam-Level:
X-Spam-Status: No, score=-8.554 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-1.652, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] 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 xTl5FxKeGNdV for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 15 Sep 2014 18:16:55 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7C3241A0099 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 15 Sep 2014 18:16:54 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1XThL1-0007am-4C for ietf-http-wg-dist@listhub.w3.org; Tue, 16 Sep 2014 01:13:47 +0000
Resent-Date: Tue, 16 Sep 2014 01:13:47 +0000
Resent-Message-Id: <E1XThL1-0007am-4C@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <sandro@w3.org>) id 1XThKT-0007QO-P2 for ietf-http-wg@listhub.w3.org; Tue, 16 Sep 2014 01:13:13 +0000
Received: from jay.w3.org ([128.30.52.169]) by lisa.w3.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from <sandro@w3.org>) id 1XThKT-0001Fz-32 for ietf-http-wg@w3.org; Tue, 16 Sep 2014 01:13:13 +0000
Received: from pool-74-104-152-28.bstnma.fios.verizon.net ([74.104.152.28] helo=[192.168.1.14]) by jay.w3.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from <sandro@w3.org>) id 1XThKS-00033V-TQ for ietf-http-wg@w3.org; Mon, 15 Sep 2014 21:13:12 -0400
Message-ID: <54178EA3.7010208@w3.org>
Date: Mon, 15 Sep 2014 21:13:07 -0400
From: Sandro Hawke <sandro@w3.org>
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.0
MIME-Version: 1.0
To: HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 7bit
X-W3C-Hub-Spam-Status: No, score=-6.3
X-W3C-Hub-Spam-Report: ALL_TRUSTED=-1, AWL=-2.722, BAYES_00=-1.9, RP_MATCHES_RCVD=-0.652
X-W3C-Scan-Sig: lisa.w3.org 1XThKT-0001Fz-32 ae417fbb11d91d901e99527688280145
X-Original-To: ietf-http-wg@w3.org
Subject: Why Range doesn't work for LDP "paging" (cf 2NN Contents-of-Related)
Archived-At: <http://www.w3.org/mid/54178EA3.7010208@w3.org>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/27098
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>

Earlier today the LDP Working Group discussed the matter of whether we 
could use range headers instead of separate page URIs.  Use of Range 
headers was suggested on this list recently.

Our conclusion was still "no", for the following reasons.  Please let us 
know if you see a good solution to any/all of them:

1.  We don't know how the server would initiate use of Range.   With our 
current separate-page design, the server can do a 303 redirect to the 
first page if it determines the representation of the entire resource is 
too big.   The question here is what to do when the client didn't 
anticipate this possibility.  True, the 303 isn't a great solution 
either, since unprepared clients might not handle it well either.   
Perhaps one should give a 4xx or 5xx when the client asks for a giant 
resource without a range header...?   But there's no "representation too 
big" code defined.

2.  We don't know how we could do safe changes.  With our current 
design, it's possible for the resource to change while paging is 
happening, and the client ends up with a representation whose inaccuracy 
is bounded by the extent of the change.  The data is thus still usually 
perfectly usable.  (If such a change is not acceptable, the client can 
of course detect the change using etags and restart.)   This bounded 
inaccuracy a simple and practical concept with RDF (in a way it isn't 
with arbitrary byte strings). Just using Range, a deletion would often 
result in data unrelated to the change being dropped from what the 
client sees.    I suppose perhaps one could use some kind of tombstones 
to avoid this problem, not closing in gaps from deletion.  Basically, a 
client might ask for triples 0-9 and only get 3 triples because the 
others were deleted?  Does that make sense with Range?   Is it okay to 
not have the elements be contiguous?

3.  Many of our usual RDF data systems don't support retrieval of ranges 
by integer sequence numbers.   While some database systems have an 
internal integer row number in every table that could be used for Range, 
many others do not, and we don't know of a straightforward and 
appropriate way to add it.

4.  Finally, there was some question as to whether the Web 
infrastructure has any useful support for non-byte ranges.   This is 
perhaps not an objection, but it came up during the discussion, and we'd 
be interested in any data people have on this.

Bottom line is we still think just using rel=first/last/next/prev, among 
distinct resources, is a pretty reasonable design.   And if we're doing 
that, it'd be nice to have 2nn Contents-of-Related.

      -- Sandro