Open Whathecode opened 4 years ago
The second part 'required registration' is addressed in https://github.com/cph-cachet/carp.core-kotlin/pull/119.
All devices require registration on the back-end before a deployment can be considered 'ready' (https://github.com/cph-cachet/carp.core-kotlin/commit/eb4aa8862be1cb24c8272a6dce7c8004b96ee782). The previous
requiresRegistration
is now specific to individual devices, represented asremainingDevicesToRegisterBeforeDeployment
inDeviceDeploymentStatus
(https://github.com/cph-cachet/carp.core-kotlin/commit/b067518d733e0886ea86865541b6d197aaf8aa9a).
Another formulation I just wrote up while looking into the different definitions again:
PrimaryDeviceDeployment
). The intent is that a new PrimaryDeviceDeployment
needs to be obtained if the dependent primary device changes its registration, since it might impact the whole 'connection' setup which is defined within.PrimaryDeviceDeployment
. They might be optional parts of a study (not implemented yet), or will be configured on the primary device itself.The current comments and variable naming in DeviceDeploymentStatus
might not be in sync with this description, and it seems there is a bug as a result that a deployment for a master device cannot be obtained before registering a connected device.
While continuing the implementation of
DeploymentService
, some questions arose in regards to the registration of devices, and when devices are considered 'dependent' on one another.Dependent devices The original reason why it was expected that some devices require registration prior to being able to retrieve the
PrimaryDeviceDeployment
of another device was because they might need to communicate and information needs to be exchanged in order to establish that communication. However, we also envisioned that the back-end may decide to only support server/client communication in between multiple primary devices; that is, the individual primary devices do not depend on one another, but all depend on the server as the middleman to communicate with one another. Since this would be the default fallback mechanisms, this is the first form of communication we intend to implement. In case of such a deployment, primary devices do not depend on one another. To contrast, the current implementation assumes they always do, even if no form of communication between them is configured in the study protocol.PrimaryDeviceDeployment
in case the information on how to communicate with other devices was not yet available and could not yet be made part of that deployment information.Required registration Some ambiguity in terms of what it means for a device 'requiring registration' arose. The concept was introduced to indicate the dependencies described above, and thus all top-level primary devices by default required registration. However, now the question also arises whether all devices should be registered prior to a study deployment being able to 'start'. Connected devices can be registered locally on a primary device, but it might make sense to notify the back-end of that registration so that a complete history of which physical devices were used to run a study is available.