Hi Carsten, > I have not found in the Core spec how resource deletion should be > notified to observers. > > RFC 7641, section 4.2 has a SHOULD for this.
Thank you! That says if during the GET request the resource is not found (because it was deleted), it SHOULD return 404 (not found) and MUST remove the requester from the observers list. Translated to OIC spec, the retrieve response with observe flag on (i.e. a resource notification) should be issued to all observers with the 4.04 response code, and when that is sent, all observers are also removed? I think my original observation still stands, i.e. this should be explicitly mentioned in the OIC Core spec. Then, the next question is, where is this implemented in iotivity? Thanks, Zoltan > > Hello, > > I have not found in the Core spec how resource deletion should be > notified to observers. > > I would think it should be part of CRUDN. One may argue Delete belongs > to presence. But I haven't found that specified either in the Core > spec. Nevertheless, there is some code in iotivity, see ocstack.c: > deleteResource(). > > IoTivity seems to notify all observers with deleted/blanked > resourceProperties (meta-properties), or if presence compile flag is > enabled, sends presence notifications. However, it does not seem to > be used on the client side. > > Blanking meta-property is not a proper solution. We need protocol > support for delete notification. > > I'd expect to find this use case mentioned in the Core spec section > 11.4, likely an added property to the observe response in 11.4.2.3. > Both updates and deletions should be actions triggering notifications > to observers. > > If it is there without me noticing it, please tell me how is this > supposed to work 1) on protocol level (Core spec), and 2) in iotivity. > > Thanks, > Zoltan > _______________________________________________ > iotivity-dev mailing list > iotivity-dev at lists.iotivity.org > https://lists.iotivity.org/mailman/listinfo/iotivity-dev >
