I have been giving some thought to the need for a global unique ID since I recently realized that I need this myself as part of my networking system. I need to be able to create objects on each computer with completely unique ID's which will not be duplicated anywhere else, regardless of whether the computers are connected or not.
It seems a number of schemes are used but I'm not entirely happy with trying to use some from the hardware.
I can see how the `address space` of the CPU and its boundaries are what create the need for something that goes beyond that space, and it is because the CPU and memory are separate in each computer that the problems of creating a non-duplicated ID comes about.
I also philosophized somewhat and realized that as you approach uniqueness, you are approaching anonymity, and you need that anonymity in order for the uniqueness to be there, but unfortunately the more anonymous you get the less the ID has any meaning and can't be based on anything that came before. So it can't really be based on the MAC address or derived as a hash value from some input data etc. Absolute uniqueness is impossible, you can only have a reasonably high degree of uniqueness, in the hope that it is enough to represent a lot of separate objects for a long period of time without repetition. So you have to base the ID on some kind of pre-existing data, which leaves a paper trail, which means it is not anonymous and can be cracked and possibly duplicated someday.
So I decided not so much to even bother trying to go for a completely anonymous ID, or one that is completely unique. Instead I think I will just go with using a centralized server that generates and knows about all ID's and transfers them to the client machines upon request. Then you can create unique ID's simply by keeping a COUNT of how many ID's have been created, where the counter is the ID. With, say, a 64-bit counter, or 128-bit using a couple of Long's and some slightly more `manual` math operations, that gives you a lot of objects to be created that you know are absolutely unique, not repeated, and *almost* meaningless/anonymous. Since the server knows all the numbers generated so far (because they are 0..Current) it will only ever produce unique ones up until the limits of the number storage. We know that even an Int could store over 2 billion unique numbers. The numbers don't really mean anything. They don't identify a specific time or place and only allude to a possible vague position in time when they were created. The more vague and meaningless the ID is the better. Random would, in a way, be even better, but there is no such thing as absolute randomness - there is always some chance of repetition.
So anyway, I think I will just give up trying to make it truly unique (which is impossible) or completely anonymous (which is impossible) and just settle for a server-based generation of ID's. Simple, easy and fast. I don't think people are going to use my software in very big groups, just small groups, so it should be sufficient. I think if you were trying to have huge numbers of computers networked like the internet you'd want a more sophisticated ID system and would probably have to work with the MAC address or some cryptographic random number generator thing.
It seems a number of schemes are used but I'm not entirely happy with trying to use some from the hardware.
I can see how the `address space` of the CPU and its boundaries are what create the need for something that goes beyond that space, and it is because the CPU and memory are separate in each computer that the problems of creating a non-duplicated ID comes about.
I also philosophized somewhat and realized that as you approach uniqueness, you are approaching anonymity, and you need that anonymity in order for the uniqueness to be there, but unfortunately the more anonymous you get the less the ID has any meaning and can't be based on anything that came before. So it can't really be based on the MAC address or derived as a hash value from some input data etc. Absolute uniqueness is impossible, you can only have a reasonably high degree of uniqueness, in the hope that it is enough to represent a lot of separate objects for a long period of time without repetition. So you have to base the ID on some kind of pre-existing data, which leaves a paper trail, which means it is not anonymous and can be cracked and possibly duplicated someday.
So I decided not so much to even bother trying to go for a completely anonymous ID, or one that is completely unique. Instead I think I will just go with using a centralized server that generates and knows about all ID's and transfers them to the client machines upon request. Then you can create unique ID's simply by keeping a COUNT of how many ID's have been created, where the counter is the ID. With, say, a 64-bit counter, or 128-bit using a couple of Long's and some slightly more `manual` math operations, that gives you a lot of objects to be created that you know are absolutely unique, not repeated, and *almost* meaningless/anonymous. Since the server knows all the numbers generated so far (because they are 0..Current) it will only ever produce unique ones up until the limits of the number storage. We know that even an Int could store over 2 billion unique numbers. The numbers don't really mean anything. They don't identify a specific time or place and only allude to a possible vague position in time when they were created. The more vague and meaningless the ID is the better. Random would, in a way, be even better, but there is no such thing as absolute randomness - there is always some chance of repetition.
So anyway, I think I will just give up trying to make it truly unique (which is impossible) or completely anonymous (which is impossible) and just settle for a server-based generation of ID's. Simple, easy and fast. I don't think people are going to use my software in very big groups, just small groups, so it should be sufficient. I think if you were trying to have huge numbers of computers networked like the internet you'd want a more sophisticated ID system and would probably have to work with the MAC address or some cryptographic random number generator thing.