{"id":18292531,"url":"https://github.com/tinode/snowflake","last_synced_at":"2025-04-05T10:31:15.586Z","repository":{"id":30864391,"uuid":"34421978","full_name":"tinode/snowflake","owner":"tinode","description":"Yet another snowflake","archived":false,"fork":false,"pushed_at":"2020-03-21T15:45:21.000Z","size":10,"stargazers_count":23,"open_issues_count":0,"forks_count":15,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-21T03:11:08.535Z","etag":null,"topics":["go","golang","snowflake","twitter-snowflake"],"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/tinode.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":"2015-04-22T23:34:01.000Z","updated_at":"2023-01-02T01:24:35.000Z","dependencies_parsed_at":"2022-09-26T17:41:40.501Z","dependency_job_id":null,"html_url":"https://github.com/tinode/snowflake","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/tinode%2Fsnowflake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinode%2Fsnowflake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinode%2Fsnowflake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinode%2Fsnowflake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tinode","download_url":"https://codeload.github.com/tinode/snowflake/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247324647,"owners_count":20920692,"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":["go","golang","snowflake","twitter-snowflake"],"created_at":"2024-11-05T14:18:24.902Z","updated_at":"2025-04-05T10:31:15.205Z","avatar_url":"https://github.com/tinode.png","language":"Go","readme":"# Snowflake\n\nYet another Golang implementation of Twitter's Snowflake. This implementation is used by https://github.com/tinode/chat and as such it's up to date and supported.\n\n## Performance\n\nMaximum theoretical performance is limited by the wait time on the sequence number. I.e. minimum time for a value to be generated is 1 ms / 4096 ~ 244 ns.\nActual performance on average hardware is 246 ns.\n\n## Spec\n\nID is a 64 bit unsigned integer composed of:\n- the top bit is always zero for compatibility; for instance, Go's sql implementation requires top bit of uint64 to be 0\n- time - 41 bits (millisecond precision with a custom epoch, enough to cover until the year 2083)\n- configured machine id - 10 bits - gives us up to 1024 machines\n- sequence number - 12 bits - rolls over every 4096 per machine (with protection to avoid rollover in the same ms, and as such it may block for some hundreds of microseconds)\n\nDifferences from Twitter's Snowflake:\n- uint64 instead of int64\n- zero on error instead of -1\n- different epoc: 2014 instead of 2010\n\n## License\n\nApache License 2.0\n\n## Links\n\n- https://github.com/sdming/gosnow\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinode%2Fsnowflake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftinode%2Fsnowflake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinode%2Fsnowflake/lists"}