Publishing the details of the Get ( UUID ) function would better help advanced developers to understand the probability of collision in the systems they build.
The content in the results from Get ( UUID ) identifies it as a type 4 UUID. This means it has some status bits indicating what kind of UUID it is, and the remaining 122 bits are (should be) randomly generated. Presuming that FileMaker is using a good quality random number generator, there are plenty of repetitions available of the brief description of the probability of collision with type 4 UUIDs.
Are you asking specifically for which random number generation algorithm (and seed, if applicable) in FileMaker's implementation of Get ( UUID ) (or what OS utility is used)? I suppose that could be comforting to some of us to know. What difference would it make to our apps? If the RNG isn't strong enough for a developer's comfort, I suppose they'd resort to using a different UUID generation mechanism they're more confident in or stick to serial numbers; but for the developers who care that much, shouldn't they already be doing those now in the absence of more detailed information? I suppose the developers already doing those now might be comfortable using Get ( UUID ) after hearing good news.
it should not be random.
Apps should use OS functions to avoid getting duplicates.
OS UUIDs are also usually randomly generated.
The request for details would help in quantifying custom function based unique value generators from Get ( UUID ).
I would rather make choices based on testing and evidence than guesswork and trust.
All random number generators can fail at uniqueness. Random and Unique are separate qualities.
Tell us what's in FM's UUID!
FileMaker just leverages OS APIs, so the documentation source would be the vendors.
On macOS it is obtained via "CFUUIDCreate()"
On Windows it is obtained via "::UuidCreate()"
I would expect this to be consistent with almost all apps on those platforms that generate UUIDs.
Looks like we can mark this one 'Delivered'.
I can confirm that Draco::UUniqueID::Generate calls CFUUIDCreate and that function uses internally a hash map to avoid collisions.
But the does not guarantee unique values when using several computers in a network.
Confirm? Ok good. @David_Mckee's word was good enough for me.
Well, you can use Activity monitor to check what's going on in FileMaker while you run a script which generates thousands UUIDs. That is what I did because I was curious to see.
This way I noticed it's in the support framework and not part of the DB or FM engine itself.
In that there is no 100% guarantee of uniqueness to begin with, the issue of Network usage isn't too relevant because the UUID likely includes (at least part of) the MAC address.
Though the documentation on it is quite sparse, so who knows...
Given the OS API documentation available, it looks like the precise answers will only be available to folks willing to stack trace the OS functions. Even non-cryptographic random number generators are typically provably uniform. That and reasonable seed selection is all we need for the collision probability calculations already done to be valid in non-adversarial settings. It would be mind-blowingly incompetent for a poorly seeded non-uniform RNG to make its way into the OS UUID widget, and I strongly doubt Apple or Microsoft engineers are that mind-blowingly incompetent. That would be like John Roberts forgetting what a tort is.
What choices would you make, exactly? What information about Get ( UUID ), if true, would make you use custom functions doing what? What alternate-universe information about Get ( UUID ) would make you do what different? In the absence of information, you might make a minimax choice instead: What would you do, assuming the worst? (And why not just do that?)
I was just typing that almost exact response.
jbante wrote: The content in the results from Get ( UUID ) identifies it as a type 4 UUID. This means it has some status bits indicating what kind of UUID it is, and the remaining 122 bits are (should be) randomly generated.
The content in the results from Get ( UUID ) identifies it as a type 4 UUID. This means it has some status bits indicating what kind of UUID it is, and the remaining 122 bits are (should be) randomly generated.
On Macintosh I see that Get(UUID) shows itself to be RFC 4122 type 4 UUID values.
The UUID generated on Windows has the 32 hex-char structure of RFC 4122 but does not appear to have any consistent information in the version bits.
Can anyone clarify if ::UuidCreate() on Windows adheres to any version of RFC 4122?
There are no exact details in the MS knowledge-base, that I could find, pinning down if the UUID conforms to any specific standard. However, these may help provide some clues, assuming they are true:
Is there an algorithm to compress a version 4 GUID to less than 16 bytes? - Stack Overflow
GUID/UUID C generator - Ars Technica OpenForum
DCE 1.1: Remote Procedure Call - Universal Unique Identifier
Hope this helps!
Retrieving data ...