All Projects → tinode → snowflake

tinode / snowflake

Licence: Apache-2.0 license
Yet another snowflake

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to snowflake

tsid-creator
A Java library for generating Time Sortable Identifiers (TSID).
Stars: ✭ 16 (-27.27%)
Mutual labels:  snowflake, twitter-snowflake
onionfruit
OnionFruit™ Connect - Tor access client with country selection, bridge configuration, pluggable transports and experimental DNS support
Stars: ✭ 150 (+581.82%)
Mutual labels:  snowflake
Snowflake
A simple to use Go (golang) package to generate or parse Twitter snowflake IDs
Stars: ✭ 1,314 (+5872.73%)
Mutual labels:  snowflake
Terraform Provider Snowflake
Terraform provider for managing Snowflake accounts
Stars: ✭ 165 (+650%)
Mutual labels:  snowflake
Gosnowflake
Go Snowflake Driver
Stars: ✭ 108 (+390.91%)
Mutual labels:  snowflake
Idworker
idworker 是一个基于zookeeper和snowflake算法的分布式ID生成工具,通过zookeeper自动注册机器(最多1024台),无需手动指定workerId和datacenterId
Stars: ✭ 171 (+677.27%)
Mutual labels:  snowflake
Locopy
locopy: Loading/Unloading to Redshift and Snowflake using Python.
Stars: ✭ 73 (+231.82%)
Mutual labels:  snowflake
DBTestCompare
Application to compare results of two SQL queries
Stars: ✭ 15 (-31.82%)
Mutual labels:  snowflake
DiscordLookup
DiscordLookup | Get more out of Discord with Discord Lookup! Snowflake Decoder, Guild List with Stats, Invite Info and more...
Stars: ✭ 86 (+290.91%)
Mutual labels:  snowflake
Yuniql
Free and open source schema versioning and database migration made natively with .NET Core.
Stars: ✭ 156 (+609.09%)
Mutual labels:  snowflake
Did
高性能的ID生成器, 基于rpcx和Memcached协议提供网络服务调用
Stars: ✭ 120 (+445.45%)
Mutual labels:  snowflake
Id Generator
id-generator部署即使用的ID生成器, 支持HTTP、Dubbo、Spring Cloud方式.
Stars: ✭ 112 (+409.09%)
Mutual labels:  snowflake
Sqitch
Sensible database change management
Stars: ✭ 2,320 (+10445.45%)
Mutual labels:  snowflake
Snow Stamp
Get the timestamp from a Discord snowflake ❄
Stars: ✭ 95 (+331.82%)
Mutual labels:  snowflake
sno
Compact, sortable and fast unique IDs with embedded metadata.
Stars: ✭ 77 (+250%)
Mutual labels:  snowflake
Sonyflake Rs
🃏 A distributed unique ID generator inspired by Twitter's Snowflake.
Stars: ✭ 91 (+313.64%)
Mutual labels:  snowflake
Go Katsubushi
ID generator server
Stars: ✭ 118 (+436.36%)
Mutual labels:  snowflake
Snowflakes
❄️ Snowflakes in JavaScript
Stars: ✭ 170 (+672.73%)
Mutual labels:  snowflake
snowflake
a language
Stars: ✭ 16 (-27.27%)
Mutual labels:  snowflake
Excelerator
This is an Excel Addin for Windows that reads and writes data to Snowflake
Stars: ✭ 53 (+140.91%)
Mutual labels:  snowflake

Snowflake

Yet 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.

Performance

Maximum 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. Actual performance on average hardware is 246 ns.

Spec

ID is a 64 bit unsigned integer composed of:

  • the top bit is always zero for compatibility; for instance, Go's sql implementation requires top bit of uint64 to be 0
  • time - 41 bits (millisecond precision with a custom epoch, enough to cover until the year 2083)
  • configured machine id - 10 bits - gives us up to 1024 machines
  • 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)

Differences from Twitter's Snowflake:

  • uint64 instead of int64
  • zero on error instead of -1
  • different epoc: 2014 instead of 2010

License

Apache License 2.0

Links

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].