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

switch to uuid v5 or even away from uuid #6

Closed
cmawhorter opened this issue Apr 9, 2021 · 1 comment
Closed

switch to uuid v5 or even away from uuid #6

cmawhorter opened this issue Apr 9, 2021 · 1 comment

Comments

@cmawhorter
Copy link
Owner

the goal of this lib should be to create a guaranteed collision-free id (as guaranteed as possible).

currently, it uses v4 which could lead to problems when used with inconsistent databases.

explore uuid v5 or possibly abandoning uuid entirely. it might always be nice to introduce a "strategy" option that allows the type of code generated be configured e.g. strategy: lowvolume => id_short123 or strategy: highvolume => id_verylongmaybelongerthan16bytestoguaranteenocollisions.

@cmawhorter
Copy link
Owner Author

uuid 4 is essentially just random and good enough for most uses. strategies seemed like overkill. added ability to request fewer bytes to handle lower volume. it's possible to use v5 uuid now by base62 encoding yourself.

tl;dr not going to do this and ended up going different route

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

1 participant