New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[cloud] RFC0007 - Mappings for Cloud Event Attributes to CoAP Options #8
Conversation
Signed-off-by: Pranav <adpranavb2000@gmail.com>
Signed-off-by: Pranav <adpranavb2000@gmail.com>
Signed-off-by: Pranav <adpranavb2000@gmail.com>
Signed-off-by: Pranav <adpranavb2000@gmail.com>
Signed-off-by: Pranav <adpranavb2000@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @pranav-bhatt! I think overall whats there so far looks good. Some comments:
-
In CoAP RFC, there is a notion of Option Value Format (https://datatracker.ietf.org/doc/html/rfc7252#section-3.2). I think it would make sense to also specify that value type to expect for each attribute.
-
To my understanding, most of the options will be derived for the coap endpoint. Although its not the primary purpose of this document, giving some overview of which options will be automatically derived, and which ones are not (or at least link to the relevant parts of https://github.com/drogue-iot/rfcs/blob/e84f901a810c810925fcaa8f214afd77bf17da17/active/0003-cloud-events-mapping.md) would be useful context for the reader and for device side coap implementations.
-
I wonder if choosing a more "random" range of option numbers would be better in case we accidentally conflict with numbers outside of the spec, but that is just speculation on my part.
Signed-off-by: Pranav <adpranavb2000@gmail.com>
Signed-off-by: Pranav <adpranavb2000@gmail.com>
Signed-off-by: Pranav <adpranavb2000@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! I just have a few comments/questions:
- IMO the specversion should be a string in order to treat it as an opaque value in the endpoint
- For the
subject
, I wonder if it would make sense to use the uri path like for HTTP for the channel? - I'm not sure if event type should be set by device, I think it is always set by endpoint to the "drogue event version" format the endpoint uses.
Thanks for the feedback!
|
For The way I'm interpreting
Ok, it's probably fine to leave it as is. I got slightly confused with the column name, "Sent by device", when it's in fact "May be sent by device" |
@lulf correct with the subject. I would put that on the path (if that is possible with CoAP) and not use an option for it. Same for the other properties, which are generated by the endpoint. I don't think they should have options assigned. |
@ctron For the properties that are generated by the endpoint, doesn't there need to be reverse mapping from cloud event to coap option in the event of command messages sent to the device, or are/should there be no such conversion? Btw, the Url-Path option is the way CoAP communicates the path. Most coap clients will translate the "coap url" path and set this option. |
Signed-off-by: Pranav <adpranavb2000@gmail.com>
Signed-off-by: Pranav <adpranavb2000@gmail.com>
Signed-off-by: Pranav <adpranavb2000@gmail.com>
Signed-off-by: pranav <adpranavb2000@gmail.com>
Signed-off-by: pranav <adpranavb2000@gmail.com>
I think its good to merge @pranav-bhatt |
Motivation
CoAP uses Options instead of the traditional headers we see in other protocols. These options are represented by option numbers ranging from 0-65536, with some options numbers having reserved definitions in the CoAP specification.
This document aims to associate certain Options to Cloud Event fields (usage defined by this RFC).
Please see this link to see the rendered spec for greater clarity.