Prototype of forecast service that uses machine learning to deliver forecasts
APACHE-2.0 License
Infinity is a prototype of cloud-agnostic forecasting platform inspired by Amazon Forecast service. Project was created as a part of the DataStax Hackathon aka ✨ASTRAKATHON✨ and won the first place.
Demo application to present results (infinity-rest). User could upload CSV files with data for analysis and check results. Implemented with Vue.js and Chart.js. See screenshots.
API to interact with the system (infinity-rest). Implemented with Quarkus and Cassandra extension.
Data processing application (infinity-processor). Includes three consumer groups to retrieve events from Kafka and store into Cassandra tables. Implemented with Quarkus and Apache Camel.
Data analytics application (infinity-analytics) Aggregates events by SECOND, MINUTE, HOUR, DAY, MONTH and YEAR and calculate AVG, MIN, MAX, MEAN, SUM, COUNT for event values.
Forecast values for aggregated values for all horizons. Current version provides predictions with ARIMA algorithm for six steps. Implemented with Spark and Apache Camel.
Event store in CQRS architecture
Database for events, aggregations and predictions. Tables:
Init container to create Cassandra keyspace and tables (infinity-init)
Requires Git, Docker and Docker Compose installed.
git clone [email protected]:mgubaidullin/infinity.git
docker-compose build
docker-compose up
Application is ready to use after following line in the log: infinity-init exited with code 0
Open following link in browser http://localhost:8080
Upload file with events
curl -i -X POST -H "Content-Type: multipart/form-data" -F "[email protected]" http://localhost:8080/file
Start analytics for special event group and type
curl -X POST "http://0.0.0.0:8080/analytic" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"eventGroup\":\"Quebec\",\"eventType\":\"Trucks\"}"
Retrieve aggregations
curl -X GET "http://0.0.0.0:8080/analytic/aggregation/Quebec/Trucks/YEARS/2020" -H "accept: application/json"
Retrieve predictions
curl -X GET "http://0.0.0.0:8080/analytic/prediction/Quebec/Trucks/ARIMA/YEARS/2025" -H "accept: application/json"
Swagger UI for API http://localhost:8080/swagger-ui