Ari Keränen
2016-11-17 08:55:36 UTC
Hi all,
When updating the T2TRG RESTful design draft we discussed role of URI fragments in IoT scenarios and realized that this could be useful for SenML too for addressing parts of a SenML pack.
It's good to note that URI fragments are for client side processing only and never sent on the wire. So the server would still send a full representation, but a fragment identifier allows applications on the client to refer to specific parts of SenML packs.
A potential way to implement this is to use the RFC 7111 ("URI Fragment Identifiers for the text/csv Media Type") row-part style (https://tools.ietf.org/html/rfc7111#section-2.1). For example, on a SenML pack from "sensors/temp", one could address:
3rd record: sensors/temp#rec=3
Records 4 to 7: sensors/temp#rec=4-7
Records from 4 to last: sensors/temp#rec=4-*
To handle base values, we could specify something along the lines of "Fragment MUST resolve (i.e., fill base values) to the same values as the given range in the whole pack would".
Is this something you would consider useful? Should it be added to the SenML spec media type definitions?
Cheers,
Ari
When updating the T2TRG RESTful design draft we discussed role of URI fragments in IoT scenarios and realized that this could be useful for SenML too for addressing parts of a SenML pack.
It's good to note that URI fragments are for client side processing only and never sent on the wire. So the server would still send a full representation, but a fragment identifier allows applications on the client to refer to specific parts of SenML packs.
A potential way to implement this is to use the RFC 7111 ("URI Fragment Identifiers for the text/csv Media Type") row-part style (https://tools.ietf.org/html/rfc7111#section-2.1). For example, on a SenML pack from "sensors/temp", one could address:
3rd record: sensors/temp#rec=3
Records 4 to 7: sensors/temp#rec=4-7
Records from 4 to last: sensors/temp#rec=4-*
To handle base values, we could specify something along the lines of "Fragment MUST resolve (i.e., fill base values) to the same values as the given range in the whole pack would".
Is this something you would consider useful? Should it be added to the SenML spec media type definitions?
Cheers,
Ari