3 ms·
You don't have to have a massive random number - just one long enough to fulfil your goal. You then ensure uniqueness using your database. If your goal is just
by mnw21cam 12y ago
You don't have to have a massive random number - just one long enough to fulfil your goal. You then ensure uniqueness using your database. If your goal is just to allow sufficient addressability, then the random number needs to have enough bits to cover the maximum number of items you can ever conceive of creating. If your goal is to prevent people from typing in a random number and getting a valid page, you need to multiply your address space by 1/(acceptable probability of guessing).
Having two levels of random number is unnecessary - you should be able to access a job/operation combination with a single identifier.
- nraynaud 12y agoIn this case, there is also distributed ID generation.