{"id":17886967,"url":"https://github.com/riteshghorse/gossiprpc","last_synced_at":"2025-08-15T00:33:06.333Z","repository":{"id":52188956,"uuid":"354637121","full_name":"riteshghorse/gossipRPC","owner":"riteshghorse","description":"Fault Detection in Distributed System using Gossip Protocols. Team: Ritesh Ghorse, Shreyas Muralidhara, Tanvi Pandit.","archived":false,"fork":false,"pushed_at":"2021-05-06T22:47:09.000Z","size":1184,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-28T15:23:26.967Z","etag":null,"topics":["cassandra","distri","fault-detection","flask-application","gossip-protocol","python3","rpc","xmlrpc"],"latest_commit_sha":null,"homepage":"","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/riteshghorse.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}},"created_at":"2021-04-04T20:10:50.000Z","updated_at":"2022-06-21T20:35:10.000Z","dependencies_parsed_at":"2022-08-27T14:47:26.293Z","dependency_job_id":null,"html_url":"https://github.com/riteshghorse/gossipRPC","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riteshghorse%2FgossipRPC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riteshghorse%2FgossipRPC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riteshghorse%2FgossipRPC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riteshghorse%2FgossipRPC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/riteshghorse","download_url":"https://codeload.github.com/riteshghorse/gossipRPC/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229880737,"owners_count":18138641,"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":["cassandra","distri","fault-detection","flask-application","gossip-protocol","python3","rpc","xmlrpc"],"created_at":"2024-10-28T13:16:26.088Z","updated_at":"2024-12-15T21:45:10.764Z","avatar_url":"https://github.com/riteshghorse.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fault Detection in Distributed Systems using Gossip Protocols\n\n## Developed by: [Ritesh Ghorse](https://github.com/riteshghorse), [Shreyas Muralidhara](https://github.com/shreyas-muralidhara), [Tanvi Pandit](https://github.com/tunveyyy)\n\n- This project is an implementation of 4 Gossip protocols for failure detection in distributed system: Random Gossip, Round Robin Gossip, Binary Round Robin Gossip, Sequence Check Round Robin.\n\n- Implementation is in Python3.\n\n- XMLRPC is used for communication.\n\n- Each docker container serve as a different node.\n\n\n\n## Module Developers\n1. XMLRPC setup: Ritesh Ghorse\n2. 3- way handshake  - Shreyas Muralidhara\n3. Random Gossip - Tanvi Pandit\n4. Binary Round Robin - Ritesh Ghorse\n5. Round Robin and Sequence Check Round Robin: Shreyas Muralidhara\n6. Monitoring Node: Ritesh Ghorse\n7. Provider Node: Shreyas Muralidhara\n8. Docker Containers: Tanvi Pandit\n9. Flask app: Tanvi Pandit\n10. Test Cases: Each of ous tested our implemented protocols. Sequence Check was divided evenly for test cases.\n\n\n## System Architecture and Gossip Protocols\n**System Architecture:** ![image](https://user-images.githubusercontent.com/39837416/117369409-dfe95080-ae92-11eb-8087-a634f237230f.png)  \n\n**Random Gossip:**\n![](Protocol-gifs/Random.gif)\n\n**Round Robin Gossip:**\n![](Protocol-gifs/Round_Robin.gif)\n\n**Binary Round Robin Gossip:**\n![](Protocol-gifs/Binary_Round_Robin.gif)\n\n\n## Sample commands for running 8-node system\n```\ndocker exec -u root -it monitor-node /bin/bash\npython Monitoring_Node.py --config config_files/monitor.json\n```\n\n```\ndocker exec -it provider-node /bin/bash\npython Provider_Node.py --config config_files/provider.json --version random\n```\n\n```\ndocker exec -u root -it node1 /bin/bash\npython gossip_server.py --config config_files/config1.json\n\n```\n\n```\ndocker exec -u root -it node2 /bin/bash\npython gossip_server.py --config config_files/config2.json\n```\n\n\n```\ndocker exec -u root -it gossiprpc_node_3 /bin/bash\npython gossip_server.py \n```\n\n```\ndocker exec -u root -it gossiprpc_node_4 /bin/bash\npython gossip_server.py \n```\n\n```\ndocker exec -u root -it gossiprpc_node_5 /bin/bash\npython gossip_server.py\n```\n\n```\ndocker exec -u root -it gossiprpc_node_6 /bin/bash\npython gossip_server.py\n```\n\n```\ndocker exec -u root -it gossiprpc_node_7 /bin/bash\npython gossip_server.py\n```\n\n\n```\ndocker exec -u root -it gossiprpc_node_8 /bin/bash\npython gossip_server.py\n```\n\n### Test Case 1: Single Node Failure\n- Terminate one node by hitting \"Ctrl+C\" on one of the running node.\n- Immideately enter 1 on the Monitoring Node terminal.\n- It will write out the results in \"results.txt\" file once it reaches consensus.\n\n\n### Test Case 2: Single Node Failure\n- Terminate two nodes simultaneously by hitting \"Ctrl+C\" on two of the running nodes.\n- Immideately enter 2 on the Monitoring Node terminal.\n- It will write out the results in \"results.txt\" file once it reaches consensus.\n\n\n### Test Case 3: Dead Node becomes Alive\n- Start the previously terminated node again.\n- Immideately enter 3 on the Monitoring Node terminal.\n- It will write out the results in \"results.txt\" file once it reaches consensus.\n\n\n\n## Steps for running Docker-Compose\n\n1. ### Build image of the application\n    ```\n    docker build -t gossip \u003cpath-to-Dockerfile\u003e\n    ```\n1. ### Spin up the containers\n    * When doing it for the first time\n    ```\n    docker-compose up -d --build --scale node=\u003cno of containers to spin apart from seed nodes\u003e\n    ```\n    * For subsequent runs when the image is the same\n    ```\n    docker-compose up -d --scale node=\u003cno of containers to spin apart from seed nodes\u003e\n    ```\n\n2. ### Entering into the container\n\n    ```\n    sudo docker exec -it \u003ccontainer-name\u003e /bin/bash\n    ```\n\n3. ### Adding a new container into the network without docker-compose\n\n    * Make sure you create an image for the code beforehand\n\n    ```\n        docker build -t gossip \u003cpath-to-Dockerfile\u003e\n    ```\n\n    * Run the container\n\n    ```\n        docker run -it --name \u003ccontainer-name-optional\u003e --network gossip_network gossip\n    ```\n\n## Running as standalone docker containers\n\n1.\n    * docker build -t gossip . -\u003e builds docker image\n    * docker network create --driver bridge gossip-network -\u003e creates network\n\n2.\n    * docker run -it --name monitor-node --network gossip-network gossip -\u003e run the docker image\n    * Inside the terminal\n\n    ```\n    app_user@bd390faf66db:~$ python Monitoring_Node.py --config ./config/monitor.json \n    ```\n\n    -\u003e this is like a new terminal use it as monitor-node\n\n3. Provider Node\n   * docker run -it --name provider-node --network gossip-network gossip -\u003e run the docker image\n   Inside the terminal\n\n   ```\n   app_user@bd390faf66db:~$ python Provider_Node.py --config ./config/provider.json \n   ```\n\n   -\u003e this is like a new terminal use it as provider-node\n\n4. New terminal for node 1\n   * docker run -it --name node1 --network gossip-network gossip\n   * Inside the terminal\n\n   ```\n   app_user@bd390faf66db: python gossip_server.py --config ./config/config1.json\n   ```\n\n5. New terminal for node 2\n   * docker run -it --name node2 --network gossip-network gossip\n   * Inside the terminal\n\n   ```\n   app_user@bd390faf66db: python gossip_server.py --config ./config/config1.json\n   ```\n\n6. Normal node\n   * docker run -it --network gossip-network gossip\n   * Inside the terminal app_user@bd390faf66db: python gossip_server.py\n\n7.\n    * docker rm $(docker ps --filter name=node\\* -aq) --\u003e kill the docker dameon running earlier\n\n## Remove all the  containers\n```\ndocker-compose down\n```\n\n## Stop all the exited containers\n```\ndocker stop $(docker ps --filter status=running -q)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friteshghorse%2Fgossiprpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Friteshghorse%2Fgossiprpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friteshghorse%2Fgossiprpc/lists"}