▲ | fastball 2 days ago | |
The space has 1M IDs available, which sounds like enough until you take into account how the probability of collision works (birthday problem). With only 1200 notes (not many in my experience running a notes platform), your probability of collision is already about 50%. | ||
▲ | medstrom 2 days ago | parent [-] | |
Aye, so this is fine as long as there's just one entity generating IDs, so it can automatically check for collision and re-generate. In a distributed system it's another matter. I'm currently using 6 base-40 chars (upcase and lowcase letters, so e.g. "SXJwzQY") that represent an integer Unix time. The base-40 alphabet is enough that all IDs up until year ~2099 will fit in 6 chars, and it's nicer to type on the phone when you only have to switch between two keyboard modes, the upcase and lowcase but not also the numbers and symbols mode. |