Open nnovoice opened 4 years ago
Potential approaches below. Let's review and identify one:
Edit: Looking at "https://github.com/nnovoice/tinyurl/issues/3", it appears neither of the options will work. Instead we completely randomize the sequence and check against the URL repository to check if the sequence has been consumed.
We need to find a way to return sequences in a random order. How about pre-generating say 10 million sequences and return them randomly? the next 10 million can be generated when needed and randomize them. we could potentially do this in a separate thread pool. Need a simple mechanism.
Short code generator is created as an Iterator that starts from aaaaaaaa and goes on. It does not remember where it left off on an application restart. Got to fix this.