ksuid
spec
Our great sponsors
ksuid | spec | |
---|---|---|
2 | 33 | |
41 | 4,563 | |
- | 1.6% | |
0.0 | 0.0 | |
9 months ago | 24 days ago | |
Java | ||
GNU General Public License v3.0 or later | GNU General Public License v3.0 only |
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.
ksuid
-
ksuid VS ksuid-creator - a user suggested alternative
2 projects | 26 Sep 2021
-
Sortable Collision-Free UUIDs
I started looking into TSID/KSUID/ULID in order to support cursor based pagination schemes in GraphQL against non-integer based unique id fields (such as uuids or unique string ids).
A couple of notable Java libs:
https://github.com/f4b6a3/ulid-creator
spec
-
An Exercise in Shortening Ids
Just use a ULID - it’s shorter, time-based, and there’s plenty more of them (for the next 8,000 years, at least).
-
Generate random string in server side (Firebase Firestore)
Firestore id is basically timestamp with some magic sprinkled in. Reminds of ULID
-
New UUID Formats from IETF
As the author of a popular ULID implementation in python[1], the spec has no stewardship anymore. The specification repo[2] has plenty of open issues and no real guidance or communication beyond language implementation authors discussing corner cases. The monotonic functionality is ambiguous (at best) and is implemented differently per-languages [3].
Functionality, UUIDv7 might be the _same_ but the hope would be for a more rigid specification for interoperability.
[1]: https://github.com/ahawker/ulid
-
How to do sequencial invoice numbers in react?
There is a spec for that: https://github.com/ulid/spec
-
When using UUIDs to generate keys for databases, do you need to verify the UUID wasn't used before?
As a side note, one common recommendation in DynamoDB is to use ulid or ksuid instead of UUID.
-
How to build robust distributed systems
If you're storing data about a person, make up your own database ID using something like ULID or Snowflake. Don't use any external data as your DB key.
-
Exposing generated IDs from Postgres good or bad?
UUID is my overall recommendation but if you need to care about temporal ordering and can't afford a secondary column for this info, there are alternatives to UUID that support this, such as ULID. It has implementations for many languages.
-
How to easily deal with domain object in Redis
Then we can call save method with the person data to commit into the database and redis will return an automatically generated unique id. Redis OM is using ULIDs (Universally Unique Lexicographically Sortable Identifiers). You can think of a ULID as a kind of user-friendly UUID. ULIDs are sortable, globally unique, URL-safe, and fairly human-readable when base32-encoded.
-
UUIDs Are Popular, but Bad for Performance
Is the spec not a better link than a go implementation?
-
Lesser Known PostgreSQL Features
> They have a temporal aspect to them (IE, I know row with ID 225 was created before row with ID 392, and approximately when they might be created)
UUIDv7 (currently a draft spec[0]) are IDs that can be sorted in the chronological order they were created
In the meantime, ulid[1] and ksuid[2] are popular time-sortable ID schemes, both previously discussed on HN[3]
[0] https://datatracker.ietf.org/doc/html/draft-peabody-dispatch...
[1] https://github.com/ulid/spec
[2] https://github.com/segmentio/ksuid
[3] ulid discussion: https://news.ycombinator.com/item?id=18768909
UUIDv7 discusison: https://news.ycombinator.com/item?id=28088213
What are some alternatives?
uuid - Generate RFC-compliant UUIDs in JavaScript
uuid6-ietf-draft - Next Generation UUID Formats
dynamodb-onetable - DynamoDB access and management for one table designs with NodeJS
UUID - A PHP library for generating universally unique identifiers (UUIDs).
ulid - Universally Unique Lexicographically Sortable Identifier (ULID) in Python 3
kuuid - K-sortable UUID - roughly time-sortable unique id generator
ulid-lite - Generate unique, yet sortable identifiers
nanoid - A tiny (130 bytes), secure, URL-friendly, unique string ID generator for JavaScript
python-ksuid - A pure-Python KSUID implementation
timeflake - Timeflake is a 128-bit, roughly-ordered, URL-safe UUID.
tsid-creator - A Java library for generating Time Sortable Identifiers (TSID).