Custom UUID generator in rails?
Answers
Answered by
0
Hii Mate!!
Hope You Might Like It
A Globally Unique Identifier (GUID) is an identifier designed to be a unique reference. GUIDs are commonly 128-bit numbers represented as several sequences of hex digits. A Universally Unique Identifier (UUID) actually refers to one particular variant of a GUID, which has several versions; that means UUIDs are a subset of GUIDs, albeit a very large one.
GUIDs are commonly represented by hex digits in several groups separated by dashes, such as:
BA8D6569-9208-4DBB-9357-A4500838101E
Within the GUID structure, certain digits have specific meanings, indicated by different letters in the template below:
xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx
The top three bits of the N digit specify the variant of the GUID, of which several are defined. In a UUID, the upper two of those bits will always be "10", meaning the N digit will always be 8, 9, A, or B.
Assuming we have a UUID, the M digit specifies the version of the UUID. The most common version in use today is version 4, in which all of the "other" bits in the GUID (122 in all) are set using a random or pseudorandom number generator. Other versions of UUID sometimes seen include a "sequential" version that fills in parts of the GUID with the MAC address of the generating computer and the current timestamp, calculated to a 100-nanosecond boundary.
GUIDs have a number of different applications. In Microsoft COM programming, they are used to identify classes (CLSIDs), interfaces (IIDs), type libraries (LIBIDs), and a variety of other things. They are sometimes used in databases as a guaranteed-unique key for a row. Second Life uses GUIDs to identify assets (objects, avatars, etc.) within its master world database. IQNavigator FrontOffice internally identifies such things as UI request transactions and integration jobs with GUIDs.
Of course, the major value of GUIDs is in the fact that they can be considered effectively unique, no matter how they were generated. You are over 30 octillion times more likely to win the Powerball than to generate two identical "random" UUIDs using the version 4 scheme.
Regards Vishal_________(BhamBhamBhole)
__
#BeBrainly✌✌
Hope You Might Like It
A Globally Unique Identifier (GUID) is an identifier designed to be a unique reference. GUIDs are commonly 128-bit numbers represented as several sequences of hex digits. A Universally Unique Identifier (UUID) actually refers to one particular variant of a GUID, which has several versions; that means UUIDs are a subset of GUIDs, albeit a very large one.
GUIDs are commonly represented by hex digits in several groups separated by dashes, such as:
BA8D6569-9208-4DBB-9357-A4500838101E
Within the GUID structure, certain digits have specific meanings, indicated by different letters in the template below:
xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx
The top three bits of the N digit specify the variant of the GUID, of which several are defined. In a UUID, the upper two of those bits will always be "10", meaning the N digit will always be 8, 9, A, or B.
Assuming we have a UUID, the M digit specifies the version of the UUID. The most common version in use today is version 4, in which all of the "other" bits in the GUID (122 in all) are set using a random or pseudorandom number generator. Other versions of UUID sometimes seen include a "sequential" version that fills in parts of the GUID with the MAC address of the generating computer and the current timestamp, calculated to a 100-nanosecond boundary.
GUIDs have a number of different applications. In Microsoft COM programming, they are used to identify classes (CLSIDs), interfaces (IIDs), type libraries (LIBIDs), and a variety of other things. They are sometimes used in databases as a guaranteed-unique key for a row. Second Life uses GUIDs to identify assets (objects, avatars, etc.) within its master world database. IQNavigator FrontOffice internally identifies such things as UI request transactions and integration jobs with GUIDs.
Of course, the major value of GUIDs is in the fact that they can be considered effectively unique, no matter how they were generated. You are over 30 octillion times more likely to win the Powerball than to generate two identical "random" UUIDs using the version 4 scheme.
Regards Vishal_________(BhamBhamBhole)
__
#BeBrainly✌✌
Similar questions
Computer Science,
7 months ago
Science,
7 months ago
Science,
1 year ago
Science,
1 year ago
Math,
1 year ago