Hauke Petersen
2017-08-04 15:21:45 UTC
Dear all,
Pekka Nikander and I implemented (parts of) draft-ietf-core-resource-directory-11 during a hackathon in Dagstuhl [1] last week. We implemented both an RD server for node.js [2], including an integration to Node RED [3], as well as an RD client integrated into RIOT [4,5]. While doing this, we came across some points in the draft that were not quite clear to us and which could potentially be clarified. Sorry if these are duplicates, but I could not find anything on the mailing list archive about these points.
Simple registration (Sections 5.3.1/5.3.2):
-------------------------------------------
1. How should a node (RD client) update its entries when using the simple registration sequence, as described in 5.3.2? We assumed that the node simply repeats the sequence, as described in that section, but the draft could be more precise on that matter.
2. Is it correct that a node using the simple registration is not able to delete its RD entries actively? So, is the only choice to simply not update its entries and wait for expiration of the defined lifetime? Or is the idea that the node registers with lt=60 (the minimum) and then waits for 60 seconds?
3. How should the RD respond, if the payload of the initial POST request is not empty? Apparently there was in an earlier draft also the possibility that the POST request could contain the resources, but that was removed. However, the current draft does not define how the RD should respond in the case there is any content.
4. Examples in Section 5.3.2: both `Req:` line comments seem wrong: shouldn't be the initial
POST coap://rd.example.com/.well-known/core?lt=6000;ep=node1
be marked as like `from EP to [ff02::1] (RD server)` and the second
GET coap://[ff02::1]/.well-known/core
request be something like `from RD server to EP (unicast)`?
Registration Update (Section 5.4.1):
------------------------------------
5. Should the registration update PUT instead of POST? That is, upon normal registration the RD responds with a new link to the initial POST with 2.01 Created and a Location (Section 5.3). Then the update updates the data at the location. Should that be a PUT instead of POST, as it does not create a new URL? If it indeed shall be a POST, then the draft should have some rationale for why.
For some discussion on similar matters, see e.g. [6].
Best,
Hauke
[1]https://www.dagstuhl.de/en/program/calendar/evhp/?semnr=17303
[2]https://github.com/Ell-i/coap-rd
[3]https://github.com/Ell-i/node-red-contrib-coap-rd
[4]https://github.com/RIOT-OS/RIOT/pull/7406
[5]https://github.com/RIOT-OS/RIOT/pull/7428
[6]https://stackoverflow.com/questions/630453/put-vs-post-in-rest
Pekka Nikander and I implemented (parts of) draft-ietf-core-resource-directory-11 during a hackathon in Dagstuhl [1] last week. We implemented both an RD server for node.js [2], including an integration to Node RED [3], as well as an RD client integrated into RIOT [4,5]. While doing this, we came across some points in the draft that were not quite clear to us and which could potentially be clarified. Sorry if these are duplicates, but I could not find anything on the mailing list archive about these points.
Simple registration (Sections 5.3.1/5.3.2):
-------------------------------------------
1. How should a node (RD client) update its entries when using the simple registration sequence, as described in 5.3.2? We assumed that the node simply repeats the sequence, as described in that section, but the draft could be more precise on that matter.
2. Is it correct that a node using the simple registration is not able to delete its RD entries actively? So, is the only choice to simply not update its entries and wait for expiration of the defined lifetime? Or is the idea that the node registers with lt=60 (the minimum) and then waits for 60 seconds?
3. How should the RD respond, if the payload of the initial POST request is not empty? Apparently there was in an earlier draft also the possibility that the POST request could contain the resources, but that was removed. However, the current draft does not define how the RD should respond in the case there is any content.
4. Examples in Section 5.3.2: both `Req:` line comments seem wrong: shouldn't be the initial
POST coap://rd.example.com/.well-known/core?lt=6000;ep=node1
be marked as like `from EP to [ff02::1] (RD server)` and the second
GET coap://[ff02::1]/.well-known/core
request be something like `from RD server to EP (unicast)`?
Registration Update (Section 5.4.1):
------------------------------------
5. Should the registration update PUT instead of POST? That is, upon normal registration the RD responds with a new link to the initial POST with 2.01 Created and a Location (Section 5.3). Then the update updates the data at the location. Should that be a PUT instead of POST, as it does not create a new URL? If it indeed shall be a POST, then the draft should have some rationale for why.
For some discussion on similar matters, see e.g. [6].
Best,
Hauke
[1]https://www.dagstuhl.de/en/program/calendar/evhp/?semnr=17303
[2]https://github.com/Ell-i/coap-rd
[3]https://github.com/Ell-i/node-red-contrib-coap-rd
[4]https://github.com/RIOT-OS/RIOT/pull/7406
[5]https://github.com/RIOT-OS/RIOT/pull/7428
[6]https://stackoverflow.com/questions/630453/put-vs-post-in-rest