{"id":19006328,"url":"https://github.com/valkyron/complex-event-processing-docker-kafka-flink","last_synced_at":"2026-06-30T00:31:46.072Z","repository":{"id":209264576,"uuid":"723610169","full_name":"valkyron/complex-event-processing-docker-kafka-flink","owner":"valkyron","description":"A software architecture for a complex event processing module has been proposed and implemented for the analysis of data obtained from application virtualization environments.","archived":false,"fork":false,"pushed_at":"2023-11-26T08:28:32.000Z","size":756,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-21T14:24:11.761Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/valkyron.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-11-26T07:59:45.000Z","updated_at":"2023-11-26T08:26:13.000Z","dependencies_parsed_at":"2023-11-26T09:34:47.027Z","dependency_job_id":null,"html_url":"https://github.com/valkyron/complex-event-processing-docker-kafka-flink","commit_stats":null,"previous_names":["valkyron/complex-event-processing-docker-kafka-flink"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/valkyron/complex-event-processing-docker-kafka-flink","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valkyron%2Fcomplex-event-processing-docker-kafka-flink","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valkyron%2Fcomplex-event-processing-docker-kafka-flink/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valkyron%2Fcomplex-event-processing-docker-kafka-flink/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valkyron%2Fcomplex-event-processing-docker-kafka-flink/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valkyron","download_url":"https://codeload.github.com/valkyron/complex-event-processing-docker-kafka-flink/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valkyron%2Fcomplex-event-processing-docker-kafka-flink/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34948227,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-29T02:00:05.398Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-08T18:31:55.378Z","updated_at":"2026-06-30T00:31:46.053Z","avatar_url":"https://github.com/valkyron.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# complex-event-processing-docker-kafka-flink\nA software architecture for a complex event processing module has been proposed and implemented for the analysis of data obtained from application virtualization environments.\n\nThe repo is a paper implementation of [this paper](https://ieeexplore.ieee.org/document/9179215), where we upscale/downscale physical resources of our containers on the basis of CPU, Memory and Network usage.  \n\n### Architecture:\n- Each status data of the containers in Docker technology is obtained in real time via the Docker Engine.\n- We use publish-subscribe based messaging bus (Apache Kafka) for transferring the data. When the module detects a pattern and produces a warning, it publishes the warning message to a Kafka topic and transfers it through the Kafka message transmission channel. \n- Consumed stats messages are analysed using Apache Flink, and instructions can be given to the end user to \"upscale\" or downscale\" on the basis of these usages.\n\n![Image 1](images/arch.PNG) \n\n### Prequisities:\n- Installed Java JDK\n- Docker Desktop\n- Zookeeper \u0026 Kafka 2.13\n- Flink 1.17.1\n- Python packages: confluent_kafka, pyflink, venv\n  \n### Implementation:\n\n- Clone this github repo and cd into it.\n- Docker Containers:\n```\ncd proj\ndocker build -t sensor-image .\ndocker run -d --name sensor1 sensor-image \n```\n\n```\ncd ../proj2\ndocker build -t sensor-image2 .\ndocker run -d --name sensor2 sensor-image2 \n```\n\n- Sensor1: Higher network usage, Sensor2: Higher Memory Usage\n- Start zookeeper and kafka\n- For Windows (new cmd):\n```\n.\\bin\\windows\\zookeeper-server-start.bat .\\config\\zookeeper.properties \n```\nNew cmd:\n```\n.\\bin\\windows\\kafka-server-start.bat .\\config\\server.properties \n```\n\n- For Linux (new terminal):\n```\n.\\bin\\zookeeper-server-start.sh .\\config\\zookeeper.properties\n```\nNew terminal:\n```\nbin/kafka-server-start.sh config/server.properties\n\n```\n\n- Create topics:\n```\nkafka-topics.bat --create --bootstrap-server localhost:9092 --topic docker_stats2\nkafka-topics.bat --create --bootstrap-server localhost:9092 --topic docker_stats2 \n```\n\n- Start Listening:\n```\nkafka-console-consumer.bat --topic docker_stats --bootstrap-server localhost:9092 --from-beginning  \nkafka-console-consumer.bat --topic docker_stats2 --bootstrap-server localhost:9092 --from-beginning  \n```\n\n- Start venv (Windows)\n```\npython -m venv venv\n.\\venv\\Scripts\\activate\npip install confluent-kafka\npython poster.py sensor1 docker_stats\n```\n\nIn new cmd:\n```\npython poster.py sensor1 docker_stats\n```\n\n![Image 2](images/kafka.PNG)\n\n- Start Flink cluster:\n```\nbin/jobmanager.bat start\n```\n\n- Check used resources and jobs in Flink for analytics.\n\n![Image 3](images/flink.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalkyron%2Fcomplex-event-processing-docker-kafka-flink","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalkyron%2Fcomplex-event-processing-docker-kafka-flink","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalkyron%2Fcomplex-event-processing-docker-kafka-flink/lists"}