Problem description
Currently /devices/release endpoint is synchronous and at some situations, especially when a device is actively getting used, the release might take some time to release the device and the associated resources.
Expected behavior
The /release endpoint needs to handle two different scenarios, and its behavior and corresponding HTTP response must vary depending on the operational state of the devices.
Synchronous Operation: When devices have been booked but are not yet active in operation, they can be immediately removed from the booking. In this case, the release request can be handled synchronously, and a successful response should be returned immediately.
Asynchronous Operation: When the scheduled booking has already started and the devices are in full operation, a release command is a complex, long-running task. The devices and their associated components must be carefully released to avoid service disruption. In this scenario, the operation must be handled asynchronously, with the API acknowledging the request and providing a way for the client to track its progress.
Alternative solution
Additional context
This is part of the qos-booking-and-assignment API specification
@gmuratk @murthygorty
Problem description
Currently
/devices/releaseendpoint is synchronous and at some situations, especially when a device is actively getting used, the release might take some time to release the device and the associated resources.Expected behavior
The
/releaseendpoint needs to handle two different scenarios, and its behavior and corresponding HTTP response must vary depending on the operational state of the devices.Synchronous Operation: When devices have been booked but are not yet active in operation, they can be immediately removed from the booking. In this case, the
releaserequest can be handled synchronously, and a successful response should be returned immediately.Asynchronous Operation: When the scheduled booking has already started and the devices are in full operation, a
releasecommand is a complex, long-running task. The devices and their associated components must be carefully released to avoid service disruption. In this scenario, the operation must be handled asynchronously, with the API acknowledging the request and providing a way for the client to track its progress.Alternative solution
Additional context
This is part of the qos-booking-and-assignment API specification
@gmuratk @murthygorty