Fission Kafka - IoT Demo
This sample project is inspired from Yugabyte's IOT fleet management demo. The original example was built using microservice, this demo will transform that into an example which uses Fission functions.
IoT Data Producer: The first function generates data about a fleet of vehicles and their lattitude, longitude, speed, fuel level etc. This function is trigerred every N seconds resembling a sensor sending the data. This function sends this data to the a Kafka topic.
IoT Data Consumer: Second function retrieves data from Kafka topics, runs some transformations and persists into Redis. This function is trigerred for every message in the Kafka topic.
There are 4 more functions which read the data stored in Redis and expose them at REST endpoints.
The Kafka consumer & 4 rest endpoint functions are all in same Spring project and form a single jar archive. The entrypoint for each function is different.
- IOT Web: The last queries the data from rest endpoints and renders using chart.js, HTML & jQuery. This dashboard page itself is a function rendered using python flask & HTML.
The resulting dashboard shows various trends. It also provides a way to invoke the IOT Data producer function which sends data to Kafka
Try it out
Quick Start (TBD)
If you want to quickly setup all the components and try out - run
deploy.sh - the prerequisite is that Kubernetes cluster is setup and Fission is installed.
|Sr. No.||Step details||Link|
|1||Setup Kafka & Redis||Link|
|2||Deploy environments & functions||Link|
|3||Open dashoard & test||Link|