Skip to main content

Lab 5—Prototyping Data Connectors

  • Chapter
  • First Online:
Network of Things Engineering (NoTE) Lab

Abstract

In this lab, we implement data connectors between various parts of the system, such that data can be forwarded end-to-end, from IoT devices to cloud tools. The setup for this lab is shown in Fig. 8.1, and it includes Raspberry Pi, WiFi router, workstation, and server. To enable data exchange between the different components, we make use of three different connectors: (1) sensor controller (MQTT-to-AMQP brokers), to forward the sensor data coming from MQTT broker running on Raspberry Pi to RabbitMQ running on the server, (2) Data pipeline (AMQP broker-to-HTTP server), to index the data received from AMQP broker into the Elasticsearch database, both running on the server, and (3) actuator controller (HTTP server/AMQP broker-to-MQTT broker), to forward data from RabbitMQ and Elasticsearch to the MQTT broker.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 79.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

Libraries

  1. Paho Python Client: https://www.eclipse.org/paho/index.php?page=clients/python/index.php

  2. Pika library: https://pika.readthedocs.io/en/stable/

  3. Requests library: https://requests.readthedocs.io/en/latest/user/install/

Tools

  1. Docker Engine installation on Ubuntu: https://docs.docker.com/engine/install/ubuntu/

  2. Python: https://www.python.org/downloads/

  3. OpenSSH Server: https://ubuntu.com/server/docs/service-openssh

  4. CURL: https://curl.se/download.html

  5. K3s container orchestrator: https://rancher.com/docs/k3s/latest/en/installation/install-options/

  6. mosquitto-clients (v1.6.9-1): https://packages.ubuntu.com/focal/mosquitto-clients

  7. Package: amqp-tools (0.10.0-1): https://packages.ubuntu.com/focal/amqp-tools

  8. Eclipse Mosquitto (Docker): https://hub.docker.com/_/eclipse-mosquitto

  9. RabbitMQ helm chart: https://github.com/bitnami/charts/tree/master/bitnami/rabbitmq

  10. Logstash helm chart: https://github.com/elastic/helm-charts/tree/7.17/logstash

  11. Elasticsearch helm chart: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch

Other Resources

  1. HTTP client in Python: https://github.com/tubskns/notelab-code/blob/master/rpi/http_client.py

  2. AMQP client in Python: https://github.com/tubskns/notelab-code/blob/master/rpi/amqp_client.py

  3. MQTT client in Python: https://github.com/tubskns/notelab-code/blob/master/rpi/mqtt_client.py

  4. Logstash output plugins: https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html

  5. Logstash input plugins: https://www.elastic.co/guide/en/logstash/current/plugins-inputs-rabbitmq.html

  6. Sensor controller prototype in Python: https://github.com/tubskns/notelab-code/blob/master/rpi/sensor_controller_proto.py

  7. Actuator controller prototype in Python: https://github.com/tubskns/notelab-code/blob/master/rpi/actuator_controller_proto.py

  8. Logstash configuration file: https://github.com/tubskns/notelab-code/blob/master/server/logstash_conf.yml

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Admela Jukan .

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Jukan, A., Masip-Bruin, X., Dizdarević, J., Carpio, F. (2023). Lab 5—Prototyping Data Connectors. In: Network of Things Engineering (NoTE) Lab. Springer, Cham. https://doi.org/10.1007/978-3-031-20635-1_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-20635-1_8

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-20634-4

  • Online ISBN: 978-3-031-20635-1

  • eBook Packages: EngineeringEngineering (R0)

Publish with us

Policies and ethics