4 ms·
One huge benefit of UUID is how you can safely create them while being offline, and then sync them at a later stage without conflicts.
by d0m 9y ago
One huge benefit of UUID is how you can safely create them while being offline, and then sync them at a later stage without conflicts.
- lacampbell 9y agoYou can still have conflicts though, sometimes more than you think due to the UUID generator used. It's rare but it seems like an edge case that should be handled. Doesn't invalidate your point about being able to make them offline though. Another option I considered to create PKs offline was a userid/timestamp pair.
- floatboth 9y agoObviously you should be using UUIDv4 with a good secure pseudorandom number generator if you want to generate them offline. And typically no one handles collisions in large pseudorandom values.