@laxla ULID's may be considered (used by GoToSocial in the db). See: https://ulid.pageTIL about Snowflake ID's and that Mastodon uses a variant of those..https://en.wikipedia.org/wiki/Snowflake_IDThe UUID wiki has something about collisions:https://en.wik...
-
ULID's may be considered (used by GoToSocial in the db). See: https://ulid.page
TIL about Snowflake ID's and that Mastodon uses a variant of those..
The UUID wiki has something about collisions:
-
PS. I found this a nice article on UUID's vs. ULID's:
Understanding UUIDs, ULIDs and String Representations
What UUIDs and ULIDs are under the hood, and how to encode and use them.
(sudhir.io)
-
@smallcircles Snowflakes are a no-go, they only support 210=1024 instances; ULIDs seem nice -- question is, what does one do when encountering a collision?
Because collisions here aren't a thing of chance, they're something that can be maliciously abused.
-
@smallcircles Also, it seems the ULID spec repository ain't updated... I've heard good things about UUID v6, too. How does it compare?
-
@laxla aha, I guess that that's the reason for the modification of Snowflake IDs by Mastodon, then?
-
I don't know enough about that. I found this HN on the subject: https://news.ycombinator.com/item?id=36438367
-
@smallcircles hmmmm. There's zero Kotlin support for UUIDs, but there are two libraries - one abandoned - for ULIDs.
-
@laxla not using Kotlin, but I found: https://github.com/benasher44/uuid
-
@smallcircles didn't update update for 4 months now, and doesn't support Kotlin/Wasm - neither does the ULID one, but it does seem to be maintained.
-
@laxla ha, I was just looking at https://github.com/benasher44/uuid/issues/153
-
-
@[email protected] @[email protected] ULID and Snowflake look really interesting, this thread was the first time I'd heard of either.
I was wondering what Mastodon used to generate their unique IDs, but I didn't wonder so much to actually look into it haha.
We use UUIDv4 whenever we need something random generated, but something lexicographically (ULIDs) or numerically (snowflake) sortable might be handy...
Where were you two six months ago LOL
-