News for hackers. Stuff that matters.
Re:ULID: Universally Unique Lexicographically Sortable Ident... by Kip9000 on Thursday December 27, 2018 @02:18PM (#18771765)
What problem does this solve? Why is it necessary to sort a unique id?
Re:ULID: Universally Unique Lexicographically Sortable Ident... by marksomnian on Thursday December 27, 2018 @02:21PM (#18771782)
Since the ids are generated chronologically, it means you can sort by id instead of created_at. A nice convenience for sure.
Re:ULID: Universally Unique Lexicographically Sortable Ident... by taeric on Thursday December 27, 2018 @02:23PM (#18771797)
It can help operations if you know when an id came from. So that when you get a request id from a user, you don't also have to get a when.
Re:ULID: Universally Unique Lexicographically Sortable Ident... by mcbits on Friday December 28, 2018 @04:20AM (#18775743)
> when you get a request id from a user

Just a public service reminder that "never trust the client" still applies, in case you were imagining user agents generating their own ULIDs to relive servers of the duty or something. Nothing prevents them from sending duplicate or out-of-order IDs.

Re:ULID: Universally Unique Lexicographically Sortable Ident... by taeric on Friday December 28, 2018 @10:38AM (#18777306)
I've always been intrigued by having clients provide the id. I think I understand why that choice is made, but it does seem unusually error fragile.
Re:ULID: Universally Unique Lexicographically Sortable Ident... by BugsJustFindMe on Thursday December 27, 2018 @02:36PM (#18771910)
This comes out of Twitter Snowflake. The "prior art" links at the bottom are pretty informative.
Re:ULID: Universally Unique Lexicographically Sortable Ident... by UK-Al05 on Thursday December 27, 2018 @03:10PM (#18772206)
Using a ULID in a Clustered index?