{"id":18607333,"url":"https://github.com/addono/otf-infection-chain","last_synced_at":"2025-11-02T15:30:25.311Z","repository":{"id":82277176,"uuid":"254906465","full_name":"Addono/otf-infection-chain","owner":"Addono","description":"An Infection Chain implementation for the OpenTrackingFramework project.","archived":false,"fork":false,"pushed_at":"2020-04-17T12:22:46.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-27T00:27:25.779Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Addono.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-04-11T16:16:25.000Z","updated_at":"2020-04-17T12:22:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"c84ca403-f629-4e3d-b57c-c8a41d802e4e","html_url":"https://github.com/Addono/otf-infection-chain","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Addono%2Fotf-infection-chain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Addono%2Fotf-infection-chain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Addono%2Fotf-infection-chain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Addono%2Fotf-infection-chain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Addono","download_url":"https://codeload.github.com/Addono/otf-infection-chain/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239395788,"owners_count":19631326,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-07T02:29:07.383Z","updated_at":"2025-11-02T15:30:25.278Z","avatar_url":"https://github.com/Addono.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spark Streaming Infection Chain\n\n**TL;DR**: This service listens on a Kafka topic for events containing user contacts and \n\n## Usage\n\nFirst, make sure that there's a Kafka instance running locally, this can be achieved by running:\n\n```bash\ndocker-compose up\n```\n\nThen, start the `src/main/scala/Main` class. This project uses Java 1.8, newer versions will not be compatible with the used Spark version.\n\nTo test it out, we need to produce some messages:\n\n```\nkafka-console-producer --topic contacts --broker-list localhost:9092\n```\n\nAt this point you can send some demo data through the producer shell, e.g. this snippet (submit with shift-enter as to prevent also sending an empty message):\n\n```csv\nuserA,userB,1\nuserC,userD,1\n```\n\nBesides emitting connections, we also need to mark users as infected. To emit infection events, open up a shell with the following command\n```bash\nkafka-console-producer --topic infections --broker-list localhost:9092\n```\n\nHere you can send user IDs to mark users as infected. The value before the comma is the user ID, the value after the comma the timestamp at which they got infected.\n```csv\nuserA,0\n```\n\nWe can open a consumer shell to see the `at_risk` messages arrive\n\n```bash\nkafka-console-consumer --bootstrap-server localhost:9092 --topic at_risk\n```\n\nWhich will give messages formatted as `$userId,$level,$timestamp`, where `$level` is the amount of steps between someone who's infected and the current user.\n\n```csv\nuserA,0,0\nuserB,1,1586705689509\n```\n\n## Test\nTo run the tests, run:\n```bash\nsbt test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faddono%2Fotf-infection-chain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faddono%2Fotf-infection-chain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faddono%2Fotf-infection-chain/lists"}