Skip to content

1. Software Architecture

Jakob E. Bardram edited this page Sep 26, 2022 · 61 revisions

The figure below illustrates the overall architecture of CARP Mobile Sensing (CAMS). The runtime model consisting of three main layers; the core runtime (middle layer), deployment and data manager services (top layer), and the sampling packages (bottom layer), which again builds on top of a set of Flutter plugins that access sensors and services in the underlying OS, external wearable devices, and cloud-based services. This architecture is designed to achieve the non-functional software architecture goals of being highly extensible, cross-platform, and maintainable.

carp_mobile_sensing_architecture

1. Client Manager Layer

This is the "core" CAMS runtime (the middle layer):

  • The SmartPhoneClientManager can run one (or more) StudyDeploymentController, which is based on adding a study to the SmartPhoneClientManager.

  • The StudyDeploymentController can be configured by specifying a DataEndPoint (which again loads an appropriate DataManager ), along with other settings. Once configured, a StudyDeploymentExecutor is responsible for executing the study deployment.

  • The StudyDeploymentController use a set of registries to look up an appropriate data manager, a set of sampling packages, data transformers, and sensing probes for executing the sensing study deployment protocol.

2. Service Layer

The service layer (top layer) holds

3. Sampling Layer

The sampling layer (bottom layer) holds

  • A set of SamplingPackages, which can collect a specific type of measure. CAMS comes with two built-in sampling packages (the DeviceSamplingPackage and SensorSamplingPackage), but most sampling packages are available as external packages which are used in the app, as needed. In this way, an app only needs permissions to access probes (and hence sensors), which are needed in a specific app. The carp_context_package is an example of an externally loaded sampling package, which are available on pub.dev.

  • Each sampling package contains one or more Probes, which can access the underlying sensor and collect the data. Access to sensor data is typically done using a Flutter plugin. Note that these Flutter plugins are external to CAMS and is loaded as needed by the sampling package. For example, the carp_context_package make use of the weather plugin to access weather data (as a web service).

Clone this wiki locally