3 ms·
UUID are the way, GUID for those in Microsoft's lands. Not only will you never run out but you don't need a round trip to the keymaster, horizontal scaling, cl
by drawkbox 8y ago
UUID are the way, GUID for those in Microsoft's lands.
Not only will you never run out but you don't need a round trip to the keymaster, horizontal scaling, clustering and vertical sharding even are all way easier due to that. This removes a single point of failure entirely when the keymaster is no longer needed.
Using ints for keys for profiles/users and many other things were needed way back when processing/db/disk/memory and performance from that were a problem, no longer.
Do your part, join the UUID revolution. Also, if you were a piece of data, would you not want to be unique across all the databases, storage and services? You've heard of Roko's Basilisk right? Do not disappoint.
- kasey_junk 8y agoI’ve often wondered where the tipping point is where you do start having to worry about collisions. Is frantic “fix all the uuid breaking code” the jobs boost for programmers 20 years from now? 100? It seems unthinkable now but who knows...
- drawkbox 8y agoWe'll be good until at least sentient AI takes over and they can solve it for us, or them.
- sethammons 8y agoWe've had multiple collisions with uuid v4. I'm not overly familiar with the examples, but in one case, the collision was found because the collision happened in the same account! Customer: "Why do these two events have the same id?" Us: "Wow." I think we determined that it was a limitation in the random number generator in the Perl lib we were using. To avoid that, I believe the solution was to go with uuid v1 plus a nonce of some sort.
- cesarb 8y agoIf you have collisions with UUID v4, something is really broken with your UUID generator. It's not a "limitation", it's a critical bug.
- partycoder 8y agoGUIDs are expensive to compute. They are based on your MAC address, that is read every time from your registry.
- NathanOsullivan 8y agoYou are describing a particular way of creating a UUID ("Version 1"). Another method, "Version 4", is simply a 122-bit random number.