{"id":21179993,"url":"https://github.com/jkcso/distributed-tradeoffs","last_synced_at":"2025-08-07T21:20:39.885Z","repository":{"id":122705043,"uuid":"145478778","full_name":"jkcso/Distributed-Tradeoffs","owner":"jkcso","description":"A practical evaluation of the iconic distributed algorithms discussed in Christian Cachin's book \"Introduction to Reliable and Secure Distributed Programming\".  Each repo's system incrementally improves its predecessor by adding further functionality.  More info regarding the specifics of each system can be found in README.md.","archived":false,"fork":false,"pushed_at":"2018-08-27T13:22:14.000Z","size":207,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-05T08:11:37.583Z","etag":null,"topics":["distributed-algorithms","distributed-computing"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jkcso.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":"2018-08-20T22:59:31.000Z","updated_at":"2024-11-24T20:48:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"53de61a9-eff8-4d2e-91e7-a6e23c835302","html_url":"https://github.com/jkcso/Distributed-Tradeoffs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jkcso/Distributed-Tradeoffs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkcso%2FDistributed-Tradeoffs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkcso%2FDistributed-Tradeoffs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkcso%2FDistributed-Tradeoffs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkcso%2FDistributed-Tradeoffs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jkcso","download_url":"https://codeload.github.com/jkcso/Distributed-Tradeoffs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkcso%2FDistributed-Tradeoffs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264505239,"owners_count":23618909,"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":["distributed-algorithms","distributed-computing"],"created_at":"2024-11-20T17:35:34.330Z","updated_at":"2025-07-09T23:31:56.774Z","avatar_url":"https://github.com/jkcso.png","language":"Elixir","readme":"# Distributed Algorithms' Tradeoffs \n\n## Inspired from Christian Cachin's book *\"Introduction to Reliable and Secure Programming\"*\n\n## It's all about the learning journey\n\nThis repo's final goal was to achieve a reliable broadcast in asynchronous message-passing distributed system that is subject to process failures.  This implies guarantees that messages are consistently delivered to all processes along with an agreement on the delivered messages.  However, I found more helpful the journey for knowledge towards achieving the aforementioned goal stemming from my interaction with different components and involved algorithms because it made me feel the tradeoffs in performance, message delivery and system correctness.\n\nSpecific information regarding individual system runs can be found inside each system's dedicated folder.  An outline of what each system explores follows:\n\n## System 01\n### BEB (Best Effort Broadcast)\nGiven a list of all processes and a message, a process could send the message to all processes (including itself) with multiple sends, something like:\n\n`for p \u003c- processes, do: send p, message`\n\nSender does not know which processes received the message.  We'll assume (i) messages are unique (e.g. include process-id+seq-no), (ii) no process broadcasts a message twice, (ii) no two processes ever broadcast the same message.\n\n## System 02\n### RB (Reliable Broadcast)\nFor best-effort broadcast, if the sending process crashes during broadcast, then some arbitrary subset of processes will receive the message.  There is no delivery guarantee – processes do not agree on the delivery of the message.  With (regular) reliable broadcast all *correct* processes will agree on the messages they deliver, even if the broadcasting process crashes while sending.  If the broadcasting process crashes before any message is sent, then no message is delivered.\n\n## System 03\n### RB (Eager Reliable Broadcast)\nEvery process re-broadcasts every message it delivers.  If the broadcasting process crashes, the message will be forwarded by other processes using best-effort-broadcast.\n\n## System 04\n### RB (Lazy Reliable broadcast)\nUses best-effort-broadcast, but includes a failure detector component to detect processes that have failed (stopped).  Agreement is derived from (i) the validity property of BEB, (ii) that every correct process forwards every message it delivers when it detects a crashed process and (iii) the properties of PFD. Other properties are as for the Eager RB algorithm.\n\n## System 05\n### PFD (Perfect failure detector)\nProvides processes with a list of suspected processes (detected processes) that have crashed.  Makes timing assumptions (assumes systems are not asynchronous).  Never changes its view – suspected processes remain suspected forever.  Uses PL to exchange heartbeat messages plus a timeout mechanism (Recall PL performs reliable sending for correct processes).  Delay for timeout needs to be large enough for sending to all processes, processing at receiving processes and all replies back.  After a timeout, any process from which a reply has not been received is considered crashed, even it is alive and the reply message arrived after the timeout.\n\n## System 06\n### URB (Uniform Reliable Broadcast)\nValidity, No Duplication and No Creation properties are the same as best effort broadcast and regular reliable broadcast.  If a process delivers message M then every correct process will also deliver M.  Implies a set of messages delivered by a faulty process is always a subset of messages delivered by a correct process (stronger guarantee).\n\n## System 07\n### URB (Majority-Ack Uniform Reliable Broadcast)\n(URB) Deliver message only after the message has been beb-delivered by a majority (quorum) of processes.  The majority contains at least one correct process.  Fail-silent algorithm where process crashes are not reliably detected.\n\n## Note\nPart of my work is intentionally broken or misleading to avoid disrespectful people from copying and pasting.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkcso%2Fdistributed-tradeoffs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjkcso%2Fdistributed-tradeoffs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkcso%2Fdistributed-tradeoffs/lists"}