Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comparison to Firebase PushIDs #37

Open
devlinb opened this issue Nov 25, 2019 · 2 comments
Open

Comparison to Firebase PushIDs #37

devlinb opened this issue Nov 25, 2019 · 2 comments

Comments

@devlinb
Copy link

devlinb commented Nov 25, 2019

Google's Firebase Realtime DB uses a sortable unique identifier format, a JS implementation of which is available at https://gist.github.com/mikelehen/3596a30bd69384624c11

72 bit of randomness, but it doesn't collide if multiple IDs are generated within the same millisecond on the same machine, the last property is kind of cool and achieved rather simply.

@mqudsi
Copy link

mqudsi commented Dec 16, 2019

A lot of ULID implementations do not follow this part of the spec, but ULID already does the simple randomness increment: https://github.com/ulid/spec#monotonicity

@alizain
Copy link
Contributor

alizain commented Jan 6, 2020

@mqudsi is correct:

  • ULID's reference JS implementation already does this randomness increment
  • lots of other implementations do not follow this part of the spec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants