Containerizing Real-Time IoT Machine Learning Solutions with Docker, TML, Kafka, TMUX, and Python
Sebastian Maurice, Ph.D.
Global AI and Machine Learning Leader | Teacher | Inventor | Author | Blogger | Coder
The world of the Internet of Things (IoT) is growing rapidly especially as more devices and objects like bulbs, vacuum cleaners, cars, clothes, heavy equipment, routers, tires, engines, phones, pumps, HVAC, and many more devices get sensored up and produce real-time data. This real-time data, or data streams, contains valuable information on device characteristics, device health, telemetry, network information, security information, and other information.
Real-time IoT solutions are built to process this information to help humans or other machines make decisions from the outcomes of this processing and machine learning. The decisions made can be very useful to identify devices that are not functioning properly, or device that are about to fail. Using Transactional Machine Learning (TML) with Apache Kafka enables us to process large amounts of real-time data to provide predictive information for every device in real-time. Using TML and Kafka, each device can be individually analysed with its own Machine Learning model and with advanced processing algorithms; this means, even if there are 100 million IoT devices producing data, TML and Kafka can build 100 million machine learning model for each device in-memory.
Using TML and Kafka, each device can be individually analysed with its own Machine Learning model and with advanced processing algorithms. this means, even if there are 100 million IoT devices producing data, TML can build 100 million machine learning models for each device in-memory (no database required, only Kafka).
The ability to process large amounts of data from IoT devices, with advanced, in-memory, processing, we can not only build large scale IoT solutions, but also deploy them very quickly with Docker and Kubernetes in any operating system, for any Chip Architecture with Cloud or without Cloud.
So, let start.
An IoT Docker container has been built that provides the ENTIRE IoT solution. This container analyses IoT data streams using Apache Kafka, TML technologies, and provides a streaming visualization dashboard: https://hub.docker.com/r/maadsdocker/seneca-iot-tml-kafka-amd64
This container has the following technologies installed:
Anyone who has Docker engine installed can run the container very easily. Do the following:
领英推荐
If you are running Docker daemon and run into issues with Docker try the follow:
Note the URL in 3 - we are exposing port 9005 in Docker run - which means we are mapping the host port 9005 to port 9005 in the container. Just paste this URL in your browser, and in a few moments after the container is running you will see a streaming dashboard:
These dashboards are streaming data from the running container. So, what have we accomplished? Here it is:
Having the ability to run large IoT solutions using Containers, Kafka, TML and TMUX opens up tremendous opportunities to build similar solutions with relative ease and quickly deploy them in almost any environment with or without cloud.
Till next time...