ocharles/CAA-spec — Issue #6: The format/generation for artwork IDs should be clarified
Author: ocharles
Created: 2012-01-18 09:23:24+00:00
State: open

The specification currently mentions "unique ID across releases" but fails to mention how these IDs will be generated, or what format they are. Here are some suggestions:

* UUIDs. Long, but very hard to conflict. May be confusing in file names as people will assume they are actually an MBID, not a UUID.
* Timestamp from `gettimeofday`. Very high precision, extremely unlikely that 2 people will manage to load the submission form at exactly the same nanosecond. We could subtract a constant, such as current epoch, if we want to make this number smaller. Could also stringify this as a hexadecimal number/base64 if we want it be more readable.
* Random number generator. Same formatting options as above
* Add a new sequence to our database and select the next value whenever we need it. Guaranteed unique as long as we are the only cover art provider (ie, there is no distribution).

Of course, open to other ideas, maybe there is something simpler.