-
Notifications
You must be signed in to change notification settings - Fork 25
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
CoAP Blockwise Indicator #49
Comments
@mkovatsc could you provide an example on how this should look like? We said that this metadata format should be provided in the CoAP vocabulary and the binding templates references to it and gives an example. |
On September 20 in Fukuoka, it was suggested to discuss this with IETF during Singapore F2F meeting. See minutes here. |
Adding on to this issue (I noticed it because of w3c/wot-discovery#93), I think you could theoretically add a CoAP Block option like the following to a Form to indicate that a blocksize of 64 is going to be used in responses: {
"cov:optionName": "Block2",
"cov:optionValue": {
"num": 0,
"m": 0,
"szx": 64
}
} Maybe this could also be abbreviated using something like |
If this is indeed always the case, I do not think it makes sense. Can the client use this information in any way, like starting the negotiation with a better initial value? |
Oh, I think this might actually be a valid use case (c. f. figure 4 in RFC 7959). This way it could be avoided that a consumer is surprised by a Block2 size that is too large. Thinking about it, this could be especially relevant for Block1 (POST/PUT) requests where the Thing might prefer a smaller block size (c. f. figure 9), e. g. because it might not be able to process larger packets. I think the main question here would then be how to deal with the Block option format where three values are encoded into one unsigned integer. To follow the current format, the example I gave above should probably actually look like this: {
"cov:optionName": "Block2",
"cov:optionValue": 2
} So, as the block size parameter accepts values from 0 to 6 you could simply use a 2 in this case. This does not work as intuitively for the Block1 option, though, as the more flag has to be set for the initial request, increasing the option value by 7. Therefore, being able to specify dedicated Block1 and Block2 sizes (in a human readable form) could probably make sense here. |
I have partially understood the figure but enough to see the need for it in those cases.
I did not understand this though. |
Oh, sorry, it should have been "8" instead of "7" -- the This is in contrast to the Block2 option where the |
I think a more general question that relates to this issue is whether a generalized option format as it is currently used by the Procotol Binding is actually feasible. I have the impression the current format works well for HTTP where you have text-based header fields which all have the same format, but not so well for CoAP where options are used for all sorts of things, including URI paths. This means, that you could have a form like {
"href": "/foo/bar",
"cov:options": [
{ "cov:optionName": "Uri-Path", "cov:optionValue": "bar" },
{ "cov:optionName": "Uri-Path", "cov:optionValue": "foo" }
]
}
where it would be unclear whether As all CoAP options have to be registered with IANA it might be worth discussing if there should only be specific indicators for special CoAP options like the blockwise ones, as many options like Uri-Path (which is implied by the |
IMHO there are not many CoAP options where it makes sense to tell a CoAP client to set some option X to value Y in a request without the client being aware of the semantics of that option. For example, setting the Observe option in a request makes little sense if the client doesn't understand that it'll receive a stream of notifications instead of a single response. I would therefore argue for identifying features in forms rather than options. A feature would be something like observing a resource, performing a block-wise transfer, using OSCORE, etc. that the CoAP client needs to understand when making the request (and that leads to the inclusion of the right options in that request). |
I completely agree with you here, @ektrah :) I guess the question would then be which features should be able to be specified in a form (besides block-wise and OSCORE) and which ones are already covered by other fields (which should maybe also be indicated in the document). @egekorkan: Do you think we could/should discuss this issue at one of the upcoming meetings? By the way: Could OSCORE maybe also qualify as a |
Maybe something like this?
Details (click to expand)
|
Looks great, thank you! :) Two questions: Maybe the |
Yes sure, I propose this as a general item to identify what parts are to be described in a TD (like the table above). I have some other topics for a binding meeting but I was postponing them to help TD spec PRs and issues to resolve due to publication schedule. |
Call of 23.02
|
I think this issue could be closed by now, right? :) |
Yes can be closed, after a long time :) |
It would be good to have metadata in the TD that tells from which payload size blockwise transfers should be used.
In addition -- or combined, there should be metadata if blockwise transfers are supported at all by the Thing.
The text was updated successfully, but these errors were encountered: