Creating services to monitor your devices in real time using GPS
In our use case, we are going to deploy a service that sends data from our edge device after some processing in the cloud. The goal of this use case is to have a global geolocation system for multiple vehicles delivering packages, showing their location in real time. For this, we are going to create a gps-server
deployment that stores all the coordinates for our units in Redis and Mongo. We are going to use the Python Flask library to create this service. Let’s explore the main sections of the following pseudocode mixed with Python:
<imported libraries> <app_initialization> <CORS configuration> def redisCon(): <return Redis connection object> @app.route("/client/<cid>/position", methods=["POST"]) def setPosition(cid): <Call redisCon> <Store of data in a Redis hash data type using the fields...