Re: [weirds] Response container structure

Andy Newton <andy@arin.net> Mon, 17 September 2012 14:30 UTC

Return-Path: <andy@arin.net>
X-Original-To: weirds@ietfa.amsl.com
Delivered-To: weirds@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A65A421F867A for <weirds@ietfa.amsl.com>; Mon, 17 Sep 2012 07:30:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.504
X-Spam-Level:
X-Spam-Status: No, score=-2.504 tagged_above=-999 required=5 tests=[AWL=0.095, BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id l0hqC7tEnbhk for <weirds@ietfa.amsl.com>; Mon, 17 Sep 2012 07:30:43 -0700 (PDT)
Received: from smtp2.arin.net (smtp2.arin.net [IPv6:2001:500:4:13::32]) by ietfa.amsl.com (Postfix) with ESMTP id 9FBB121F8678 for <weirds@ietf.org>; Mon, 17 Sep 2012 07:30:42 -0700 (PDT)
Received: by smtp2.arin.net (Postfix, from userid 323) id 0E389213675; Mon, 17 Sep 2012 10:30:42 -0400 (EDT)
Received: from CHAXCH05.corp.arin.net (chaxch05.corp.arin.net [192.149.252.94]) by smtp2.arin.net (Postfix) with ESMTP id 0EBD321361C; Mon, 17 Sep 2012 10:30:41 -0400 (EDT)
Received: from CHAXCH04.corp.arin.net (10.1.30.19) by CHAXCH05.corp.arin.net (192.149.252.94) with Microsoft SMTP Server (TLS) id 14.2.283.3; Mon, 17 Sep 2012 10:30:35 -0400
Received: from CHAXCH02.corp.arin.net ([169.254.2.100]) by CHAXCH04.corp.arin.net ([10.1.30.19]) with mapi id 14.02.0298.004; Mon, 17 Sep 2012 10:30:40 -0400
From: Andy Newton <andy@arin.net>
To: Byron Ellacott <bje@apnic.net>, Francisco Obispo <fobispo@isc.org>
Thread-Topic: [weirds] Response container structure
Thread-Index: AQHNlKOEMgx/JUEDdU6jax6CGftCgZeOmLwA
Date: Mon, 17 Sep 2012 14:30:40 +0000
Message-ID: <CC7CA5AB.D09D%andy@arin.net>
In-Reply-To: <F7EE26B7-6BFD-4CB9-92EE-9CD09C4FB478@apnic.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/14.2.3.120616
x-originating-ip: [10.1.1.56]
Content-Type: text/plain; charset="Windows-1252"
Content-ID: <66023E4887534D4EA580C12D2A68C5E2@corp.arin.net>
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Cc: "weirds@ietf.org" <weirds@ietf.org>
Subject: Re: [weirds] Response container structure
X-BeenThere: weirds@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: "WHOIS-based Extensible Internet Registration Data Service \(WEIRDS\)" <weirds.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/weirds>, <mailto:weirds-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/weirds>
List-Post: <mailto:weirds@ietf.org>
List-Help: <mailto:weirds-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/weirds>, <mailto:weirds-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 17 Sep 2012 14:30:43 -0000

On 9/17/12 3:10 AM, "Byron Ellacott" <bje@apnic.net> wrote:

>Hi Francisco,
>
>On 17/09/2012, at 3:49 PM, Francisco Obispo wrote:
>
>> Most JSON parsers that I've used load the whole document in memory, so
>>you would have to have a lot of memory available to process a COM
>>response. :-S
>
>I would hope that looking  up the entire list of registrations underneath
>.COM. is NOT a necessary step in looking up the registration data for
>EXAMPLE.COM. :-)


Well, there are stream parsers available for JSON. The idea that you can
only do this with XML is bunk. And there is so much more wrong with that
pattern than the need for a stream/event parser.

>
>> There are several advantages of this:
>> 
>> 1) If someone stores the file, it can easily identify it;
>
>Still true;


Indeed. This argument keeps getting made as if Section 9 of Using-HTTP
didn't exist. 
(http://tools.ietf.org/html/draft-designteam-weirds-using-http-01#section-9
).

>
>> 2) Objects have a "namespace" associated with it, which allows clients
>>to quickly identify the type of object thus be able to process it
>>accordingly (knowing exactly which fields to fetch and how to present
>>them).
>
>Still true; the current unified response draft doesn't include the type
>of the top level response object, which I think is a weakness we can
>correct, but the type of subsequent objects can be easily inferred by its
>position in the response document.  I note your example assumes that
>something contained in $response_json->{additional}->{contacts} is, in
>fact, a contact, too. :-)


Adding an "objectClass" member to the top level object is superfluous.
Certainly if the top level object has the members "startAddress" and
"endAddress", software confusing it for a name server object is poorly
written. But I'm willing to add this if we can finally quit arguing this
topic.

>
>> 3) If the "returnAll" flag is turned "on", (which should be definable
>>by registry policy), the response will also contain an "additional"
>>section with the additional "objects" identifying the query.
>
>Expand or do not expand the sub-objects; interesting potential discussion
>over a "returnAll" flag to have, I don't feel strongly either way, though
>it would be perhaps polite to make the reference a URI instead of an
>opaque string, if you're not going to include the actual data.

It is unnecessary complexity. We do this in the ARIN RESTful Whois service
and people get confused by it and generally hate it. Once they figure it
out, the set returnAll to true for everything.

>
>> 5) There is coherence with EPP with the ability to support registry
>>objects in general, so a group of people could work on the various
>>objects for their own types of registries: names, and numbers working
>>independently but agreeing on common object types: contacts, hosts
>
>Still true;


Agreed, and to expand further on this point: The EPP model is actually
different than the one being described here. In the EPP model, every
difference of a contact, name server, domain, etcŠ is a new object class
(that is if LunarNIC wants to add custom data to the contact class, they
override completely the standard contact class). In the EPP world, making
sure the client and server have a perfect understanding is essential
because money is changing hands, it is a read/write protocol, there is a
contractual relationship between the actors, and set of actors is limited
to a smaller community. None of that is true for WEIRDS. Requiring a
generic WEIRDS client to know a specialized object class for any registry
that simply wants to add one bit of custom data is to high a bar for the
purposes we need.


>I will freely admit that I prefer nested for no particular technical
>reason.  It "feels" like a flat model exposes an implementation specific
>abstraction of data, while a nested model "feels" like it talks about the
>registration information as a cohesive whole as seen from that
>perspective, but these are clearly not technical justifications, they are
>aesthetic.
>
>Are there technical justifications either way that I'm missing?


Actually, yes there is a very good technical reason. Not all registries
wish to model all data as first class objects. This is the cause of the
issue of name servers being attributes on domains vs being first class
objects. See section 4 of Unified Response
(http://tools.ietf.org/html/draft-designteam-weirds-using-http-01#section-9
). I also see that we will have this issue with entities.

-andy