gouuidv6
gouuidv6 copied to clipboard
Rethink things
Follow up the discussion here https://github.com/uuidjs/uuid/issues/303#issuecomment-576587582 and see what we do.
Just FTR, here are some mentions of prior art:
From https://mailarchive.ietf.org/arch/msg/ietf/2YSFIqY4n2SDLTLBg9GtQMjkcfU
- Elasticsearch sequential UUID / Flake ID: https://github.com/ppearcy/elasticflake
- Firebase push IDs: https://firebase.googleblog.com/2015/02/the-2120-ways-to-ensure-unique_68.html
- Cassandra TimeUUID: https://cassandra.apache.org/doc/latest/cql/functions.html
- KSUID k-sortable unique identifiers: https://github.com/segmentio/ksuid
- ULID universally unique lexicographically sortable identifier: https://github.com/ulid/javascript
- Twitter Snowflake: https://blog.twitter.com/engineering/en_us/a/2010/announcing-snowflake.html
From https://github.com/tc39/proposal-uuid/issues/3#issuecomment-535191016
- flake-id https://github.com/T-PWK/flake-idgen
- nanoid https://github.com/ai/nanoid
- cuid https://github.com/ericelliott/cuid
- ulid https://github.com/ulid/spec
@ctavan Great - I'll find some time to read through the above and look for any additional ideas that could/should be incorporated.
Meanwhile here is a link to some initial notes pasted in that can start being shaped up into a draft: https://docs.google.com/document/d/1bctTr14CrxzjHUIRAkT8jB46Jomr9aB2JQ9hDCh3cJg/edit
Some other libraries of interest (see https://blog.kowalczyk.info/article/JyRZ/generating-good-unique-ids-in-go.html):
github.com/segmentio/ksuid github.com/rs/xid github.com/kjk/betterguid github.com/sony/sonyflake github.com/oklog/ulid github.com/chilts/sid https://github.com/lithammer/shortuuid github.com/satori/go.uuid https://github.com/google/uuid
Also: https://github.com/dchest/uniuri
Noting this here, some stuff on firebase to look at.
On 4/16/20 9:28 PM, Jeffrey Yasskin wrote:
Since you have a TODO for prior art in https://tools.ietf.org/html/draft-peabody-dispatch-new-uuid-format-00#section-5, I wanted to mention https://firebase.googleblog.com/2015/02/the-2120-ways-to-ensure-unique_68.html as having done something very similar to your proposal. They use a 48-bit number of milliseconds since the Unix epoch (which matches Javascript), but the range winds up similar to the 60-bit number of 100ns periods you're using. Their source is at https://github.com/firebase/firebase-js-sdk/blob/master/packages/database/src/core/util/NextPushId.ts.
Jeffrey