The Right Amount of Randomness: Creating Unique Identifiers

Screen Shot 2015-11-11 at 10.04.28 AM

At we need to be able to quickly assign a unique identifier to each image that users upload to our system.  Reconciling identical images is an important task but not the subject of this blog – we must treat every image we receive like a separate entity even if the file already exists in our database, as it may be accompanied by unique metadata. This seems like a trivial topic – just find an algorithm to spit out some random numbers! But there are many considerations and no pre-baked solutions out there.  And once we start issuing these IDs they’ll become a vital part of our system, referenced in many places and influencing the way we structure our data.  This is not something we want to re-do in the future. Continue reading