{"id":18366417,"url":"https://github.com/aveek-saha/paxos-db","last_synced_at":"2025-07-31T00:08:17.882Z","repository":{"id":236337433,"uuid":"792401533","full_name":"Aveek-Saha/paxos-db","owner":"Aveek-Saha","description":"A distributed key value store using multi paxos to achieve consensus","archived":false,"fork":false,"pushed_at":"2024-04-26T20:49:22.000Z","size":459,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T17:00:48.345Z","etag":null,"topics":["key-value","kv-store","kvstore","multi-paxos","paxos","paxos-algorithm","paxos-java","paxos-protocol"],"latest_commit_sha":null,"homepage":"","language":"Java","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/Aveek-Saha.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":"2024-04-26T15:38:53.000Z","updated_at":"2024-10-12T18:21:08.000Z","dependencies_parsed_at":"2024-04-26T16:55:23.657Z","dependency_job_id":"bf3699f6-8a1a-4017-bed0-846f7802c0f0","html_url":"https://github.com/Aveek-Saha/paxos-db","commit_stats":null,"previous_names":["aveek-saha/paxos-db"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Aveek-Saha/paxos-db","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aveek-Saha%2Fpaxos-db","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aveek-Saha%2Fpaxos-db/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aveek-Saha%2Fpaxos-db/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aveek-Saha%2Fpaxos-db/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aveek-Saha","download_url":"https://codeload.github.com/Aveek-Saha/paxos-db/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aveek-Saha%2Fpaxos-db/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267962811,"owners_count":24172750,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"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":["key-value","kv-store","kvstore","multi-paxos","paxos","paxos-algorithm","paxos-java","paxos-protocol"],"created_at":"2024-11-05T23:17:34.944Z","updated_at":"2025-07-31T00:08:17.811Z","avatar_url":"https://github.com/Aveek-Saha.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Paxos Db\n\nA replicated key value store that achieves consensus using multi-paxos.\n\n## Features\n\n- Three types of operations can be performed on the server with the following parameters:\n    - PUT (key, value) \n    - GET (key) \n    - DELETE (key) \n- These operations are performed on a key value store.\n- Server is multi threaded and can respond to multiple clients at a time. \n- Client and servers communicate using RPC.\n- The server is replicated across multiple instances.\n- Replicas should be fault tolerant.\n- Paxos is used for fault tolerant consensus.\n- Replicas implement Paxos roles like the Proposers,  Acceptors, and Learners.\n- Clients can sent requests to any of the replicas.\n- Only the replica that receives a client becomes the proposer for that round of paxos.\n- A coordinator is present only for facilitating the discovery of all replicas. \n\n\n## Running instructions\n\nThe project uses `maven` for building. This project MUST be run with `Docker` or `Docker Compose` which will create a coordinator and the specified number of server replicas.\n\n### Run with Docker\nDocker can be used along with the shell scripts.\n\n```sh\n# This script will build and start the coordinators and servers and then display logs from the coordinator\n./deploy.sh\n\n# To view logs from any of the 5 servers\ndocker logs server-\u003c1-5\u003e -f\n\n# Run the client\n./run_client.sh server-\u003c1-5\u003e \u003c5001-5005\u003e\n```\n\n### Run with Docker Compose\nYou can also use docker compose to set it up\n\n```sh\n# Run the docker compose command\n# This will create the network, start the coordinator and the specified number of replicas\ndocker compose up\n\n# Run: 'docker compose down' when you want to remove the resources created above \n\n# Build client image\ndocker build -f client.Dockerfile -t client-img --target client-build .\n\n# Run client container\ndocker run -it --rm --name client-con-1 --network project4_default client-img java -jar /app/client.jar project4-server-3 5001\n\n# If the above command doesnt work (it didn't work for me on windows git bash) try this one\n# docker run -it --rm --name client-con-1 --network project4_default client-img java -jar //app//client.jar project4-server-3 5001\n```\n\nIf you want to change the number of replicas edit `compose.yaml` and rerun the commands.\n\n```Dockerfile\nreplicas : 10\n```\n\nTo change the ports that the servers run on you can also edit `compose.yaml`\n\n```Dockerfile\ncoordinator:\n    ...\n    entrypoint: java -jar /app/server.jar c \u003ccoordinator port\u003e\n    ports:\n        - \"\u003ccoordinator port\u003e:\u003ccoordinator port\u003e\"\n    ...\n\nserver:\n    ...\n    entrypoint: java -jar /app/server.jar coordinator \u003ccoordinator port\u003e \u003cserver port\u003e\n    ports:\n        - target: \u003cserver port\u003e\n    ...\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faveek-saha%2Fpaxos-db","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faveek-saha%2Fpaxos-db","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faveek-saha%2Fpaxos-db/lists"}