{"id":13412552,"url":"https://github.com/andy2046/failured","last_synced_at":"2025-07-27T19:36:17.649Z","repository":{"id":57620553,"uuid":"389589955","full_name":"andy2046/failured","owner":"andy2046","description":"Adaptive Accrual Failure Detector","archived":false,"fork":false,"pushed_at":"2021-08-02T03:08:02.000Z","size":30,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T00:14:56.990Z","etag":null,"topics":["accrual-failure-detector","adaptive","failure-detection"],"latest_commit_sha":null,"homepage":"https://github.com/andy2046/failured","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andy2046.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}},"created_at":"2021-07-26T10:11:01.000Z","updated_at":"2024-12-20T16:37:10.000Z","dependencies_parsed_at":"2022-09-02T16:35:49.416Z","dependency_job_id":null,"html_url":"https://github.com/andy2046/failured","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andy2046%2Ffailured","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andy2046%2Ffailured/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andy2046%2Ffailured/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andy2046%2Ffailured/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andy2046","download_url":"https://codeload.github.com/andy2046/failured/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647274,"owners_count":21139086,"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":["accrual-failure-detector","adaptive","failure-detection"],"created_at":"2024-07-30T20:01:26.010Z","updated_at":"2025-04-13T00:15:01.795Z","avatar_url":"https://github.com/andy2046.png","language":"Go","readme":"# Adaptive Accrual Failure Detector\n\n[![Documentation](https://godoc.org/github.com/andy2046/failured?status.svg)](http://godoc.org/github.com/andy2046/failured)\n[![GitHub issues](https://img.shields.io/github/issues/andy2046/failured.svg)](https://github.com/andy2046/failured/issues)\n[![license](https://img.shields.io/github/license/andy2046/failured.svg)](https://github.com/andy2046/failured/LICENSE)\n[![Release](https://img.shields.io/github/release/andy2046/failured.svg?label=Release)](https://github.com/andy2046/failured/releases)\n\n----\n\n## There is NO perfect failure detector.\n\n## It's a trade-off between completeness and accuracy.\n\n## Failure detection is not a binary value.\n\nThis is an implementation of a failure detector that uses\nan adaptive accrual algorithm. The theory of this failure detector is taken from the paper\n[A New Adaptive Accrual Failure Detector for Dependable Distributed Systems](https://dl.acm.org/citation.cfm?id=1244129).\n\nThis failure detector is useful for detecting connections failures between nodes in distributed systems.\n\nfor documentation, view the [API reference](./doc.md)\n\n\n## Install\n\n```\ngo get github.com/andy2046/failured\n```\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"time\"\n\n\t\"github.com/andy2046/failured\"\n)\n\nfunc main() {\n\tfd := failured.New()\n\tcloser := make(chan struct{})\n\n\t// call RegisterHeartbeat every second\n\tgo func() {\n\t\tfor {\n\t\t\tselect {\n\t\t\tcase \u003c-closer:\n\t\t\t\treturn\n\t\t\tdefault:\n\t\t\t}\n\n\t\t\ttime.Sleep(time.Second)\n\t\t\tfd.RegisterHeartbeat()\n\t\t}\n\t}()\n\n\ttime.Sleep(3 * time.Second)\n\tclose(closer)\n\n\t// check FailureProbability\n\tp := fd.FailureProbability()\n\tprintln(\"failure probability is\", p)\n}\n```\n","funding_links":[],"categories":["Distributed Systems","Relational Databases","分布式系统"],"sub_categories":["Search and Analytic Databases","Advanced Console UIs","检索及分析资料库"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandy2046%2Ffailured","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandy2046%2Ffailured","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandy2046%2Ffailured/lists"}