drogue-cloud icon indicating copy to clipboard operation
drogue-cloud copied to clipboard

Consider allowing in process of deletion to receive commands/send data

Open lulf opened this issue 2 years ago • 0 comments

A useful pattern when writing Drogue Cloud extensions is to hook into the lifecycle of devices: when device is created, an operator can detect that and send commands to a device for it to 'initialize'.

The operator can add itself to finalizers for the device to ensure it can follow some process when the device is being deleted. This can be sending some command to the device, and also expecting some confirmation message back from the device, before the operator removes itself from the finalizers.

At present, the authentication service considers devices under deletion as unauthenticated, which prevents the above shutdown process. Changing this policy to allow devices under deletion to authenticate would allow extensions to hook into the 'shutdown lifecycle' of a device.

lulf avatar Sep 22 '22 09:09 lulf