I hadn't thought of that. There's nothing in the constraint that says the number can't be generated before the book. A queue is a really nice solution to that problem.
The prepopulated queue of unique ids is a good solution for massively distributed systems as you can split the queue by region.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.