@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...
-
smallcircles (Humanity Now 🕊)replied to smallcircles (Humanity Now 🕊) on last edited by
-
Laxystem (Masto/Glitch)replied to smallcircles (Humanity Now 🕊) on last edited by
@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.
-
Laxystem (Masto/Glitch)replied to Laxystem (Masto/Glitch) on last edited by
@smallcircles Also, it seems the ULID spec repository ain't updated... I've heard good things about UUID v6, too. How does it compare?
-
smallcircles (Humanity Now 🕊)replied to Laxystem (Masto/Glitch) on last edited by
@laxla aha, I guess that that's the reason for the modification of Snowflake IDs by Mastodon, then?
-
smallcircles (Humanity Now 🕊)replied to Laxystem (Masto/Glitch) on last edited by
I don't know enough about that. I found this HN on the subject: https://news.ycombinator.com/item?id=36438367
-
Laxystem (Masto/Glitch)replied to smallcircles (Humanity Now 🕊) on last edited by
@smallcircles hmmmm. There's zero Kotlin support for UUIDs, but there are two libraries - one abandoned - for ULIDs.
-
smallcircles (Humanity Now 🕊)replied to Laxystem (Masto/Glitch) on last edited by
@laxla not using Kotlin, but I found: https://github.com/benasher44/uuid
-
Laxystem (Masto/Glitch)replied to smallcircles (Humanity Now 🕊) on last edited by
@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.
-
smallcircles (Humanity Now 🕊)replied to Laxystem (Masto/Glitch) on last edited by
@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
-