| Literature DB >> 35161759 |
Ion-Dorinel Filip1, Cristian-Mihai Iliescu1, Florin Pop1,2.
Abstract
With the evolution of technology, developed systems have become more complex and faster. Thirty years ago, there were no protocols or databases dedicated to developing and implementing IoT projects. We currently have protocols such as MQTT, AMQP, CoAP, and databases such as InfluxDB. They are built to support a multitude of data from an IoT system and scale very well with the system. This paper presents the design and implementation of an IoT alert system that uses MQTT and InfluxDB to collect and store data. We design a scalable system to display assertive alerts on a Raspberry Pi. Each user can select a subset of alerts in our system using a web interface. We present a bibliographic study of SoTA, the proposed architecture, the challenges posed by such a system, a set of tests for the performance and feasibility of the solution, and a set of conclusions and ideas for further developments.Entities:
Keywords: IoT; MQTT; Raspberry Pi; scalability; selectivity; warning system
Mesh:
Year: 2022 PMID: 35161759 PMCID: PMC8840114 DOI: 10.3390/s22031015
Source DB: PubMed Journal: Sensors (Basel) ISSN: 1424-8220 Impact factor: 3.576
Figure 1MQTT general components schema and workflows.
Comparison of existing IoT data collecting solutions.
| Platform | Collection | Analysis | Visualisation | Integration | Architecture | Storage | SLA Support |
|---|---|---|---|---|---|---|---|
| Kaa [ | MQTT, CoAP, XMPP, TCP, HTTP, WiF, Ethernet, Zigbee | Real time | External Dashboard | Portable SDK, REST API | Server, Extensions, endpoint SDKs | MongoDB, Cassandra, HDFS, Oracle | Managed by user |
| ThingsBoard [ | HTTP, MQTT, CoAP | Real time analytics (Spark, Kafka), | Web-based Dashboard | REST API, MQTT APIs | Layered RPC-based | PostgreSQL, Cassandra, HSOLDB | Managed by user |
| DeviceHive [ | REST API, WebSockets, MQTT | Real time analytics (Spark) | External Dashboard | REST API, MQTT APIs | Microservice | PostgreSQL, SAP Hana DB | Managed by user |
| AWS IoT [ | HTTP, MQTT, WebSocket | S3, Kinesis, Lambda, DynamoDB, Elastic Search | Web-based Dashboard | Connectivity, Authentication, Rules Engine, Dev Mode, Edge SDK | Cloud-Edge, Pipeline | Amazon S3 | Prioritv Basis |
| Google IoT [ | HTTP, MQTT | Dataflow, BigTable, BigQuery, Coding Service Engine | Web-based Dashboard | Connectivity, Authentication, Device Management | Cloud-Edge, Publish/Subscribe | Firebase | Prioritv Basis |
| Azure IoT [ | HTTP, MQTT, AMQP, WebSocket | Stream Analytics, Azure Blob, Notification, Power Bl | Web-based Dashboard | Connectivity, Authentication, Device Management and Monitoring, IoT Edge SDK | Cloud-Edge, Client-Server with Azure Cloud | Azure SQL Edge, Azure CosmosDB, SQL DW, Storage Blob | Prioritv Basis |
| IBM Watson IoT [ | HTTP, MQTT | Require Configuration | External solutions | Plugins in C#, C, NodeJS | Client-Server with IBM Cloud | DB2 | Unknown |
| NetIoT [ | HTTP, MQTT | Real-time | Dashboard | Device Gateway, RabbitMQ | Microservice | Cassandra, PostgreSQL | Managed by user |
| Our solution | MQTT | Real-time | Grafana | REST API, MQTT | Client-Server | InfluxDB, SQL | Managed by user |
Figure 2An overview of the architecture with the main blocks and interaction between them.
Figure 3A representation of data flow between the BMP180 sensor and InfluxDB.
Figure 4A representation of message handshake between the RPI and the server in the scope of authenticating the RPI.
Figure 5The message flow for alerts.
Figure 6This schema represents the process of updating the settings for a device.
Figure 7RPI configuration JSON message.
Figure 8Representation in Grafana of the average temperature/hour in a year for a device.
Figure 9UML diagram of the SQL database.
Virtual machine configuration.
| OS | Ubuntu 18.04 LTS (64 bit) |
| CPU | Intel(R) Xeon(R) CPU E5-2650L v3 @ 1.80 GHz |
| No. Cores | 2 vCPUs |
| RAM | 4 GB |
| Storage | 50 GB Enterprise SSD |
Figure 10Elapsed time loading data for every 15 min for 1 year. Batch size 3500.
Figure 11Elapsed time loading data for every 15 min for 1 year using equally spaced vs realistic spaced timestamps.
Figure 12Storage space used by data generated for fixed time intervals vs data generated for random time intervals.
Calculation of throughput. Batch size 3500.
| Experiment | No Devices | No Points | Time (s) | Throughput (Points/s) |
|---|---|---|---|---|
| Fixed time interval | 10 | 350,400 | 96.011 | 3649.581819 |
| 20 | 700,800 | 190.978 | 3669.532616 | |
| 40 | 1,401,600 | 386.147 | 3629.705786 | |
| 80 | 2,803,200 | 782.498 | 3582.373373 | |
| 100 | 3,504,000 | 952.82 | 3677.50467 | |
| Realistic time interval | 10 | 350,400 | 89.691 | 3906.746496 |
| 20 | 700,800 | 209.479 | 3345.442741 | |
| 40 | 1,401,600 | 412.689 | 3396.262076 | |
| 80 | 2,803,200 | 781.432 | 3587.260312 | |
| 100 | 3,504,000 | 938.458 | 3733.78457 |
Throughput average and limits.
| Experiment | Average | Min | Max |
|---|---|---|---|
| Fixed time interval | 3641.739653 | 3582.3734 | 3677.50467 |
| Realistic time interval | 3593.899239 | 3345.4427 | 3906.746496 |
Number of total calls/month with 60 calls/minute.
| Per Minute | Per Hour | Per Day | Per Month |
|---|---|---|---|
| 60 | 3600 | 86,400 | 7,464,960,000 |
Table of potential requests at different time intervals in order to not exceed the free limit.
| Time Interval | 1 min | 5 min | 10 min | 15 min | 20 min | 25 min |
|---|---|---|---|---|---|---|
| Number of devices | 23 | 115 | 231 | 347 | 462 | 694 |
Figure 13Side to side comparison of the average request response time per iteration of each case.