Christian Amsüss
2018-04-12 11:04:56 UTC
Hello CoRE WG,
observation is being discussed in the context of OSCORE[1], and without
overloading that thread, I'd like to run a suggestion by you:
Can we generalize Observe a bit to cover non-safe cases?
To summarize, observe was originally specified for GET in RFC7641 and
then later allowed for FETCH in RFC8132 without really saying much,
especially about Block1 that came with that.
There have been cases where it would be neat to observe outputs of POSTs
too (AFAIR Peter had one, OSCORE would be simpler too, and there was
some other in London I don't remember).
Proposal:
* Observe can be used with all currently specified methods.
* For re-registration of interest in the restul of a non-safe operation,
the Observe value of the request is 2 ("reregister"). Servers process
a reregister just as regular registration, but can only respond if
they recognize it as a reregistration, and MUST NOT act on it again.
If they don't recognize it, they respond with 4.xx What Are You
Talking About. (There's no way to recover from that on the protocol
level; that's left to the application).
* This is well compatible with existing intermediaries, they'll just go
4.02 Bad Option when they see a client trying to observe a POST, just
as they would if they didn't do observation at all.
* Applications can use reregister on safe operations too, but really why
should they, it only trips off older proxies.
(One could consider adding an Observe:3 "deregister-nodo" here that
allows a client to stop a registration w/o risking that the operation
might be done again when sending Observe:1; frankly, I don't think I'll
ever send Observe:1 as GET / No-Response:at-all with the same token is
just as good.)
That's not really something I want to put on my agenda, but as it
popped up a few times in London and now again: Here's how I'd go about
it.
Best regards
Christian
---
Bonus content: GoldenEye's traceroute scene as expressed with this
extension:
POST /traceroute
Payload: Find the GoldenEye control center!
Observe:0
2.05 Content, Observe:10, Payload: He's not in Russia...
2.05 Content, Observe:20, Payload: He's not in Germany...
(Simonova gets impatient:)
POST /traceroute
Payload: Find the GoldenEye control center!
Observe: 2
2.05 Content, Observe:21, Payload: He's still not in Germany...
2.05 Content, Observe: 30, Payload: He's not in New York, Toronto,
Chicago, San Francisco
2.05 Content, Observe: 40, Max-Age: large, Payload: He's in Cuba.
[1]: https://github.com/core-wg/oscoap/issues/223
observation is being discussed in the context of OSCORE[1], and without
overloading that thread, I'd like to run a suggestion by you:
Can we generalize Observe a bit to cover non-safe cases?
To summarize, observe was originally specified for GET in RFC7641 and
then later allowed for FETCH in RFC8132 without really saying much,
especially about Block1 that came with that.
There have been cases where it would be neat to observe outputs of POSTs
too (AFAIR Peter had one, OSCORE would be simpler too, and there was
some other in London I don't remember).
Proposal:
* Observe can be used with all currently specified methods.
* For re-registration of interest in the restul of a non-safe operation,
the Observe value of the request is 2 ("reregister"). Servers process
a reregister just as regular registration, but can only respond if
they recognize it as a reregistration, and MUST NOT act on it again.
If they don't recognize it, they respond with 4.xx What Are You
Talking About. (There's no way to recover from that on the protocol
level; that's left to the application).
* This is well compatible with existing intermediaries, they'll just go
4.02 Bad Option when they see a client trying to observe a POST, just
as they would if they didn't do observation at all.
* Applications can use reregister on safe operations too, but really why
should they, it only trips off older proxies.
(One could consider adding an Observe:3 "deregister-nodo" here that
allows a client to stop a registration w/o risking that the operation
might be done again when sending Observe:1; frankly, I don't think I'll
ever send Observe:1 as GET / No-Response:at-all with the same token is
just as good.)
That's not really something I want to put on my agenda, but as it
popped up a few times in London and now again: Here's how I'd go about
it.
Best regards
Christian
---
Bonus content: GoldenEye's traceroute scene as expressed with this
extension:
POST /traceroute
Payload: Find the GoldenEye control center!
Observe:0
2.05 Content, Observe:10, Payload: He's not in Russia...
2.05 Content, Observe:20, Payload: He's not in Germany...
(Simonova gets impatient:)
POST /traceroute
Payload: Find the GoldenEye control center!
Observe: 2
2.05 Content, Observe:21, Payload: He's still not in Germany...
2.05 Content, Observe: 30, Payload: He's not in New York, Toronto,
Chicago, San Francisco
2.05 Content, Observe: 40, Max-Age: large, Payload: He's in Cuba.
[1]: https://github.com/core-wg/oscoap/issues/223
--
Ceterum censeo RFC6690 esse revidendam.
Ceterum censeo RFC6690 esse revidendam.