{"id":20862861,"url":"https://github.com/debasish-dutta/distributed-systems-algorithims","last_synced_at":"2026-04-26T01:31:58.240Z","repository":{"id":112055380,"uuid":"570019854","full_name":"debasish-dutta/distributed-systems-algorithims","owner":"debasish-dutta","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-07T15:06:02.000Z","size":52,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-30T09:59:27.894Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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/debasish-dutta.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":"2022-11-24T06:39:52.000Z","updated_at":"2025-07-04T01:18:44.000Z","dependencies_parsed_at":"2024-11-18T05:29:09.126Z","dependency_job_id":"8531ac67-d061-4aff-858c-510a5338b46b","html_url":"https://github.com/debasish-dutta/distributed-systems-algorithims","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/debasish-dutta/distributed-systems-algorithims","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debasish-dutta%2Fdistributed-systems-algorithims","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debasish-dutta%2Fdistributed-systems-algorithims/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debasish-dutta%2Fdistributed-systems-algorithims/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debasish-dutta%2Fdistributed-systems-algorithims/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/debasish-dutta","download_url":"https://codeload.github.com/debasish-dutta/distributed-systems-algorithims/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debasish-dutta%2Fdistributed-systems-algorithims/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32283294,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"ssl_error","status_checked_at":"2026-04-25T18:29:32.149Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-18T05:26:16.267Z","updated_at":"2026-04-26T01:31:58.225Z","avatar_url":"https://github.com/debasish-dutta.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Distributed systems algorithims\n## Clock Sync Algorithms\n\n### Physical Clocks\n- Physical clocks are hardware-based timekeeping devices.\n- They provide real-time measurements based on oscillators or crystal oscillators.\n- Physical clocks may not be perfectly synchronized due to clock drift, causing time inconsistencies in distributed systems.\n\n#### 1. Network Time Protocol\n- **Overview**: NTP is a widely-used protocol for clock synchronization in distributed systems.\n- **Function**: It adjusts clock values to account for network delays and clock drifts.\n- **Use Cases**: NTP is suitable for general-purpose clock synchronization where high precision is not required.\n- **Implementation**: NTP involves a hierarchical structure of time servers and clients to achieve synchronization.\n![ntp](https://i.imgur.com/HfKPnZzm.png)\n\n#### 2. Christian's Clock\n- **Overview**: Christian's algorithm is a simple clock synchronization algorithm.\n- **Function**: It calculates the offset between a client's clock and a time server's clock, assuming symmetric network delays.\n- **Use Cases**: Christian's algorithm is suitable for basic clock synchronization in distributed systems.\n![cristan](https://i.imgur.com/3bURIU7.png)\n\n#### 3. Berkeley Clock\n- **Overview**: The Berkeley algorithm is used for clock synchronization in loosely coupled distributed systems.\n- **Function**: It employs a master-slave architecture, where a master node collects time information from slave nodes and adjusts their clocks.\n- **Use Cases**: Berkeley algorithm is appropriate when a centralized approach is acceptable.\n![berkeley](https://i.imgur.com/dtmwkMz.png)\n\n### Logical Clocks\n- Logical clocks are logical constructs used to order events in a distributed system.\n- They do not rely on physical time but provide a logical order for events.\n- Logical clocks help in establishing causal relationships and ensuring event consistency in distributed systems.\n\n#### 1. Lamport Clock\n- **Overview**: Lamport clocks are logical clocks introduced by Leslie Lamport.\n- **Function**: They provide a partial ordering of events in a distributed system, based on causality.\n- **Use Cases**: Lamport clocks are useful for reasoning about event ordering and causal relationships in distributed systems.\n![lamport](https://i.imgur.com/C9P45yS.png)\n\n#### 2. Vector Clock\n- **Overview**: Vector clocks extend Lamport clocks for more complex event ordering.\n- **Function**: They maintain a vector of clocks, one per process, to capture dependencies between events.\n- **Use Cases**: Vector clocks are suitable for applications where understanding concurrent events and their relationships is crucial.\n![vector](https://i.imgur.com/l2h7BNm.png)\n\n## Implementation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdebasish-dutta%2Fdistributed-systems-algorithims","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdebasish-dutta%2Fdistributed-systems-algorithims","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdebasish-dutta%2Fdistributed-systems-algorithims/lists"}