I have a list of unique 8 byte random ids and new ids are generated often. Let's say that the total number of ids can become at most
N (let's say 100,000). Now, I want to map each of these ids to a unique position in an array of size N. What is the best way to map it?
Context: I was reading about how instant chat messaging systems like facebook/skype/googlechat keep track of presence and apparently, they just maintain one large array and index it based on user id which is a 8 or 16 byte unique random id.