5 ms·
OK, how about this procedure: 1. Give the first person who asks the number 0000000000000000001. 2. Give the next person the previous person's number plus one.
by LeifCarrotson 4y ago
OK, how about this procedure:
1. Give the first person who asks the number 0000000000000000001.
2. Give the next person the previous person's number plus one.
3. Repeat.
The drawing-from-an-urn randomization or hashing is unnecessary if you just start with 8 billion or more numbers.
- bee_rider 4y agoThat is an alternative procedure, but it doesn’t seem (?) to provide any advantages over the randomized in a urn procedure, and it also doesn’t seem to remove the centralization problem.
- xboxnolifes 4y agoThe advantage is not needing to hold 8 billion numbers of state. Instead you only need to keep track of a single number.
- LeifCarrotson 4y agoWhy is randomization important? And centralization likewise seems unimportant, as generating or sending a single auto-incrementing index number is really, really fast. This is literally the technique I use at work for keeping track of part numbers: There's a single server that my individual CAD users can ask for a part number to describe the components of their assemblies, it does nothing but generate sequential, unique numbers. Engineers can't draw millions of parts per second, so it just works...and there's no probabilistic element with associated birthday paradox to the uniqueness of those IDs. There are only 4.5 people born per second for this hypothetical server to handle in the long term. And at INSERT speeds of something like 3M/second, you could theoretically handle the initial storm of requests to serve all current living humans in about an hour. With 2^64 records, this scheme should be good for about 100 billion years assuming population growth levels off. That's a long time for that assumption to hold true, but I think optimizing for an event that might be only 50 billion years away is a little premature (also, the timeout when querying this server from Alpha Centauri might limit your transaction rate, but again, premature optimization).
- bee_rider 4y agoI’m not sure what the imagined application is anyway, but some advantages for to randomizing the IDs could be: * Better support for people born in an area without an internet connection (or with a spotty internet connection). * No need to agree on a single issuing authority.
- adolph 4y agoWouldn’t something zero padded like that be typed as a string not a number?
- Waterluvian 4y agoIt still works! 1 gets appended to the string. The only downside is that recent IDs are 8 billion characters long. People are clever though and just began using the length of their string as their personal ID.
- pc86 4y agoNow this is the kind of pedantry I come here for.
- adolph 4y agoIt’s all fun ‘n games until someone treats something like an MRN (Medical Record Number) as if it were a number. Edit: Also, would you mind changing that statement to not leave a preposition shooting off the end like Wile E Coyote?
- JadeNB 4y ago> Edit: Also, would you mind changing that statement to not leave a preposition shooting off the end like Wile E Coyote? This is the kind of pedantry up with which I will not put.
- Waterluvian 4y agoCan we use IEEE 754 and start at 0.000000000000000001?
- LocalH 4y agoThat's barely even enough to cover everyone alive right now, much less everyone from here on. This is one thing we don't need to fuck up on. I think we'd need what, a trillion numbers? Two or three? How long do you think humans will exist as a species? For once it'd be nice if we punted the problem a lot further than 100 years down the road.