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

peter van der Stok <stokcons@xs4all.nl> Fri, 08 September 2017 09:46 UTC

Return-Path: <stokcons@xs4all.nl>
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 DE5F6132ECF; Fri, 8 Sep 2017 02:46:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.621
X-Spam-Level:
X-Spam-Status: No, score=-2.621 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-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 mHwG_Q6hYkMo; Fri, 8 Sep 2017 02:46:52 -0700 (PDT)
Received: from lb3-smtp-cloud8.xs4all.net (lb3-smtp-cloud8.xs4all.net [194.109.24.29]) (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 183FD132403; Fri, 8 Sep 2017 02:46:51 -0700 (PDT)
Received: from webmail.xs4all.nl ([IPv6:2001:888:0:22:194:109:20:208]) by smtp-cloud8.xs4all.net with ESMTPA id qFs9d3vrycQyLqFs9deqhX; Fri, 08 Sep 2017 11:46:49 +0200
Received: from 83-161-167-172.mobile.xs4all.nl ([83.161.167.172]) by webmail.xs4all.nl with HTTP (HTTP/1.1 POST); Fri, 08 Sep 2017 11:46:49 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset="US-ASCII"; format="flowed"
Content-Transfer-Encoding: 7bit
Date: Fri, 08 Sep 2017 11:46:49 +0200
From: peter van der Stok <stokcons@xs4all.nl>
To: Michael Koster <michaeljohnkoster@gmail.com>
Cc: consultancy@vanderstok.org, Jim Schaad <ietf@augustcellars.com>, draft-ietf-core-resource-directory@ietf.org, core@ietf.org
Organization: vanderstok consultancy
Reply-To: consultancy@vanderstok.org
Mail-Reply-To: consultancy@vanderstok.org
In-Reply-To: <E68E238C-C8A2-4EA7-88F3-D5D617FD52D0@gmail.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>
Message-ID: <ea2b59ca2e7b7bb30b88dfda2422b926@xs4all.nl>
X-Sender: stokcons@xs4all.nl
User-Agent: XS4ALL Webmail
X-CMAE-Envelope: MS4wfBXatO8KXtok/s3wxkeGYthBNIF9bsc+BR0OHDp3EDg2s4Yau2NzlgLVXJKZ9mYhtOi2VOLcSoO6HR39Bl0Nmx6kuXJwNTNvVARHv1vxCisnh05gif97 dJI591zXCdpK0V0uYn3wpRBLchMoC2G1ez0bK/nWUTdXEy6NPBi9gyzJ2+HLjfb2IoSPfrpN03tTVVk+Y5/U7O2c+mPbspV1YXSjOgO4VNmY1H1A/Dn4SaCR DzK2CgynzpH0jwdT2YzzMOs33b10xfcOiJjgS3LnuOnOAibxhCfnHjEdtGPnAAGW
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/k4X9vDqohT-o5EOux4BxjlHpL1Y>
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: Fri, 08 Sep 2017 09:46:54 -0000

HI Michael,

For me it looks OK. A few reflections:
It must be clear in accompanying text, that "href" refers to the 
registration and "con" to the links of the registration. And 
core-rd.endpoint needs to be explained in text, and registered in core 
registry. Further, "ct" is an attribute of the links in all RD examples 
and not of the registration.

Cheerio,
Peter

Michael Koster schreef op 2017-09-08 10:08:
> Hi Peter,
> 
> In your example, "loc" I presume is "location" which is how this is
> returned in the response header when the registration resource is
> created.
> 
> In my example, I propose a hyperlink to a resource, so "href" is the
> usual key for this in a link JSON.
> 
> I also propose to include all of the link attributes including rt and
> ct, so the client knows what it is without needing to infer anything.
> 
> So your example would look like this:
> 
> [
>   {
>     "href" : "/rd/541",
>     "con": "coap://[fdfd::12]:17072",
>     "ep": "example-endpoint-name",
>     "et": "ocf-device",
>     "rt": "core.rd-endpoint",
>     "ct": 40,
>     "lt": 600,
>     "d": "floor-3"
>   }
> ]
> 
>> On Sep 8, 2017, at 12:25 AM, peter van der Stok <stokcons@xs4all.nl>
>> wrote:
>> 
>> Hi Michael,
>> 
>> I would have expected:
>> 
>> [
>> {
>> "con": "coap://[fdfd::12]:17072",
>> "loc" : "/rd/541",
>> "ep": "example-endpoint-name",
>> "et": "ocf-device",
>> "lt": 600,
>> "d": "floor-3"
>> }
>> ]
>> 
>> and may be only ep and loc attributes;
>> With this information the rest of the link information can be
>> inferred.
>> 
>> cheerio,
>> 
>> Peter
>> 
>> Michael Koster schreef op 2017-09-05 20:37:
>> Hi Peter,
>> The representation on slide 4 is not a complete dump, but exactly
>> what
>> you say; it's the locations and the registration parameters, exposed
>> as link target attributes.
>> The example has one "self" link for the RD itself, and one link for
>> each registration resource (only one is shown).
>> [
>> {
>> "href": "/registration/",
>> "rel": "self",
>> "rt": "core.rd",
>> "ct": 40
>> },
>> {
>> "href": "/registration/f3cca57e/",
>> "con": "coap://[fdfd::12]:17072"
>> "rt": "core.rd-endpoint",
>> "ct": 40,
>> "ep": "example-endpoint-name",
>> "et": "ocf-device",
>> "lt": 600,
>> "d": "floor-3"
>> }
>> ]
>> On Sep 4, 2017, at 11:37 PM, peter van der Stok <stokcons@xs4all.nl>
>> wrote:
>> Hi Michael,
>> Originally, I thought the same, but the packets get really large by
>> doing a complete dump.
>> The compromise is just sending the (endpoint names/ registration
>> resource location) with its registration attributes.
>> Peter
>> Michael Koster schreef op 2017-09-05 08:27:
>> I would propose returning links for all registration resources in
>> the
>> RD as shown in slide 4 of the attached deck (JSON format shown).
>> This
>> would include the most recent setting of the "lt" or lifetime
>> parameter as a link target attribute as shown.
>> On Sep 4, 2017, at 8:27 AM, Jim Schaad <ietf@augustcellars.com>
>> wrote:
>> Yes that is what I had in mind.  It would be useful to add a ttl
>> attribute
>> as well.
>> Jim
>> -----Original Message-----
>> From: peter van der Stok [mailto:stokcons@xs4all.nl]
>> Sent: Monday, September 4, 2017 1:46 AM
>> To: Jim Schaad <ietf@augustcellars.com>
>> Cc: draft-ietf-core-resource-directory@ietf.org; core@ietf.org
>> Subject: Re: draft-ietf-core-resource-directory = GET /rd
>> Hi Jim,
>> Personally, I like the idea.
>> That would mean that all registration resources are returned.
>> In the next version of the RD, location or endpoint identifies the
>> registration.
>> Uniqueness of links is specified in section 5.3.4, already commented
>> on by
>> you.
>> Your request means returning all locations with the ep, lt, d, and
>> et
>> attributes
>> and the associated scheme://authority:port value.
>> Correct?
>> Peter
>> Jim Schaad schreef op 2017-08-31 03:59:
>> I am wondering if there should be a GET action defined against the
>> resource directory object.  Currently, if an entity does a
>> registration for an endpoint it gets back a location for that
>> registration.  If a second entity modifies the endpoint and wants to
>> update the registration, it currently has no method to get the
>> location associated with the endpoint and cannot make a second new
>> registration since the <domain, endpoint> pair is required to be
>> unique.
>> Thus
>> Interaction: EP -> RD
>> Method: GET
>> URI Template: {+rd}{?ep,d}
>> Content-Format: application/link-format (or variants)
>> <rd/0099>;ep=endpoint1,<rd/0098>;ep=endpoint1;domain=beta, ...
>> Jim
>> _______________________________________________
>> core mailing list
>> core@ietf.org
>> https://www.ietf.org/mailman/listinfo/core