[core] Resource Directory: Pagination (?page/?count)

Carsten Bormann <cabo@tzi.org> Wed, 09 January 2019 15:12 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 78A1912870E for <core@ietfa.amsl.com>; Wed, 9 Jan 2019 07:12:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.3
X-Spam-Level:
X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=ham autolearn_force=no
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 FQjqP7NXf89d for <core@ietfa.amsl.com>; Wed, 9 Jan 2019 07:12:42 -0800 (PST)
Received: from mailhost.informatik.uni-bremen.de (mailhost.informatik.uni-bremen.de [IPv6:2001:638:708:30c9::12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4F85312867A for <core@ietf.org>; Wed, 9 Jan 2019 07:12:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at informatik.uni-bremen.de
Received: from submithost.informatik.uni-bremen.de (submithost2.informatik.uni-bremen.de [134.102.200.7]) by mailhost.informatik.uni-bremen.de (8.14.5/8.14.5) with ESMTP id x09FCOQQ007102 for <core@ietf.org>; Wed, 9 Jan 2019 16:12:37 +0100 (CET)
Received: from [192.168.217.116] (p54A6C3F1.dip0.t-ipconnect.de [84.166.195.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by submithost.informatik.uni-bremen.de (Postfix) with ESMTPSA id 43ZXfw5T06z1Br6; Wed, 9 Jan 2019 16:12:24 +0100 (CET)
From: Carsten Bormann <cabo@tzi.org>
Content-Type: text/plain; charset="utf-8"
X-Mao-Original-Outgoing-Id: 568739542.427524-c0b90db252a141372d6c8540a29d2d0b
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
Date: Wed, 09 Jan 2019 16:12:23 +0100
Message-Id: <BE614EC4-3AC3-4A32-9FAC-684B6A26C7C6@tzi.org>
To: "core@ietf.org WG" <core@ietf.org>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/XD67uszbTNIu3Wpy59VQ5DbarAI>
Subject: [core] Resource Directory: Pagination (?page/?count)
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 09 Jan 2019 15:12:43 -0000

During a recent discussion of the specification and of implementation efforts for the CoRE resource directory, the question came up whether there really is a good reason to have the pagination mechanism described in:

https://core-wg.github.io/resource-directory/draft-ietf-core-resource-directory.html#rfc.section.6.2.p.2

This provides query parameters to the lookup interface, where a “count” query parameter can be given that limits the number of items returned (returning a “page” of items), and a “page” query parameter to skip a number of pages.

Christian noticed that the implementation of this was pretty much equivalent in implementation effort to simply supporting the block-wise transfer mechanism (RFC 7959).
(There is a small difference in that a block-wise transfer skips forwards in units of bytes in the representation, while page/count can skip forward in items, which is closer to the application.  E.g., it might be possible to implement page/count just with SQL parameters, while block-wise is most efficient with a result cache and cursors.)

What do other implementers think?  Any SDOs that already have adopted page/count for RD?

Grüße, Carsten