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

Mario Loffredo <mario.loffredo@iit.cnr.it> Mon, 05 August 2019 17:29 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 0D5321202A5 for <regext@ietfa.amsl.com>; Mon, 5 Aug 2019 10:29:06 -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 pIxi_EVcxsn0 for <regext@ietfa.amsl.com>; Mon, 5 Aug 2019 10:29:03 -0700 (PDT)
Received: from smtp.iit.cnr.it (mx3.iit.cnr.it [146.48.98.150]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9974F120297 for <regext@ietf.org>; Mon, 5 Aug 2019 10:29:02 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by smtp.iit.cnr.it (Postfix) with ESMTP id 238DF60021A; Mon, 5 Aug 2019 19:28:59 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at mx3.iit.cnr.it
Received: from smtp.iit.cnr.it ([127.0.0.1]) by localhost (mx3.iit.cnr.it [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KKvdqJhHdjKG; Mon, 5 Aug 2019 19:28:55 +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 E5C21600167; Mon, 5 Aug 2019 19:28:55 +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> <f6a08fcd-a26c-9072-155f-65ff564bd8b1@iit.cnr.it> <20190805002910.GA2850@tomh-laptop>
From: Mario Loffredo <mario.loffredo@iit.cnr.it>
Message-ID: <4c8a3596-9fe7-1b45-79ae-ec4fe16b25ee@iit.cnr.it>
Date: Mon, 05 Aug 2019 19:27:47 +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: <20190805002910.GA2850@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/iNREE1Nm4by8TQhNM0F82ynVWKE>
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: Mon, 05 Aug 2019 17:29:06 -0000

Hi Tom,

thanks a lot for your feedback. Please find my comments below.

Il 05/08/2019 02:28, Tom Harrison ha scritto:
> Hi Mario,
>
> On Wed, Jul 24, 2019 at 05:32:21PM +0200, Mario Loffredo wrote:
>> Il 24/07/2019 16:28, Tom Harrison ha scritto:
>>>    - 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.
> What I mean is that the reverse search document has this concept of a
> mapping from an external model (EPP) to an internal model (jCard),
> whereas the sorting and paging document uses jCard directly as part of
> its public interface and is very explicit as to where certain values
> will appear.  The example I gave in the original email wasn't good: a
> better example is one where the server does publish the country code,
> but in a non-standard location (e.g. the "ISO-3166-1-alpha-2"
> parameter that some servers use).  This inconsistency could be
> confusing for users: with such a server, a reverse search by country
> code would work, but an attempt to sort by country code would fail
> with an error message.  I think dropping the mapping from the reverse
> search document is the simplest way to address this consistency issue,
> since it seems that the only reason to have the mapping is to deal
> with divergent approaches to country codes that came up pre-RFC 8605,
> but now that that document exists servers should be updated to be
> compliant with it.

The server is free to map the "cc" sorting property (as well as any 
other) onto any field provided in the response. The jsonPath property 
should be helpful in that sense.

If the server will map the "cc" sorting property onto a non-standard 
location, the server will sort the results according to the value of 
that location.

In the case of your example, the jsonPath value will be 
"$.entitySearchResults[*].vcardArray[1][?(@[0]="ISO-3166-1-alpha-2")][3]"

Maybe, I need to clarifiy better this concept in the sorting-and-paging 
draft.

The only error the client can obtain is when it requests for an 
unsupported sorting property which means that either it doesn't appear 
in the sorting_metadata field and it doesn't correspond to the current sort.

The search model defined in the reverse-search draft follows the same 
concept. The basic idea is letting the RDAP provider to map a field of 
the reverse search pattern to whatever it sees fit in order to avoid the 
lost of relevant results.

The following is a clarifying example.

The RDAP response doesn't contain the "cc" parameter as described in 
RFC8605 but only the country name as defined in RFC6350. The server will 
allow the reverse search based on "cc" because it will be able to 
trasform the country code into the country name and will allow to sort 
on the "country" property as defined in the sorting-and-paging draft.

No relevant results will be lost and no sorting error will be possible.

>> 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.
> I think it would be better to limit reverse search to single
> attributes and leave AND-joined predicates for later.
ok. Let's wait a while for other possible opinions.
>
>>>    - 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.
> But IP addresses are represented as JSON strings, so this won't work
> for them.  It may be that IP addresses would be the only exception to
> a prospective 'JSON strings are sorted lexicographically, JSON numbers
> are sorted numerically' rule, but it still seems like something worth
> documenting.

I agree with you that treating ips as numbers instead of strings would 
result in a much more efficient sorting policy but, honestly, I have 
never explored this possibility by using the traditional DBMS operators 
so I can't evaluate the effort required to implement it. I know there 
are some experiences available on the web but I would like to make some 
tests and then give you my opinion as soon as possible.

Best,

mario

>
> -Tom

-- 
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