I need to calculate the daily number of unique users of an app.
The only way I can uniquely identify a user is via their UUID (this is externally supplied so I am forced to use it).
I know that my daily user counts are a couple of million users.
I'd like to use a bitset in Redis to do a population count, but in order for this to work, I'd need a way of narrowing my UUID so that it could comfortably fit into a long. I am aware of the potential for collisions but I am not concerned about precise numbers.
Has anyone done this in Java before? What I am after is how I could convert my UUID into something that could fit into a long.