This combat simulator is meant to be a technical summary of my work with IoT devices. During my time at this position we used Java to facilitate with various data-buses reading time series datapoints, and to better facilitate testing, I wrote a Java based data simulator similar to that of this project. The original implementation would have data producers send data to a single ActiveMQ broker on a destination server, where it was then processed from the queue and written to a SQL database for partitioning and analytics. Towards the end of my time at this position we discussed instead a redesign to sending to Kafka topics to improve horizontal scaling opportunities, and writing to InfluxDB which was more specialized for handling time series data. To act as the ETL between Kafka and Influx we had investigating using StreamSets pipelines, and finally data was rendered real time in Grafana.
This project dockerizes that whole stack, and uses a Pokemon-esque combat simulator to generate time series data. In this dataset, you’ll see health and mana of my World of Warcraft paladin Sevrielle fighting in a team with Ursoc against some murlocks. The data is randomized, but generally Sevrielle should win in the simulation.
As a note, this project was recently updated to some new docker image versions. StreamSets was acquired by IBM since I’ve last used it, and no longer offered the free hosted docker image I used originally.
Run it for yourself!
Everything comes up under a single docker-compose stack. Grafana should be pre-provisioned from source control so the dashboard exists on first boot rather than being clicked together by hand. StreamSets runs from a custom image with its own entrypoint, and its pipelines are importable from an archive committed alongside the code. This does mean there’s a manual step to actually transferring the data into Influx for the user, but was unavoidable and the step is described in the README document.
Re-running the simulation JAR inside its container fires another battle into the same pipeline, so the dashboard can be watched under repeated load rather than a single run.
