Re: [regext] Fwd: I-D Action: draft-ietf-regext-rdap-sorting-and-paging-03.txt

Mario Loffredo <mario.loffredo@iit.cnr.it> Wed, 24 July 2019 15:33 UTC

Return-Path: <mario.loffredo@iit.cnr.it>
X-Original-To: regext@ietfa.amsl.com
Delivered-To: regext@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 725D2120436 for <regext@ietfa.amsl.com>; Wed, 24 Jul 2019 08:33:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.199
X-Spam-Level:
X-Spam-Status: No, score=-4.199 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] 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 FQPmGV4AqjhJ for <regext@ietfa.amsl.com>; Wed, 24 Jul 2019 08:33:29 -0700 (PDT)
Received: from smtp.iit.cnr.it (mx4.iit.cnr.it [146.48.98.151]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 62E81120341 for <regext@ietf.org>; Wed, 24 Jul 2019 08:33:29 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by smtp.iit.cnr.it (Postfix) with ESMTP id 90383B802CF; Wed, 24 Jul 2019 17:33:27 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at mx4.iit.cnr.it
Received: from smtp.iit.cnr.it ([127.0.0.1]) by localhost (mx4.iit.cnr.it [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Po8gsXO596ho; Wed, 24 Jul 2019 17:33:24 +0200 (CEST)
Received: from [192.12.193.108] (pc-loffredo.nic.it [192.12.193.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.iit.cnr.it (Postfix) with ESMTPSA id 10103B80496; Wed, 24 Jul 2019 17:33:24 +0200 (CEST)
To: Tom Harrison <tomh@apnic.net>
Cc: "regext@ietf.org" <regext@ietf.org>
References: <156033453086.2525.2797876035414669264@ietfa.amsl.com> <bdf1732e-ada8-94a1-d6bf-ee924862aa8d@iit.cnr.it> <20190724142838.GA14229@tomh-laptop>
From: Mario Loffredo <mario.loffredo@iit.cnr.it>
Message-ID: <f6a08fcd-a26c-9072-155f-65ff564bd8b1@iit.cnr.it>
Date: Wed, 24 Jul 2019 17:32:21 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0
MIME-Version: 1.0
In-Reply-To: <20190724142838.GA14229@tomh-laptop>
Content-Type: text/plain; charset="iso-8859-15"; format="flowed"
Content-Transfer-Encoding: 7bit
Content-Language: it
Archived-At: <https://mailarchive.ietf.org/arch/msg/regext/H4v_L9uZH9J3mDItdUxmFnFwVSw>
Subject: Re: [regext] Fwd: I-D Action: draft-ietf-regext-rdap-sorting-and-paging-03.txt
X-BeenThere: regext@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Registration Protocols Extensions <regext.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/regext>, <mailto:regext-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/regext/>
List-Post: <mailto:regext@ietf.org>
List-Help: <mailto:regext-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/regext>, <mailto:regext-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 24 Jul 2019 15:33:36 -0000

Hi Tom,

thank you for the feedbacks. My comments are below.

Best,

mario

Il 24/07/2019 16:28, Tom Harrison ha scritto:
> Hi Mario,
>
> On Wed, Jun 12, 2019 at 12:20:40PM +0200, Mario Loffredo wrote:
>> in this new version "cc" has been added to the list of sorting properties
>> and RFC8605 has been added to the Normative References.
> Thanks for putting this together.  Some comments/feedback:
>
>   - Is there a need to be prescriptive about the 'cursor' parameter?
>     The draft could simply have text along the lines of "a server that
>     implements paging will include at least a 'next' link for fetching
>     the next page, and optionally 'first'/'prev'/'last' links for
>     accessing other pages in the set of search results".  That way, a
>     server can use whatever suits it best, whether that be limit/offset
>     parameters or a more generic cursor parameter (or something else).
Yes, it's true and it is the reason why the cursor value has been 
modelled as an opaque string. A server can implement pagination as it 
sees fit.

However, offset and keyset are currently the most popular pagination 
methods. In addition, as I have outlined in the "Implementation 
Consideration" section, they don't require the server to handle the 
result set in a storage area across the requests . For such reasons, the 
draft mentions them as probable backend methods.

I will furtherly clarify the concept that the implementation of the 
cursor parameter is not limited to the use of those methods.

>   - This draft takes a different approach to country/cc values than
>     that taken by the reverse search draft.  Why are these values
>     treated separately here?  Should servers that don't currently use the
>     'cc' parameter, but which do have country name values in their
>     jCards, be prevented from sorting based on the country name if a
>     client requests that sorting be done by cc?

It's not clear to me what you mean when you say the two approaches are 
different. In the reverse search poposal, "cc" is an an address property 
and can be used individually or together with another address property 
to submit a reverse query based on an address rather then on a single 
property each time. I'm not sure this is the right approach. I mean, is 
it better to allow a reverse search based on the entire address or on 
one of its properties and leave AND joined predicates to a future 
capability? This is a question I'm going to make to the WG tomorrow.

In the sorting-and-paging draft, "cc" can be a sorting property like 
some other properties. It can be used joined with other sorting 
properties to compose a complex sort criterion.

I think it isn't a good idea to let a server to sort the results based 
on the country name when the client requests for a sort based on cc. In 
the "Negative Answer" section it is stated that the server SHOULD return 
an error in that case.

>   - I think it would be useful to document explicitly what happens when
>     sorting is carried out on a field for which a record can have
>     multiple values.  For example, with jCard properties, the draft
>     currently has text about using the value that is most preferred
>     (per the 'pref' parameter), but there could be instances of
>     multiple values for a property where no 'pref' parameter has been
>     set.  This may be as simple as saying "the server will sort based
>     on the first value for a given field that appears in the object".

I agree. I have already planned to update the draft in that sense. I was 
waiting for more feedbacks coming from tomorrow's meeting. In fact, I'm 
going to talk about the SORT-AS parameter as well.

If the server returns more values for a field and the pref parameter is 
missing, the first value must be taken by the server as the basis to 
sort the results.

>   - Along similar lines, I think it would be useful to go into more
>     detail about the exact logic for sorting.  For example, clients
>     will typically want IP addresses to be sorted based on their
>     numeric value, rather than on their string value, but the current
>     text isn't prescriptive about this.
Good quaestion. I think the sort ordering should be consistent with the 
field JSON type. If the field is a JSON string, the lexicographic 
ordering should go. If the field is a JSON number, the numeric ordering 
should go.
>   - The ABNF for 'cursor' is:
>
>      "cursor=" ( ALPHA / DIGIT / "/" / "=" / "-" / "_" )
>
>     which appears to limit it to a single character.  It looks like it
>     should instead be:
>
>      "cursor=" 1*( ALPHA / DIGIT / "/" / "=" / "-" / "_" )
Right. It is a typo.
>   - I don't understand the text in section 2.4 about the problems with
>     cursor pagination.  What is a "key field" in "it needs at least one
>     key field"?  Also, what is a "key" in "it does not allow to sort
>     just by any field because the sorting criterion must contain a
>     key"?

In that sentence, "cursor" means "keyset". To avoid ambiguities, I will 
change the term "cursor" with the term "keyset". Keyset pagination needs 
a key field to work properly.

>
> -Tom
>
> _______________________________________________
> regext mailing list
> regext@ietf.org
> https://www.ietf.org/mailman/listinfo/regext

-- 
Dr. Mario Loffredo
Servizi Internet e Sviluppo Tecnologico
CNR - Istituto di Informatica e Telematica
via G. Moruzzi 1, I-56124 PISA, Italy
E-Mail: mario.loffredo@iit.cnr.it
Phone: +39.0503153497
Web: http://www.iit.cnr.it/mario.loffredo