{"id":13712004,"url":"https://github.com/ybt195/flake","last_synced_at":"2025-05-06T21:32:57.314Z","repository":{"id":57536697,"uuid":"151794889","full_name":"ybt195/flake","owner":"ybt195","description":"Generate k-sortable 64-bit unique flake ids.","archived":false,"fork":false,"pushed_at":"2019-09-15T18:08:41.000Z","size":170,"stargazers_count":10,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-26T10:13:34.658Z","etag":null,"topics":["distributed-systems","flake-ids","go","golang","k-sortable","raft"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ybt195.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2018-10-06T01:37:46.000Z","updated_at":"2024-06-03T19:27:28.000Z","dependencies_parsed_at":"2022-08-29T00:40:43.866Z","dependency_job_id":null,"html_url":"https://github.com/ybt195/flake","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ybt195%2Fflake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ybt195%2Fflake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ybt195%2Fflake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ybt195%2Fflake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ybt195","download_url":"https://codeload.github.com/ybt195/flake/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224535687,"owners_count":17327572,"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-systems","flake-ids","go","golang","k-sortable","raft"],"created_at":"2024-08-02T23:01:13.928Z","updated_at":"2024-11-13T22:31:07.869Z","avatar_url":"https://github.com/ybt195.png","language":"Go","funding_links":[],"categories":["Repositories"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\n  \u003cimg src=\"docs/assets/images/icon.png\" width=\"80\" height=\"80\" alt=\"flake logo\"\u003e\n  \u003ch1 align=\"center\"\u003eFlake\u003c/h1\u003e\n\n  \u003cp align=\"center\"\u003e\n    Generate k-sortable 64-bit unique flake ids.\n    \u003cbr\u003e\n    \u003cbr\u003e\n    \u003ca href=\"https://github.com/ybt195/flake/issues\"\u003eIssues\u003c/a\u003e\n    ·\n    \u003ca href=\"https://godoc.org/github.com/ybt195/flake/pkg/flake\"\u003eDocumentation\u003c/a\u003e\n  \u003c/p\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003ca href=\"https://godoc.org/github.com/ybt195/flake/pkg/flake\"\u003e\n      \u003cimg alt=\"GoDoc Reference\" src=\"https://godoc.org/github.com/ybt195/flake/pkg/flake?status.svg\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://travis-ci.org/ybt195/flake\"\u003e\n      \u003cimg alt=\"Build Status\" src=\"https://travis-ci.org/ybt195/flake.svg?branch=master\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/ybt195/flake\"\u003e\n      \u003cimg src=\"https://codecov.io/gh/ybt195/flake/branch/master/graph/badge.svg\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://goreportcard.com/report/github.com/ybt195/flake\"\u003e\n      \u003cimg alt=\"Go Report Status\" src=\"https://goreportcard.com/badge/github.com/ybt195/flake\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://opensource.org/licenses/Apache-2.0\"\u003e\n      \u003cimg alt=\"Apache License, Version 2.0\" src=\"https://img.shields.io/badge/License-Apache%202.0-blue.svg\"\u003e\n    \u003c/a\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\n## Table of contents\n\n- [Overview](#overview)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Overview\n\nFlake ids are represented in 64-bit unsigned integers. Ids can be broken down into three components:\n\n- Bucket: A 10-bit bucket id for sharding ids over 1024 different buckets.\n- Timestamp: A 42-bit millisecond encoded timestamp of when the id was generated.\n- Sequence: A 12-bit  incrementing sequence number that is reset at each timestamp increment.\n\nWith this formation, flake can generate 4096 unique ids per millisecond per bucket, or in other words, 4 **billion** unique ids per second. For reference, YouTube gets about 75 **thousand** unique views per second.\n\n## Contributing\n\nContributions are very much welcomed. Please read the [Contribution Guide](CONTRIBUTING.md) for how to get started.\n\nNote that all contributors are expected to follow the [Code of Conduct](CODE_OF_CONDUCT.md).\n\n## License\n\nFlake is licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0). For more information, see the [License](LICENSE) file. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fybt195%2Fflake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fybt195%2Fflake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fybt195%2Fflake/lists"}