segmentio/ksuid
View on GitHub ↗ ★ 5,271 Go
K-Sortable Globally Unique IDs
32 mentions on Hacker News by 25 people: 3 stories, 29 comments · first 2017-06-08 · latest 2024-04-11
20082026
-
…ensures good locality when used as an id in a database (e.x. https://github.com/jetify-com/typeid https://github.com/segmentio/ksuid ) - checksum: primarily useful when an id might be conveyed verbally (e.x. customer support) or…
comment by tlrobinson · 2024-04-11 · in The UX of UUIDs -
UUID v4 isn't large enough to prevent collisions, that is why segment.io created https://github.com/segmentio/ksuid which is 160bit vs the 128bit of a UUIDv4.
comment by Xeoncross · 2023-10-02 · in Goodbye integers, hello UUIDv7 -
…has some dumb quirks if followed literally but thankfully they mostly don't hurt things. * KSUIDs ( https://github.com/segmentio/ksuid ) are 160 bits long, 32 bits encode a timestamp with second precision and a custom epoch of May 13th,…
comment by Lazare · 2023-10-02 · in Goodbye integers, hello UUIDv7 -
…successor to the ksuid [1] lib which I first heard of used in conjunction with DynamoDB [1]: https://github.com/segmentio/ksuid which has very similar use cases.
comment by mooreed · 2023-10-02 · in Goodbye integers, hello UUIDv7 -
…(K-sortable). [0] https://github.com/jetpack-io/typeid [1] https://github.com/ulid/spec [2] https://github.com/segmentio/ksuid
comment by ekojs · 2023-09-11 · in You Don't Need UUID -
Ksuid may be what you want. Pretty much time sortable uuid. Go implementation: https://github.com/segmentio/ksuid
comment by sethammons · 2023-07-21 · in Nanosecond timestamp collisions are common -
Assuming you don't need to use UUIDv7 (or any UUID's) then https://github.com/segmentio/ksuid provides a much bigger keyspace. You could just append a string prefix if you wanted to namespace, but the chance of collisions of a ksuid is…
comment by Xeoncross · 2023-06-28 · in Type-safe, K-sortable, globally unique identifier inspired by Stripe IDs -
KSUID's are have temporal-lexicographical order plus 128 bits of entropy, which is more than UUIDv4. https://github.com/segmentio/ksuid
comment by smaddox · 2023-06-22 · in Unexpected downsides of UUID keys in PostgreSQL -
…it seems so. I know of one implementation that uses wall clock to get a "close enough" sorting https://github.com/segmentio/ksuid
comment by plagiarist · 2023-06-22 · in Unexpected downsides of UUID keys in PostgreSQL -
KSUIDs are fairly popular and missing from your list: https://github.com/segmentio/ksuid
comment by JimDabell · 2022-11-22 · in Moving Away from UUIDs (2018) -
Some UUID alternatives: - https://github.com/ai/nanoid - https://github.com/segmentio/ksuid - https://github.com/ulid/spec
comment by gcoguiec · 2022-11-22 · in Moving Away from UUIDs (2018) -
There are KSUIDs that aim to satisfy this A go ref impl: https://github.com/segmentio/ksuid
comment by myvoiceismypass · 2022-11-21 · in Moving Away from UUIDs (2018) -
We use K-Sortable Globally Unique IDs: https://github.com/segmentio/ksuid Some differences: 128 bit strongly generated payload (instead of 80 bits for ULIDs). Only 32 bit time precision but that's wall clock time anyway. Base62 encoded.
comment by fenollp · 2022-01-05 · in Understanding UUIDs, ULIDs and string representations -
…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:…
comment by spiffytech · 2021-11-09 · in Lesser-known Postgres features -
I prefer ksuid https://github.com/segmentio/ksuid
comment by cratermoon · 2021-08-06 · in New UUID Formats – IETF Draft -
…//www.npgsql.org/efcore/modeling/generated-properties.... [5]: https://github.com/edoceo/pg-ulid [6]: https://github.com/segmentio/ksuid [7]: https://www.2ndquadrant.com/en/blog/sequential-uuid-generato...
comment by hardwaresofton · 2021-06-01 · in UUID, serial or identity columns for PostgreSQL auto-generated primary keys? -
Prefer https://github.com/segmentio/ksuid
comment by cratermoon · 2021-05-03 · in Sortable Collision-Free UUIDs -
…this is unlikely to be an optimal choice. Functionally, I think this is closest to KSUIDs ( https://github.com/segmentio/ksuid ) which are also the result of combining a timestamp (with a custom epoch) and some randomness, and then…
comment by Lazare · 2021-05-03 · in Sortable Collision-Free UUIDs -
…Sonyflake: https://news.ycombinator.com/item?id=25592325 KSUIDs (can't find any discussion here): https://github.com/segmentio/ksuid This comment lists other prior art: https://github.com/bradleypeabody/gouuidv6/issues/3
comment by js2 · 2021-05-03 · in Sortable Collision-Free UUIDs -
…etc) There is the KSUID[1] if people want a time-sortable thing that is near-enough to a UUID. [1] https://github.com/segmentio/ksuid
comment by traceroute66 · 2021-04-24 · in You might as well timestamp it -
…a reasonably trustworthy source of randomness [1] https://news.ycombinator.com/item?id=26776092 [2] https://github.com/segmentio/ksuid/blob/master/README.md
comment by cratermoon · 2021-04-14 · in Problems with JPA/Hibernate -
I also spent some time evaluating them, and came to the conclusion that KSUIDs ( https://github.com/segmentio/ksuid ) were strictly better than ULIDs. The differences aren't huge in practice, but the ULID spec has a couple of highly…
comment by Lazare · 2020-12-31 · in Show HN: Sonyflake – distributed unique ID generator implemented in Rust -
i just started using ksuid[0] as my postgres (and in general) primary keys [0] https://github.com/segmentio/ksuid
comment by hankchinaski · 2020-12-04 · in Pg-shortkey: YouTube-Like Short IDs as Postgres Primary Keys -
…ULID vs KSUID, which includes replies from the author you linked to from Segment, Rick Branson. https://github.com/segmentio/ksuid/issues/8 Rick says this about ULID vs KSUID: "If one is concerned about the extra 4 bytes of data or if…
comment by Vanderson · 2020-10-05 · in Understanding How UUIDs Are Generated -
…I can live with them. (which I can) Again, thanks for the detailed reply, it was very helpful. [0] https://github.com/segmentio/ksuid/issues/8
comment by Vanderson · 2020-10-01 · in Understanding How UUIDs Are Generated -
…spec is a bit weird[1]. If you want the benefits of ULID, I'd highly suggest checking out KSUIDs: https://github.com/segmentio/ksuid https://segment.com/blog/a-brief-history-of-the-uuid/ Same advantages of ULIDs, but I prefer the base62 to…
comment by Lazare · 2020-10-01 · in Understanding How UUIDs Are Generated -
…[0]. K-Sortable Unique IDs. I'm not affiliated, just easy to code from scratch and sortable. [0] - https://github.com/segmentio/ksuid
comment by 4e1a · 2019-04-30 · in How many ways are there to sort GUIDs? -
…has already written up his thoughts on the differences[2]. [1] https://github.com/ulid/spec [2] https://github.com/segmentio/ksuid/issues/8
comment by thanatos_dem · 2019-02-03 · in A brief history of the UUID (2017) -
See also https://github.com/segmentio/ksuid
comment by otterley · 2018-12-27 · in ULID: Universally Unique Lexicographically Sortable Identifier