Subject: [core] Comi payload discussion

From: peter van der Stok <[email-masked]>
Date: Mon, 21 Nov 2016 13:52:42 +0100

Hi all,

In Comi, objects are represented according to the CBOR (key, value) 
pair.
When an object is accessed, the key is specified in the URI, and the 
value is transported in the payload.
For DELETE, PUT, and POST, the request contains all information about 
the object.
however, in the GET, the returned payload contains the value, and the 
key is unknown.
This is very unpleasant for debugging, because it means that the request 
and return packets must be paired before debugging can take place.

I therefore propose that the return of the GET payload contains both the 
key and the value of the object.
the disadvantage is the addition of 2-5 bytes in the payload.

Your reactions, please.

thanks,

peter

-- 
Peter van der Stok
vanderstok consultancy
mailto: [email-masked]
www: www.vanderstok.org
tel NL: +31(0)492474673     F: +33(0)966015248

---

From: Michel Veillette <[email-masked]>
Date: Mon, 21 Nov 2016 13:46:11 +0000

Hi Peter

The only way to debug a GET response is to known the GET request, its URI, its CoAP options.
Adding the data node identifier (SID) to the response payload is insufficient to qualify the information returned and not typical for CoAP.

See RFC 7252, section 2.2. Request/Response Model
https://tools.ietf.org/html/rfc7252#section-2.2
   GET /temperature

   2.05 Content
   "22.5 C"

Similarly in CoMI:
  GET /c/Bf4?k=eth0

  2.05 Content
  "Ethernet adapter"

Regards,
Michel

-----Original Message-----
From: core [mailto:[email-masked]] On Behalf Of peter van der Stok
Sent: Monday, November 21, 2016 7:53 AM
To: Core <[email-masked]>
Subject: [core] Comi payload discussion

Hi all,

In Comi, objects are represented according to the CBOR (key, value) pair.
When an object is accessed, the key is specified in the URI, and the value is transported in the payload.
For DELETE, PUT, and POST, the request contains all information about the object.
however, in the GET, the returned payload contains the value, and the key is unknown.
This is very unpleasant for debugging, because it means that the request and return packets must be paired before debugging can take place.

I therefore propose that the return of the GET payload contains both the key and the value of the object.
the disadvantage is the addition of 2-5 bytes in the payload.

Your reactions, please.

thanks,

peter

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

---

From: peter van der Stok <[email-masked]>
Date: Tue, 22 Nov 2016 09:29:08 +0100

Hi Michel,

Indeed a very good observation, that you need more info than only the 
SID.
I like to limit the discussion to CoMI.

For example 2, the debugger knows it is a value of Bf4 and not the 
temperature.
And the analysis tool can find the enveloping container or list.

Peter

Michel Veillette schreef op 2016-11-21 14:46:
> Adding the data node identifier (SID) to the response payload is
> insufficient to qualify the information returned and not typical for
> CoAP.
> 
> This is very unpleasant for debugging, because it means that the
> request and return packets must be paired before debugging can take
> place.
>