by zackmorris · 7y ago · 0 comments
https://firebase.googleblog.com/2015/02/the-2120-ways-to-ens...
Lexicographically sortable identifiers are critical for any distributed data store if you want anything close to consistency. I've run into the issue of not having them and having to settle for some kind of <autoincrement_id><UUID> key and it's a huge PITA. How this wasn't considered database 101 decades ago just blows my mind.
I'd like to see a spec included in this for synchronizing clocks or using RAFT/Paxos for generating ULIDs with strong guarantees on sort order.
Also a minor gripe - I wish that the ULID spec checked for microsecond collisions instead of millisecond, because that would be more useful for realtime networked gaming and simulations.
wat?
This doesn't make any sense to me. Requiring that events be partially ordered if not totally ordered is a consistency requirement, sure, but I'm failing to understand how a database's consistency depends on the data you're putting in the database.
Maybe CRDTs would be better.
Of course the guarantee is still merely eventual consistency, but data locality does reduce the chance this becomes visible.
If you can manage the difficult task of getting your clocks synced that precisely, it's probably easy to shift two characters over from random to timestamp.
It's only a matter of time (in both senses I guess). See e.g. https://blogs.technet.microsoft.com/networking/2018/07/18/to...
Decades ago they didn't have distributed data stores.
Most computers don't have wall clocks with even more millisecond precision, much less microsecond. The wall clocks are generally OS tick precision (~5-10ms ballpark) with poorer still accuracy.
Seems like the use case is one that is niche. Maybe an extension?
https://softwareengineering.stackexchange.com/questions/3714...
https://stackoverflow.com/questions/15360245/when-using-uuid...
https://softwareengineering.stackexchange.com/questions/1394...
https://softwareengineering.stackexchange.com/questions/3469...
To find events between two specific points.
It can also be used in Dynamodb which is what we use in adtech.