cuid2
keripy
cuid2 | keripy | |
---|---|---|
15 | 1 | |
1,849 | 51 | |
6.2% | - | |
4.1 | 9.6 | |
2 months ago | 7 days ago | |
JavaScript | Python | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
cuid2
-
The UX of UUIDs
The CUID readme [1] explains that there's no real point to K-sortable on modern hardware:
[1] https://github.com/paralleldrive/cuid2?tab=readme-ov-file#no...
-
Bye Sequence, Hello UUIDv7
There's a comparison in the README of the project:
https://github.com/paralleldrive/cuid2#the-contenders
Some of the arguments mentioned are explained elsewhere in the README, others are assumed.
One argument standing out for me is the lack of collision-resistance for UUIDv4 which is surprising for me and I didn't spot any sources for that argument.
Another argument is the entropy source where they go about that Math.random is not reliable as a single entropy source but glimpsing at the source code, they sprinkle the CUID with Math.random data.
I am no expert in ID security, so I am not qualified to speak about the validity of their arguments, only that there's insufficient information to validate without prior knowledge about the problem domain.
-
You Don't Need UUID
I'm recently finding cuid2 to be the best of these alternative GUIDs. They seem to have all of the benefits for what you would want to use a GUID for, but none of the drawbacks of existing implementations.[1]
[1]: https://github.com/paralleldrive/cuid2#the-contenders
-
Cuid2 - Secure, collision-resistant ids optimized for horizontal scaling and performance. Next generation UUIDs.
I've just released v2.0.0 of my cuid2 python port. The original cuid2 package comes from JS world by ParallelDrive. They have a lot of the reasons to use Cuid2 posted in their repo, including
-
I "did my own research" and "AI" is not taking my job any time soon.
I recently wrote a Go implementation of CUID2 because I could not find an existing one. It is not hello-world, but it is not duff's device either, which by the way neither could explain what it did from just the raw code in isolation.
-
I'm making a hashing function to hash user ids for a hobby app and would love some feedback
I think this implementation is the original one. It has the following to say about why it exists. And what it is good for:
-
I've created long guide regard modern and old algorithms for Identifiers like ULID, UUID, slug and others.
There's also https://github.com/paralleldrive/cuid2 which likely should be added to this as it is likely one of the better ones out there now.
-
How to ensure that we get 100% unique id in postgres with node js and prisma
If you're using prisma then you can use CUID or CUID2 to manually generate it.
- Cuid2 – Secure, collision-resistant ids optimized for scaling and performance
- Cuid2: Next Generation GUIDs
keripy
What are some alternatives?
pg_idkit - Postgres extension for generating UUIDs
dxid - A better and safer way to display your primary keys in urls or in your app
postgresql-uuid-generate-v7
typeid - Type-safe, K-sortable, globally unique identifier inspired by Stripe IDs
ksuid - K-Sortable Globally Unique IDs
bip39 - A web tool for converting BIP39 mnemonic codes
nanoid - A tiny (124 bytes), secure, URL-friendly, unique string ID generator for JavaScript
cuid2 - Next generation GUIDs. Collision-resistant ids optimized for horizontal scaling and performance.
e16957bf-7d7f-41f1-97f4-98c93a6c3540