You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The LwM2M spec does not specify what happens to an object instance's observations when a server deletes the object instance.
For example, if a server has installed an observation on /5/0/3, then deletes /5/0 and subsequently creates a new /5/0, should the server assume that the observation on /5/0/3 no longer exists, and should be reinstalled?
Thanks,
Bryan
The text was updated successfully, but these errors were encountered:
bryan-aetheros
changed the title
Does deleting an object instance implicitely delete observations under the instance?
Does deleting an object instance implicitly delete observations under the instance?
Jan 27, 2023
In the event that the resource changes in a way that would cause a
normal GET request at that time to return a non-2.xx response (for
example, when the resource is deleted), the server sends a
notification with an appropriate response code (such as 4.04 Not
Found) and removes the client's entry from the list of observers of
the resource. Non-2.xx responses do not include an Observe Option.
A notification SHOULD have a 2.05 (Content) or 2.03 (Valid) response
code. However, in the event that the state of a resource changes in
a way that would cause a normal GET request at that time to return a
non-2.xx response (for example, when the resource is deleted), the
server SHOULD notify the client by sending a notification with an
appropriate response code (such as 4.04 Not Found) and subsequently
MUST remove the associated entry from the list of observers of the
resource.
(Note in LWM2M, the LWM2M client acts as a CoAP server and vice versa )
So In a general way, I understand that if the object instance is deleted (for any reason), the LWM2M client (CoAP server) should send a 4.04 Not Found, then removes the observation relation. I guess LWM2M server (CoAP client) should also consider the relation is removed when he received a notification with a non-2.xx response code.
For example, if a server has installed an observation on /5/0/3, then deletes /5/0 and subsequently creates a new /5/0, should the server assume that the observation on /5/0/3 no longer exists, and should be reinstalled?
I understand it should reinstall.
(Note that I'm not author of any those specifications LWM2M or CoAP)
The LwM2M spec does not specify what happens to an object instance's observations when a server deletes the object instance.
For example, if a server has installed an observation on /5/0/3, then deletes /5/0 and subsequently creates a new /5/0, should the server assume that the observation on /5/0/3 no longer exists, and should be reinstalled?
Thanks,
Bryan
The text was updated successfully, but these errors were encountered: