Subject: [core] I-D Action: draft-ietf-core-resource-directory-03.txt

From: [email-masked]
Date: Mon, 22 Jun 2015 00:35:52 -0700

A New Internet-Draft is available from the on-line Internet-Drafts directories.
 This draft is a work item of the Constrained RESTful Environments Working Group of the IETF.

        Title           : CoRE Resource Directory
        Authors         : Zach Shelby
                          Michael Koster
                          Carsten Bormann
                          Peter van der Stok
	Filename        : draft-ietf-core-resource-directory-03.txt
	Pages           : 49
	Date            : 2015-06-22

Abstract:
   In many M2M applications, direct discovery of resources is not
   practical due to sleeping nodes, disperse networks, or networks where
   multicast traffic is inefficient.  These problems can be solved by
   employing an entity called a Resource Directory (RD), which hosts
   descriptions of resources held on other servers, allowing lookups to
   be performed for those resources.  This document specifies the web
   interfaces that a Resource Directory supports in order for web
   servers to discover the RD and to register, maintain, lookup and
   remove resources descriptions.  Furthermore, new link attributes
   useful in conjunction with an RD are defined.

The IETF datatracker status page for this draft is:
https://datatracker.ietf.org/doc/draft-ietf-core-resource-directory/

There's also a htmlized version available at:
https://tools.ietf.org/html/draft-ietf-core-resource-directory-03

A diff from the previous version is available at:
https://www.ietf.org/rfcdiff?url2=draft-ietf-core-resource-directory-03

Please note that it may take a couple of minutes from the time of submission
until the htmlized version and diff are available at tools.ietf.org.

Internet-Drafts are also available by anonymous FTP at:
ftp://ftp.ietf.org/internet-drafts/

---

From: Christian Amsüss <[email-masked]>
Date: Tue, 23 Jun 2015 21:41:24 +0200

Hello resource-directory authors,

>  This draft is a work item of the Constrained RESTful Environments Working Group of the IETF.

I've gone through the updated version, and found some issues that could
be fixed easily in the next update:

In Section 9.6, ins="Spot" vs. ins="FrontSpot" is mixed; the DNS export
later uses Spot. The looked up link format resource indicates that CoAP
listens on port 61616 on fdfd::1234, but the SRV record shows port 5678.

Section 5.2 states that `con` is an argument at registration time, and
is of `scheme://host:port` form. The example in 12.1.2, where the CT
registers with the RD, uses it as a link format parameter, and in the
form of a bare IP address. As I understand the rest of the document, the
example should instead read:

> Req: POST
>     coap://[FDFD::ABCD:0]/rd?ep=lm_R2-4-015_wndw&con=coap://[FDFD::ABCD:1]
>    Payload:
>    </light/left>;rt="light";
>      d="R2-4-015"; ins="lamp4444"; exp,
>    </light/middle>;rt="light";
>      d="R2-4-015"; ins="lamp5555"; exp,
>    </light/right>;rt="light";
>      d="R2-4-015"; ins="lamp6666"; exp

Later in 12.1.2, the POST to the newly created light/grp1 batches miss
the angular brackets around the light resources.

The con=bare-ip shows again in the POST /rd-group example still in the
same section, but I don't understand that example well enough to offer a
fix.

In section 12.1.3., the same UDP ports 5678 as in 9.6 show up in the SRV
records.

I've prepared a patch to draft-ietf-core-resource-directory-xx.mkd (see
attachment), in case you agree with my suggested solutions.

Best regards
Christian Amsüss

-- 
Christian Amsüss                      | Energy Harvesting Solutions GmbH
founder, system architect             | headquarter:
mailto:[email-masked]  | Arbeitergasse 15, A-4400 Steyr
tel:+43-664-97-90-6-39                | http://www.energyharvesting.at/
                                      | ATU68476614
From e9193d4db09db5089fdeea358e38ab1be20a7a9e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20Ams=C3=BCss?= <[email-masked]>
Date: Tue, 23 Jun 2015 21:37:16 +0200
Subject: [PATCH] Bugfixes for RD (link parameters, DNS ports)

---
 draft-ietf-core-resource-directory-xx.mkd | 37 +++++++++++++------------------
 1 file changed, 15 insertions(+), 22 deletions(-)

diff --git a/draft-ietf-core-resource-directory-xx.mkd b/draft-ietf-core-resource-directory-xx.mkd
index fe26f13..ed3b155 100644
--- a/draft-ietf-core-resource-directory-xx.mkd
+++ b/draft-ietf-core-resource-directory-xx.mkd
@@ -1445,7 +1445,7 @@ exported:
       |                                                             |
       |                                                             |
       | <-- 2.05 Content "<coap://[FDFD::1234]:61616/light/1>;exp;  |
-      |                   rt="dali.light";ins="FrontSpot"           |
+      |                   rt="dali.light";ins="Spot";               |
       |                   d="office";ep="node1"                     |
       |                                                             |
 ~~~~
@@ -1473,7 +1473,7 @@ _dali._udp.office.example.com      IN PTR
                           Spot._dali._udp.office.example.com
 light._sub._dali._udp.example.com  IN PTR
                           Spot._dali._udp.office.example.com
-Spot._dali._udp.office.example.com IN SRV  0 0 5678
+Spot._dali._udp.office.example.com IN SRV  0 0 61616
                           node1.office.example.com.
 Spot._dali._udp.office.example.com IN TXT
                           txtver=1;path=/light/1
@@ -1689,16 +1689,13 @@ using the Context parameter (con) to specify the interface address:
 
 ~~~~
 Req: POST
- coap://[FDFD::ABCD:0]/rd?ep=lm_R2-4-015_wndw
+ coap://[FDFD::ABCD:0]/rd?ep=lm_R2-4-015_wndw&con=coap://[FDFD::ABCD:1]
 Payload:
 </light/left>;rt="light";
-  con="FDFD::ABCD:1";
   d="R2-4-015"; ins="lamp4444"; exp,
 </light/middle>;rt="light";
-  con="FDFD::ABCD:1";
   d="R2-4-015"; ins="lamp5555"; exp,
 </light/right>;rt="light";
-  con="FDFD::ABCD:1";
   d="R2-4-015"; ins="lamp6666"; exp
 
 Res: 2.01 Created
@@ -1708,16 +1705,13 @@ Location: /rd/4521

 ~~~~
-Req: POST coap://[FDFD::ABCD:0]/rd?ep=lm_R2-4-015_door
+Req: POST coap://[FDFD::ABCD:0]/rd?ep=lm_R2-4-015_door&con=coap://[FDFD::ABCD:2]
 Payload:
 </light/left>;rt="light";
-  con="FDFD::ABCD:2";
   d="R2-4-015"; ins="lamp1111"; exp,
 </light/middle>;rt="light";
-  con="FDFD::ABCD:2";
   d="R2-4-015"; ins="lamp2222"; exp,
 </light/right>;rt="light";
-  con="FDFD::ABCD:2";
   d="R2-4-015"; ins="lamp3333"; exp
 
 Res: 2.01 Created
@@ -1727,10 +1721,9 @@ Location: /rd/4522

 ~~~~
-Req: POST coap://[FDFD::ABCD:0]/rd?ep=ps_R2-4-015_door
+Req: POST coap://[FDFD::ABCD:0]/rd?ep=ps_R2-4-015_door&con=coap://[FDFD::ABCD:3]
 Payload:
 </ps>;rt="p-sensor";
-  con="FDFD::ABCD:3";
   d="R2-4-015"; ins="pres1234"; exp
 
 Res: 2.01 Created
@@ -1754,13 +1747,13 @@ below, two endpoints are updated with an additional resource using the path
 ~~~~
 Req: POST
  coap://[FDFD::ABCD:1]/light/grp1
- (content-type:application/link-format)light/middle, light/left
+ (content-type:application/link-format)<light/middle>, <light/left>
 
 Res: 2.04 Changed
 
 Req: POST
  coap://[FDFD::ABCD:2]/light/grp1
-(content-type:application/link-format)light/right
+(content-type:application/link-format)<light/right>
 
 Res: 2.04 Changed
 ~~~~
@@ -1876,31 +1869,31 @@ _light._udp.bc.example.com              IN PTR
                            lamp6666._light._udp.bc.example.com
 _p-sensor._udp.bc.example.com           IN PTR
                        pres12324._p-sensor._udp.bc.example.com
-lamp1111._light._udp.bc.example.com     IN SRV  0 0 5678
+lamp1111._light._udp.bc.example.com     IN SRV  0 0 5683
                               lm_R2-4-015_door.bc.example.com.
 lamp1111._light._udp.bc.example.com     IN TXT
                                      txtver=1;path=/light/left
-lamp2222._light._udp.bc.example.com     IN SRV  0 0 5678
+lamp2222._light._udp.bc.example.com     IN SRV  0 0 5683
                               lm_R2-4-015_door.bc.example.com.
 lamp2222._light._udp.bc.example.com     IN TXT
                                    txtver=1;path=/light/middle
-lamp3333._light._udp.bc.example.com     IN SRV  0 0 5678
+lamp3333._light._udp.bc.example.com     IN SRV  0 0 5683
                               lm_R2-4-015_door.bc.example.com.
 lamp3333._light._udp.bc.example.com     IN TXT
                                     txtver=1;path=/light/right
-lamp4444._light._udp.bc.example.com     IN SRV  0 0 5678
+lamp4444._light._udp.bc.example.com     IN SRV  0 0 5683
                               lm_R2-4-015_wndw.bc.example.com.
 lamp4444._light._udp.bc.example.com     IN TXT
                                      txtver=1;path=/light/left
-lamp5555._light._udp.bc.example.com     IN SRV  0 0 5678
+lamp5555._light._udp.bc.example.com     IN SRV  0 0 5683
                               lm_R2-4-015_wndw.bc.example.com.
 lamp5555._light._udp.bc.example.com     IN TXT
                                    txtver=1;path=/light/middle
-lamp6666._light._udp.bc.example.com     IN SRV  0 0 5678
+lamp6666._light._udp.bc.example.com     IN SRV  0 0 5683
                               lm_R2-4-015_wndw.bc.example.com.
 lamp6666._light._udp.bc.example.com     IN TXT
                                     txtver=1;path=/light/right
-pres1234._p-sensor._udp.bc.example.com  IN SRV  0 0 5678
+pres1234._p-sensor._udp.bc.example.com  IN SRV  0 0 5683
                               ps_R2-4-015_door.bc.example.com.
 pres1234._p-sensor._udp.bc.example.com  IN TXT
                                              txtver=1;path=/ps
@@ -1958,7 +1951,7 @@ DNS.
 grp_R2-4-015.bc.example.com.        IN AAAA            FF05::1
 _group._udp.bc.example.com          IN PTR
                             grp1234._group._udp.bc.example.com
-grp1234._group._udp.bc.example.com  IN SRV  0 0 5678
+grp1234._group._udp.bc.example.com  IN SRV  0 0 5683
                              grp_R2-4-015_door.bc.example.com.
 grp1234._group._udp.bc.example.com  IN TXT
                                      txtver=1;path=/light/grp1
-- 
2.1.4

---

From: Carsten Bormann <[email-masked]>
Date: Tue, 23 Jun 2015 22:36:07 +0200

Good evening Christian,

thank you for your attention to detail!

I have merged these changes to the SVN; they will be in -04.
(Preview at:
https://svn.tools.ietf.org/svn/wg/core/draft-ietf-core-resource-directory-xx.txt
.)
Thank you for making it so easy to merge these changes.

While merging, I found a few more gratuitous spaces in the link-format
documents and fixed them as well.

Next step: Adding some automatic validation of the examples...

Grüße, Carsten

Christian Amsüss wrote:
> _______________________________________________
> core mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/core

---

From: peter van der Stok <[email-masked]>
Date: Wed, 24 Jun 2015 11:19:02 +0200

Hi Christian,

thanks for pointing this out.
see below

> listens on port 61616 on fdfd::1234, but the SRV record shows port 
<peter>
FrontSpot was too long, so I want to use Spot.
5678 is easier to use than 61616
</peter>
>>      d="R2-4-015"; ins="lamp6666"; exp

<peter>
absolutely, I got carried away on my own fancies.
</peter>
> same section, but I don't understand that example well enough to offer 
<peter>
you mean that con argument should read like con=coap://[FF05::1]
</peter>
> In section 12.1.3., the same UDP ports 5678 as in 9.6 show up in the 
<peter>
That is the one intended.
</peter>
> attachment), in case you agree with my suggested solutions.

Many thanks,

Peter