3 ms·
People use UUIDs for more reasons than just making things distributed. You can generate them client side if that's advantageous, you prevent leaking information
by ryanbrunner 5y ago
People use UUIDs for more reasons than just making things distributed. You can generate them client side if that's advantageous, you prevent leaking information about how many records there are in the system and prevent guessing of other potential PKs and potential unauthorized access, and there's some optimization strategies that benefit from not relying on a serial PK.
- cbsmith 5y agoIf you're obfuscating, then you should be using a DHT to map surrogate keys to internal keys that are more convenient for use in a MySQL index... or just stop using MySQL.
- globular-toast 5y agoWell they shouldn't. UUIDs are for distributed systems. Generating keys client side? That's a distributed system.
- ryanbrunner 5y agoI've had occasional uses for it in systems that aren't distributed at all. It's a handy property of UUIDs, if UUIDs are useful for a particular use case, I'm going to use them, what they're 'supposed' to be for is irrelevant.