Enabled Vehicle Monitoring with Cloud
Brilliant technology discovered, enabling the OBD system to generate real-time analytics reports, in order to receive all the details on the user or admin device of the vehicle.
With the increasing graph of daily road accidents, our client gave it a thought and then found an idea of creating safety and monitoring model for vehicles. According to the idea, there was a prime requirement of the real-time solutions by assembling all the real-time technologies, and OBD enabled within the vehicle.
Here, the challenge was to retrieve the real-time data of the vehicle from remote locations using OBD devices using the MQTT broker. But, in order to process that actual-time data, we required real-time data pipelines which can be accomplished with Apache Kafka. Also, we experienced a bit of a problem during manipulation of the achieved data with Kafka Stream API that will result in gathering real-time reports from the cloud.
Our team bid the whole concept via designing a system with real-time tools particularly MQTT, Kafka, and Influx DB, with high scalability, real-time monitoring, and security. Using these real-time tools, data could be retrieved, manipulated and stored from each OBD device.
- For communication, through MQTT protocol all the IoT devices will communicate and send messages to the Mosquito broker in order to deliver messages to the subscribers. MQTT brokers will produce the topics and MQTT clients (acting as spring boot-microservices) will subscribe to each one of them.
- Using MQTT Paho client and MQTTAsync Client, MQTT client will receive the subscribed messages in the JSON format.
- These messages in the JSON format are then transformed in the big data format that is AVRO approved by Kafka.
- For internal communication, Kafka producer will generate data and forward it to Kafka broker, the future cluster. Then using Kafka stream, data is manipulated as per requirement in order to forward the Kafka consumers. While manipulation, there is no limitation of producing messages required by microservices.
- There are 6 defined microservices for the model which are individually designed according to the functionality. Device management, Log management, Notification management, Utils, MQTT Client / Kafka Paho, for managing several sets of data.
- According to the requirement of the system, a real-time data managing database was required. Thus, in order to store the data in time sequence implementation of Influx DB is conducted.
- Also, the necessity of implementing Influx DB along with the PostgreSQL, Amazon S3, and elastic search is for managing heavy and complex data storage smoothly.
- Above, where the Kafka consumer was receiving the messages from the IoT device via the MQTT server, Kafka stream plays a vital role.
- With the help of Kafka stream, manipulation of the data become simpler as per our requirement, then forwarded to Kafka,received by Kafka consumer and stored by Influx DB.
- Scaling Kafka brokers and MQTT brokers is possible as per the need, but horizontally only. To process the messages faster, implementation of the partition system in Kafka can be a smart idea. Data replication will be required too, thus InfluxDB Sharding is needed to execute.
The entire OBD system will be responsible for monitoring the vehicle. This implies, features like Parental control as well as sending Alert notifications on the critical conditions on the devices. Thus, now as a parent, you will get to know about vehicle activity such as over speeding, rash driving, traveling across the geofencing, of your child.
Also, you will get the real-time physical health report of the vehicle stating its condition such as change oil, tires, coolant level, servicing period and many more.