| Literature DB >> 35336335 |
Giuseppe Loseto1, Floriano Scioscia2, Michele Ruta2, Filippo Gramegna2, Saverio Ieva2, Corrado Fasciano2,3, Ivano Bilenchi2, Davide Loconte2.
Abstract
Artificial Intelligence (AI) in Cyber-Physical Systems allows machine learning inference on acquired data with ever greater accuracy, thanks to models trained with massive amounts of information generated by Internet of Things devices. Edge Intelligence is increasingly adopted to execute inference on data at the border of local networks, exploiting models trained in the Cloud. However, the training tasks on Edge nodes are not supported yet with flexible dynamic migration between Edge and Cloud. This paper proposes a Cloud-Edge AI microservice architecture, based on Osmotic Computing principles. Notable features include: (i) containerized architecture enabling training and inference on the Edge, Cloud, or both, exploiting computational resources opportunistically to reach the best prediction accuracy; and (ii) microservice encapsulation of each architectural module, allowing a direct mapping with Commercial-Off-The-Shelf (COTS) components. Grounding on the proposed architecture: (i) a prototype has been realized with commodity hardware leveraging open-source software technologies; and (ii) it has been then used in a small-scale intelligent manufacturing case study, carrying out experiments. The obtained results validate the feasibility and key benefits of the approach.Entities:
Keywords: Cloud-Edge Intelligence; Cyber-Physical Systems; Edge AI; Internet of Things; Osmotic Computing; microservice architecture
Mesh:
Year: 2022 PMID: 35336335 PMCID: PMC8955238 DOI: 10.3390/s22062166
Source DB: PubMed Journal: Sensors (Basel) ISSN: 1424-8220 Impact factor: 3.576
Comparative table of frameworks (✓: supported, ✗: not supported).
| Reference | Containerized Services | Osmotic | AI | Model Training |
|---|---|---|---|---|
| Pacheco et al. [ |
|
|
| Pre-Trained |
| Apollon [ |
|
|
| On Cloud |
| Grzelak et al. [ |
|
|
|
|
| Carnevale et al. [ |
|
|
|
|
| En-OsCo [ |
|
|
|
|
| Osmosis [ |
|
|
|
|
| Sharma et al. [ |
|
|
|
|
| Tovazzi et al. [ |
|
|
| On Cloud |
| This work |
|
|
| On Cloud and Edge |
Figure 1Reference Architecture.
Reference COTS tools.
| Service/Module | Technology | Version | License | Release Date |
|---|---|---|---|---|
| Container technology | balenaOS | 2.54.2 | Apache 2.0 | 12 August 2020 |
| Orchestrator | openBalena | 3.1.1 | GNU Affero GPL 3.0 | 10 November 2020 |
| Data Stream Management System | Apache Kafka | 2.5.0 (with Scala 2.12) | Apache 2.0 | 15 April 2020 |
| Data Producer | Kafka Producer API | 2.0.1-python | Apache 2.0 | 19 February 2020 |
| Data Consumer | Kafka Consumer API | 2.0.1-python | Apache 2.0 | 19 February 2020 |
| Local Storage | Redis | 6.0.9 | 3-Clause BSD | 26 October 2020 |
| Data Processing | Python scripts | 3.9.0 | PSF & Zero-Clause BSD | 5 October 2020 |
| Edge/Cloud Intelligence | TensorFlow | 2.3.1 | Apache 2.0 | 12 Sepember 2020 |
| Data Analytics & Visualization | Streamlit | 0.72.0 | Apache 2.0 | 2 December 2020 |
Figure 2Components of the proposed prototype.
Figure 3Message Broker/Orchestrator and Edge devices in the platform prototype.
Attributes of control messages.
| Type | Id | Host | Data Key | Query Type | Query ID | Storage ID |
|---|---|---|---|---|---|---|
| SC |
|
| ||||
| SD |
| |||||
| SDT |
|
|
| |||
| DS |
|
|
| |||
| QR |
|
| ||||
| RS |
|
|
|
Attributes of data messages.
| Type | Id | Data | Module ID | Result | Time |
|---|---|---|---|---|---|
| input |
|
| |||
| output |
|
|
|
| |
| model |
| ||||
|
|
|
|
|
| |
| input | |||||
| output | |||||
| model |
|
|
|
|
|
Figure 4Sequence diagram for Edge-side prediction.
Figure 5Time required for data import.
Training: Network activity.
| Node | Device | Label | Download (kB) | Upload (kB) |
|---|---|---|---|---|
| Broker | broker | MB | 4768 | 7603 |
| intelligence |
| 33,386 | 993 | |
| Edge 1 | storage |
| 35,951 | 36,043 |
| sensor |
| 2379 | 35,259 | |
| intelligence |
| 33,685 | 1142 | |
| Edge 2 | storage |
| 35,522 | 35,858 |
| sensor |
| 2193 | 35,088 |
Training time and validation results.
| Node | R | MSE | Download Time (s) | Training Time (s) | Validation Time (s) |
|---|---|---|---|---|---|
| Cloud | 0.983 | 0.0222 | 50.788 | 437.986 | 3.081 |
| Edge 1 | 0.972 | 0.0348 | 24.603 | 2086.653 | 25.415 |
| Edge 2 | 0.971 | 0.0337 | 33.085 | 2574.005 | 28.976 |
Training: Reduced datasets.
| Samples |
|
| Download Time (s) | Training Time (s) | Validation Time (s) |
|---|---|---|---|---|---|
| 737,454 | 0.983 | 0.021 | 42.451 | 5155.740 | 32.072 |
| 368,727 | 0.972 | 0.035 | 24.603 | 2086.653 | 24.608 |
| 184,363 | 0.959 | 0.055 | 10.688 | 1066.539 | 10.688 |
| 92,182 | 0.931 | 0.088 | 5.087 | 564.569 | 5.087 |
| 46,090 | 0.894 | 0.135 | 2.815 | 263.953 | 2.815 |
Prediction: Network activity.
| Node | Device | Label | Download (kB) | Upload (kB) |
|---|---|---|---|---|
| broker | broker | MB | 42 | 78 |
| Edge 1 | intelligence |
| 26 | 26 |
| sensor |
| 36 | 34 | |
| Edge 2 | intelligence |
| 26 | 26 |
Prediction: Time and latency.
| Node | Inference Time | Communication Latency (ms) | Turnaround Time | |||
|---|---|---|---|---|---|---|
| (ms) | S to MB | MB to I | I to MB | MB to S | (ms) | |
| Cloud | 31.377 | 91.510 | 19.752 | 42.549 | 44.970 | 230.158 |
| Edge 1 | 230.598 | 87.259 | 4.362 | 19.461 | 37.773 | 379.453 |
| Edge 2 | 301.887 | 84.812 | 7.590 | 22.844 | 30.555 | 447.688 |
Microservice deployment performance.
| Node | Service | Load | Startup | Broker Bandwidth (MB) | Image | |
|---|---|---|---|---|---|---|
| Download | Upload | |||||
| Cloud | Storage | 71.163 | 2.983 | 4.144 | 255.726 | 239.974 |
| Intelligence | 224.451 | 2.768 | 12.648 | 765.300 | 718.205 | |
| Edge | Storage | 314.577 | 23.424 | 1.713 | 149.924 | 137.782 |
| Intelligence | 244.422 | 3.108 | 3.424 | 718.291 | 694.802 | |
Figure 6Dataset transfer times.