3 ms·
I'm not familiar with the type of global IDs you're referring to, I'm afraid. A GUID is essentially assigning an ID out of a 128-bit integer keyspace, with the
by steve-howard 15y ago
I'm not familiar with the type of global IDs you're referring to, I'm afraid. A GUID is essentially assigning an ID out of a 128-bit integer keyspace, with the idea that collisions will be highly improbable if used correctly. Any database I've ever designed has been on a very small scale (weekend project kind of stuff), and the real scalable databases I've used were designed by people way smarter than me. Some of them used GUIDs and some didn't, and I have no idea what informed those choices.
- PaulHoule 15y agoThe nice thing about GUIDs is that any node in a distributed system can make one at any time and you know that a collision is impossible or almost impossible. On the other hand, they take up a lot of space, in particular, they fill RAM. They make the most used indexes in your system large and slow. Practically, the need for GUIDs can be eliminated by establishing a server that works like the "take a ticket" machine at the supermarket. Any node that makes a new object makes an API call and gets a new id.
- famousactress 15y agoYes, exactly... and if the cost of getting new keys piece-meal is too expensive, the 'ticket machine' can dole them out in blocks to nodes for fast local-allocation.
- lukesandberg 15y agoNo need to create a ticket machine, the db can probably do this for you. I've accomplished this with oracle sequences (supports grabbing blocks of ids). I assume there are similar capabilities in other db systems.
- PaulHoule 15y agoIn that case, your database is the ticket machine.