{"id":15013853,"url":"https://github.com/mgubaidullin/infinity","last_synced_at":"2026-03-27T07:09:04.212Z","repository":{"id":92156793,"uuid":"286887809","full_name":"mgubaidullin/infinity","owner":"mgubaidullin","description":"Prototype of forecast service that uses machine learning to deliver forecasts","archived":false,"fork":false,"pushed_at":"2020-08-26T19:47:58.000Z","size":3552,"stargazers_count":21,"open_issues_count":1,"forks_count":15,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-28T02:42:17.998Z","etag":null,"topics":["camel","cassandra","chartjs","java","kafka","quarkus","spark","vuejs"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mgubaidullin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-12T01:38:29.000Z","updated_at":"2023-08-21T00:52:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"2e984d82-6e9f-4f63-a594-a1b31855cc11","html_url":"https://github.com/mgubaidullin/infinity","commit_stats":{"total_commits":36,"total_committers":1,"mean_commits":36.0,"dds":0.0,"last_synced_commit":"3c0b019fd2613678c1ae7ce5b8a2626d58e6ae32"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mgubaidullin/infinity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgubaidullin%2Finfinity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgubaidullin%2Finfinity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgubaidullin%2Finfinity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgubaidullin%2Finfinity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mgubaidullin","download_url":"https://codeload.github.com/mgubaidullin/infinity/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgubaidullin%2Finfinity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31032127,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-27T06:08:13.374Z","status":"ssl_error","status_checked_at":"2026-03-27T06:08:07.217Z","response_time":164,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["camel","cassandra","chartjs","java","kafka","quarkus","spark","vuejs"],"created_at":"2024-09-24T19:44:51.373Z","updated_at":"2026-03-27T07:09:04.180Z","avatar_url":"https://github.com/mgubaidullin.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Infinity\n\n![Build](https://img.shields.io/badge/Build_with-Fun-orange.svg?style=for-the-badge)\n![Java](https://img.shields.io/badge/-Java-orange.svg?style=for-the-badge\u0026logo=java)\n![Quarkus](https://img.shields.io/badge/-Quarkus-orange.svg?style=for-the-badge\u0026logo=quarkus)\n![Camel](https://img.shields.io/badge/-Camel-orange.svg?style=for-the-badge)\n![Cassandra](https://img.shields.io/badge/-Cassandra-orange.svg?style=for-the-badge\u0026logo=apache-cassandra)\n![Kafka](https://img.shields.io/badge/-Kafka-orange.svg?style=for-the-badge\u0026logo=apache-kafka)\n![Spark](https://img.shields.io/badge/-Spark-orange.svg?style=for-the-badge\u0026logo=apache-spark)\n![Vue](https://img.shields.io/badge/-Vue-orange.svg?style=for-the-badge\u0026logo=vue.js)\n![License](https://img.shields.io/badge/License-Apache-green.svg?style=for-the-badge\u0026logo=apache)\n\nInfinity is a prototype of cloud-agnostic forecasting platform inspired by Amazon Forecast service.   \nProject was created as a part of the DataStax Hackathon aka ✨[ASTRAKATHON](https://github.com/DataStax-Academy/cassandra-workshop-series/blob/master/week4-AppDev-api/HACKATHON.MD)✨ and won the first place.\n\n \n## Requirements\n- User should be able to upload dataset file\n- User should be able to publish events through an API\n- User should be able to view uploaded data\n- User should be able to start analysis (aggregations and predictions)\n- User should be able to view aggregations and predictions as tables and charts \n- System should store events permanently\n- System should store aggregations permanently\n- System should store predictions permanently\n- System should be horizontally scalable\n\n![How it works](img/how-it-works.png)\n \n\n## Architecture\n![Architecture](img/architecture.png)\n\n### Components\n#### WebUI\nDemo application to present results (infinity-rest).  \nUser could upload CSV files with data for analysis and check results.  \nImplemented with Vue.js and Chart.js. See [screenshots](#user-interface). \n\n#### REST services\nAPI to interact with the system (infinity-rest).   \nImplemented with Quarkus and Cassandra extension.\n\n#### Processor\nData processing application (infinity-processor).  \nIncludes three consumer groups to retrieve events from Kafka and store into Cassandra tables.  \nImplemented with Quarkus and Apache Camel.\n\n#### Analytics\nData analytics application (infinity-analytics)  \nAggregates events by SECOND, MINUTE, HOUR, DAY, MONTH and YEAR  \nand calculate AVG, MIN, MAX, MEAN, SUM, COUNT for event values.  \n\nForecast values for aggregated values for all horizons.  \nCurrent version provides predictions with ARIMA algorithm for six steps.  \nImplemented with Spark and Apache Camel.\n\n#### Kafka\nEvent store in CQRS architecture  \n\n#### Cassandra\nDatabase for events, aggregations and predictions.  \nTables:\n- EVENTS_BY_ID\n- EVENTS_BY_TIMESTAMP\n- EVENTS_BY_TIME\n- AGGREGATIONS\n- PREDICTIONS\n\n#### Init\nInit container to create Cassandra keyspace and tables (infinity-init)\n\n## Build and run\nRequires Git, Docker and Docker Compose installed.\n```\ngit clone git@github.com:mgubaidullin/infinity.git\ndocker-compose build\ndocker-compose up\n```\nApplication is ready to use after following line in the log: `infinity-init exited with code 0`  \n\n## Execute\n\n### User Interface\nOpen following link in browser `http://localhost:8080`\n\n#### Upload data\n- Select file (quebec.csv) and click 'Upload' button\n\n![Data](img/data.png)\n\n- Refresh page to review results (processing might take 5 seconds)\n\n![Data with values](img/data-values.png)\n\n- Click 'Analyze' button to start aggregation and forecast\n- Go to Aggregations page to review aggregation results (analysis might take 20 seconds)\n\n![Aggregations](img/aggregations.png)\n\n- Go to Predictions page to review predictions results\n\n![Predictions](img/predictions.png)\n\n- Go to Chart page to compare facts and forecast\n\n![Chart](img/chart.png)\n\n\n### Command line\nUpload file with events\n```\ncurl -i -X POST -H \"Content-Type: multipart/form-data\" -F \"file=@quebec.csv\" http://localhost:8080/file\n```\nStart analytics for special event group and type\n```\ncurl -X POST \"http://0.0.0.0:8080/analytic\" -H  \"accept: application/json\" -H  \"Content-Type: application/json\" -d \"{\\\"eventGroup\\\":\\\"Quebec\\\",\\\"eventType\\\":\\\"Trucks\\\"}\"\n```\nRetrieve aggregations\n```\ncurl -X GET \"http://0.0.0.0:8080/analytic/aggregation/Quebec/Trucks/YEARS/2020\" -H  \"accept: application/json\"\n```\nRetrieve predictions\n```\ncurl -X GET \"http://0.0.0.0:8080/analytic/prediction/Quebec/Trucks/ARIMA/YEARS/2025\" -H  \"accept: application/json\"\n```\n\n### Swagger\nSwagger UI for API `http://localhost:8080/swagger-ui`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgubaidullin%2Finfinity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgubaidullin%2Finfinity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgubaidullin%2Finfinity/lists"}