Today, we rolled out an update to MODE that changes how On-demand Device Provisioning is carried out. On-demand Device Provisioning is an alternative mechanism that MODE projects can use to provision device instances. It allows projects to ship devices without having to install pre-provisioned unique device IDs and API keys in them. If your project has been using On-demand Device Provisioning, please read on.
We made this change to minimize the chance of creating zombie device instances as a result of failed or incomplete provisioning process. Previously, the process works as illustrated in the following diagram:
If for some reason the app fails to transmit the device credentials to the device, the newly created device instance becomes a zombie and needs to be explicitly removed by the app.
With the latest change, the process works as follows:
The app initiates the process by acquiring a temporary provisioning token. No device instance is created. If the app fails to send the token to the device and abandon the process, there is no need to clean up anything.
We believe this is a better mechanism in practice. The old flow will continue to work for the time being. For more information, see the full documentation. If you have any questions, feel free to post them to our Q&A forum.