{"id":21959142,"url":"https://github.com/ldmtam/raft-auto-increment","last_synced_at":"2025-04-23T17:27:22.012Z","repository":{"id":185495178,"uuid":"230569282","full_name":"ldmtam/raft-auto-increment","owner":"ldmtam","description":"Distributed, fault-tolerant, persistent,  auto-increment ID generation service with Raft consensus","archived":false,"fork":false,"pushed_at":"2024-01-21T09:24:49.000Z","size":87,"stargazers_count":25,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-30T01:51:47.554Z","etag":null,"topics":["autoincrement","badger","bitcask","distributed-systems","fault-tolerance","golang","raft-consensus"],"latest_commit_sha":null,"homepage":"","language":"Go","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/ldmtam.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,"governance":null}},"created_at":"2019-12-28T06:32:17.000Z","updated_at":"2024-10-09T04:41:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"95697f0d-73e2-4988-838d-999279325b78","html_url":"https://github.com/ldmtam/raft-auto-increment","commit_stats":null,"previous_names":["ldmtam/raft-auto-increment"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldmtam%2Fraft-auto-increment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldmtam%2Fraft-auto-increment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldmtam%2Fraft-auto-increment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldmtam%2Fraft-auto-increment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ldmtam","download_url":"https://codeload.github.com/ldmtam/raft-auto-increment/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250479584,"owners_count":21437388,"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":["autoincrement","badger","bitcask","distributed-systems","fault-tolerance","golang","raft-consensus"],"created_at":"2024-11-29T09:20:35.856Z","updated_at":"2025-04-23T17:27:21.991Z","avatar_url":"https://github.com/ldmtam.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Raft Auto Increment\nDistributed, fault-tolerant, persistent, auto-increment ID generation service with Raft consensus.\n\nSupport both `REST API` and `gRPC` protocol.\n\nSupport different storage for Raft log: `Bitcask` and `Badger` via `--storage` flag\n\n# What is Raft consensus?\nPlease refer to this [page](https://raft.github.io/) for more detail.\n\n# How to run\nClone the project:\n```\ngit clone https://github.com/ldmtam/raft-auto-increment\n```\n\nChange directory to `raft-auto-increment`\n```\ncd raft-auto-increment\n```\n\nStart `node 1`, this node will be the leader by default. `node 1` will serve requests at port `3000`.\n```\nmake run1\n```\n\nStart other 2 nodes by running following commands. `node 2` and `node 3` will be slaves of `node 1` and serve requests at port `13000`, `23000` respectively.\n```\nmake run2\nmake run3\n```\n\nGet next available ID for key `foo`:\n```\ncurl http://localhost:3000/auto-increment/one/foo\n```\n\nGet last inserted ID for key `foo`:\n```\ncurl http://localhost:3000/auto-increment/last-inserted/foo\n```\n\nGet next 10 available IDs for key `bar`:\n```\ncurl http://localhost:3000/auto-increment/many/bar/10\n```\n\nYou can send request to `node 2` and `node 3` as well. Requests will be automatically forwarded to master node (`node 1`),\n```\ncurl http://localhost:13000/auto-increment/one/bar\n```\n\n```\ncurl http://localhost:23000/auto-increment/last-inserted/bar\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fldmtam%2Fraft-auto-increment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fldmtam%2Fraft-auto-increment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fldmtam%2Fraft-auto-increment/lists"}