Subject: [core] Question about rel=Index and rel=section In Link Format draft

From: Linyi Tian <[email-masked]>
Date: Wed, 10 Nov 2010 00:25:33 +0800

Hi, Z. Shelby and all

The link format draft shows two examples In section 2.8. I am wondering what
Is the difference between ŒRel=Index Œand ŒRel=section¹ In the examples.

It Is easy to understand that Œrel=section¹ means there Is a collection of
resources that the CoAP requestor can further retrieve the Information. What
I don¹t understand Is what ³rel=Index² means. Why the two sub-resources are
returned together with the Index. Is that the normal behavior? What will be
returned If the requestor sends GET /.well-known/core/sensors In the first
example?

In the first example, the relative URI Is returned for all three resources,
while the absolute URI Is returned for the first response In the second
example. Why?

This example includes link descriptions for an index to sensors
   hosted by a server, along with links two two different sensors.

   GET /.well-known/core

   </sensors>;rel="index";n="Sensor Index",
   </sensors/temp>;sh="/t";n="TemperatureC",
   </sensors/light>;sh="/l";ct=41;n="LightLux"

   This example arranges link descriptions hierarchically, with the
   entry point including a link description to a sub-resource containing
   link descriptions about the sensors.

   GET /.well-known/core

   </.well-known/core/sensors>;rel="section"
   ;type="application/link-format"

   GET /.well-known/core/sensors

   </sensors/temp>;sh="/t";n="TemperatureC",
   </sensors/light>;sh="/l";ct=41;n="LightLux"

Cheers,
Linyi

---

From: Zach Shelby <[email-masked]>
Date: Wed, 10 Nov 2010 01:25:13 +0800

Hi,

Thanks for these comments (and the more recent ones too). 

On Nov 10, 2010, at 12:25 AM, Linyi Tian wrote:

> Hi, Z. Shelby and all
> 
> The link format draft shows two examples In section 2.8. I am wondering what Is the difference between ‘Rel=Index ‘and ‘Rel=section’ In the examples. 
> 
> It Is easy to understand that ‘rel=section’ means there Is a collection of resources that the CoAP requestor can further retrieve the Information. What I don’t understand Is what “rel=Index” means. Why the two sub-resources are returned together with the Index. Is that the normal behavior? What will be returned If the requestor sends GET /.well-known/core/sensors In the first example?

That URL doesn't exist in the first example. You would GET /sensors. The reason that I included /sensors/temp and /sensors/light in the example is that /sensors is not necessarily application/link-format, but might e.g. contain the values of both siblings. It is really up to the server to decide. 

> In the first example, the relative URI Is returned for all three resources, while the absolute URI Is returned for the first response In the second example. Why?

The URIs in the first example are not relative. I think you were assuming that /sensors is under /.well-known/core because it is an "index"? It is not.

I might interpret RFC5988 wrong here, but to me "index" is a summary or list of information about siblings (outside of /.well-known/core), whereas "section" is used to indicate that the URL under /.well-known/core contains a part of the links. Attempting to make logical use of the different relations from RFC5988 in a logical way for CoRE...

OK, obviously the examples need some more explanation (and we need some more examples). I'll be sure to do that in the next version.

Zach

> _______________________________________________
> core mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/core

-- 
Zach Shelby, Chief Nerd, Sensinode Ltd.
http://zachshelby.org  - My blog "On the Internet of Things"
http://6lowpan.net - My book "6LoWPAN: The Wireless Embedded Internet"
Mobile: +358 40 7796297