Archived
This forum has been archived. Please start a new discussion on GitHub.
generateUUID()
Hi,
We need to generate a global unique identificator for different machines, to identify them in a server. In order to achieve that, we were thinking about using the generateUUID() function on each computer, to self-generate the identificator. Is this a good approach? What are the chances that two different machines get same number? Which algorithm is using this function?
Thank you in advance
We need to generate a global unique identificator for different machines, to identify them in a server. In order to achieve that, we were thinking about using the generateUUID() function on each computer, to self-generate the identificator. Is this a good approach? What are the chances that two different machines get same number? Which algorithm is using this function?
Thank you in advance
0
Comments
-
Hi,
On Windows we rely on UuidCreate and on Unix platforms we generate a random sequence of bytes along with the process ID. See the source code for the details.
Cheers,
Benoit.0 -
0
-
Hi,
On Unix platforms, we generate the version 4 UUIDs described in the RFC with the exception that we replace the last 2 bytes with the process ID (this was necessary to work-around a Linux kernel bug).
Cheers,
Benoit.0