News for hackers. Stuff that matters.
Re:ULID: Universally Unique Lexicographically Sortable Ident... by exyi on Thursday December 27, 2018 @02:22PM (#18771791)
Well, in lot of cases you actually don't need that but it's a nice to have feature. The typical case being just giving IDs to some items you store in database - you can either give them UUIDs and enjoy that you can generate the ID in application and don't have to wait for database to create related entities to that. Or you choose sequential IDs generated by database, and you get that the IDs also have some meaning - you can for example sort by ID in your queries by default as it's roughly equivalent to creation date.
Re:ULID: Universally Unique Lexicographically Sortable Ident... by int0x80 on Thursday December 27, 2018 @03:27PM (#18772346)
To me this is 'just' an optimization. If sorting by ID means 'sort by creation time' then you are just optimizing a timestamp in an entity. Overloading the ID, IOW. For the 'create the ID in the app' yes, but that is orthogonal to the ULID, AFAIK.
Re:ULID: Universally Unique Lexicographically Sortable Ident... by jayd16 on Friday December 28, 2018 @03:30AM (#18775534)
Whats wrong with actually using a creation date if that's what you actually want?