Re: [core] draft-ietf-core-resource-directory = GET /rd

Christian Amsüss <chrysn@fsfe.org> Thu, 21 September 2017 13:05 UTC

Return-Path: <chrysn@fsfe.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 8D67813420E; Thu, 21 Sep 2017 06:05:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] 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 Avdi6XwEgIj9; Thu, 21 Sep 2017 06:05:21 -0700 (PDT)
Received: from prometheus.amsuess.com (alt.prometheus.amsuess.com [IPv6:2a01:4f8:190:3064::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 152141342E7; Thu, 21 Sep 2017 06:05:20 -0700 (PDT)
Received: from poseidon-mailhub.amsuess.com (unknown [IPv6:2a02:b18:c13b:8010:a800:ff:fede:b1bd]) by prometheus.amsuess.com (Postfix) with ESMTPS id F111A4111E; Thu, 21 Sep 2017 15:05:16 +0200 (CEST)
Received: from poseidon-mailbox.amsuess.com (poseidon-mailbox.amsuess.com [10.13.13.231]) by poseidon-mailhub.amsuess.com (Postfix) with ESMTP id 475754F; Thu, 21 Sep 2017 15:05:16 +0200 (CEST)
Received: from hephaistos.amsuess.com (hermes.amsuess.com [10.13.13.254]) by poseidon-mailbox.amsuess.com (Postfix) with ESMTPSA id 0838242; Thu, 21 Sep 2017 15:05:16 +0200 (CEST)
Received: (nullmailer pid 30463 invoked by uid 1000); Thu, 21 Sep 2017 13:05:15 -0000
Date: Thu, 21 Sep 2017 15:05:15 +0200
From: Christian Amsüss <chrysn@fsfe.org>
To: Issue 37 <reply+0006bfd615bece50f2846264d57670fd50e46c94062cbaf792cf0000000115d9f7ca92a169ce0f718c39@reply.github.com>, "draft-ietf-core-resource-directory@ietf.org" <draft-ietf-core-resource-directory@ietf.org>
Cc: core@ietf.org
Message-ID: <20170921130514.om56u42zcycacckx@hephaistos.amsuess.com>
References: <016801d321fc$d2820d50$778627f0$@augustcellars.com> <d13595304f595fcd98257ae58483b9aa@xs4all.nl> <000401d32592$4349a870$c9dcf950$@augustcellars.com> <9D9B829F-3B73-44FE-92A2-C2B4435934E9@gmail.com> <fdec10f06405169090028a4181accb2f@xs4all.nl> <537223E3-E2DB-4505-9E22-5829BD441DDD@gmail.com> <aabc7218c1991acc7926e558e7d4f920@xs4all.nl> <E68E238C-C8A2-4EA7-88F3-D5D617FD52D0@gmail.com> <ea2b59ca2e7b7bb30b88dfda2422b926@xs4all.nl> <64ECEBB9-06D5-4A88-A89D-622B4DFB6D54@gmail.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="sfs365bgict7mdhn"
Content-Disposition: inline
In-Reply-To: <64ECEBB9-06D5-4A88-A89D-622B4DFB6D54@gmail.com>
User-Agent: NeoMutt/20170609 (1.8.3)
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/2PlRcWlQpFTUDJ1ICWvqXpzlhCU>
Subject: Re: [core] draft-ietf-core-resource-directory = GET /rd
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.22
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: Thu, 21 Sep 2017 13:05:26 -0000

Hello Jim, Peter and Michael,

sorry for being late to the party.

On Fri, Sep 08, 2017 at 06:58:27AM -0700, Michael Koster wrote:
> So "con" refers to the registration resource, and reflects the "con"
> parameter that was supplied during registration.

What is being proposed here looks an awful lot like the endpoint lookup
with slightly different data. To compare, the latest example from this
thread was (in RFC9960 link-format):

GET /registration/?ep=example-endpoint-name

</rd/541>;con="coap://[rdrd::12]:17072";ep=example-endpoint-name;
  et=ocf-device;rt=core-rd.endpoint;ct=40;lt=600;d=floor-3

while for such a registration, the existing lookup would be

GET /rd-lookup/ep?ep=example-endpoint-name

<coap://[rdrd::12]:17072>;ep=example-endpoint-name;
  et=ocf-device;d=floor-3


From a pure data point of view (disregarding the semantics), all that is
shown (and can be queried) from the existing lookup interface is a
subset of the proposed registrations interface.

From the semantic point of view, the former has the advantage of having
an accurate rel (the implied `hosts`, in that the resource directory
hosts the registration resource). Moreover, the target attributes are
clearer: "endpoint type" and "d" do kind of relate to the base address,
but `<coap://[rdrd::12]:17072>;ep=example-endpoint-name` is a statement
about a resource too, and that is (contrary to what we say in the
principles) not backed by the origin.

The former form is also more painless to extend to alternative
transports (protocol-negotiation could add more than one con= without it
becoming a second-class citizen, which all those would be with the
latter).


As we're reworking the lookup interface anyway, can we just use the
former representations in the endpoint lookup? It'd keep the
registration and lookup interfaces neatly separated as they are, be more
precise about target attributes and more discoverable in a hypertext
sense.

Best regards
Christian

-- 
I shouldn't have written all those tank programs.
  -- Kevin Flynn