Jump to content

Talk:Universally unique identifier: Difference between revisions

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Content deleted Content added
m Archiving 1 discussion(s) to Talk:Universally unique identifier/Archive 1) (bot
m Removed deprecated parameters in {{Talk header}} that are now handled automatically (Task 30)
 
(9 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Talk header|archive_age=30|archive_bot=Lowercase sigmabot III}}
{{Talk header}}
{{WikiProject banner shell|class=C|
{{WikiProjectBannerShell|1=
{{WikiProject Systems |class=C |importance=Mid}}
{{WikiProject Systems |importance=Mid}}
{{WikiProject Computing |class=C |importance=High }}
{{WikiProject Computing |importance=High }}
}}
}}
{{Merged-from|Globally unique identifier|16 January 2017}}
{{Merged-from|Globally unique identifier|16 January 2017}}
Line 15: Line 15:
}}
}}


== Variants 1 and 2 confusion ==
== Textual representation ==
Move this section up before the Variants and special cases section [[User:Theking2|Theking2]] ([[User talk:Theking2|talk]]) 13:17, 2 March 2024 (UTC)

Several distinctions in the main article seem to be backward (and comments below tend to confirm suspicion). For example, the main article claims that variant 1, aka Leach-Salz, are most common. I believe it is in fact variant 2, aka Leach-Salz, that are most common. For example:

Java UUID documentation, several times refers to variant 2 as the "Leach-Salz" variant, such as: "The layout of a variant 2 (Leach-Salz) UUID is as follows" and "valid only for a UUID with a variant value of 2, which indicates the Leach-Salz variant".

https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/UUID.html

Java's standard UUID.randomUUID() factory method returns version 4, variant 2 by default (as tested and proven).

It is stated that variants 1 vs 2 are distinguished by endian-ness. The article also claims that these distinctions are lost in textual representation (that variant 1 and 2 are the same as text). These may be correct assertions, but of course, one must be sceptical.

I could imagine these inaccuracies may have been introduced when merging the UUID and GUID articles. It may be that variant 1 was the most common GUID and variant 2 is the most common UUID (maybe), yet we now pretend that both UUID and GUID are the same (with different variants and versions).

[[User:Alexgenaud|Alexgenaud]] ([[User talk:Alexgenaud|talk]]) 11:20, 9 November 2022 (UTC)

:Adding a bit to your comment (not disagreeing at all):
:As it stands now, the article uses the terms "variant 1" and "variant 2" in a couple of places, but the section on variants only gives names to the variants and says what is in the 3-bit field to indicate each one. It doesn't number them.
:Way down in section "Version 4 (random)", the article does define in passing what it considers variant 1 and variant 2 to be, in terms of the 3-bit values. That definition makes OSF DCE variant 1 and Microsoft COM/DCOM variant 2. So I guess the idea was that Apollo NCS is variant 0.
:It would be easy to clean this up by defining the variant numbers up in the Variants section or in the variant/field table. Except if other references like the Java documentation number the variants differently, that's not ideal. It would be better to use the same variant numbering as the industry, if that's consistent. A problem with the Java numbering is that it takes the variant field as being only two bits, so both Microsoft COM/DCOM and Reserved for Future Use are 3. [[User:TimMann|Tim Mann]] ([[User talk:TimMann|talk]]) 20:53, 29 June 2023 (UTC)


== What are the different variants of Version 4 UUID's used for? ==
== What are the different variants of Version 4 UUID's used for? ==
Line 56: Line 38:
Guidance? Help? Please?
Guidance? Help? Please?


== Upcoming versions ==
== Citation needed ==

I suggest we make reference to the upcoming updates on UUID from IETF (https://www.ietf.org/archive/id/draft-ietf-uuidrev-rfc4122bis-07.html#name-update-motivation), especially on the "Uses" section, when it goes:


The text says a citation for DomainOS is needed. Here are two:
<blockquote>
The random nature of standard UUIDs of versions 3, 4, and 5, ...may create problems with database locality or performance when UUIDs are used as primary keys.
</blockquote>


Leach, P. J., Levine, P.H., Hamilton, J. A., Stumpf, B.L.,
I think it's helpful to know that one can address UUID v4's issues for DB keys with UUID v7, even though it is still a draft.
"UIDs as Internal Names in a Distributed File System,"
in Proceedings ACM SIGACT-SIGOPS Symposium on Principles of Distributed Computing,
Ottawa, Ont., Aug. 18-20, 1982, pp. 34-41.


Leach, P. J., Levine, P.H., Douros, B. D., Hamilton, J. A., Nelson, D. L., Stumpf, B.L.,
On the draft state, its worth mentioning [https://www.ietf.org/archive/id/draft-peabody-dispatch-new-uuid-format-01.html its been worked since 2021] and there are implementations out there (JS: [https://github.com/LiosK/uuidv7 1], [https://github.com/kripod/uuidv7 2]).
"The Architecture of an Integrated Local Network,"
IEEE Journal on Selected Areas in Communications,
v.SAC-1, n.5, Nov. 1983, pp. 842-857.


Thoughts? [[User:Leite~enwiki|Leite~enwiki]] ([[User talk:Leite~enwiki|talk]]) 17:08, 17 August 2023 (UTC)
The first is more about UIDs in DomainOS, the second is about the OS overall. [[User:Paul Jay Seattle|Paul Jay Seattle]] ([[User talk:Paul Jay Seattle|talk]]) 23:18, 15 September 2023 (UTC)

Latest revision as of 14:11, 10 July 2024

Textual representation

[edit]

Move this section up before the Variants and special cases section Theking2 (talk) 13:17, 2 March 2024 (UTC)[reply]

What are the different variants of Version 4 UUID's used for?

[edit]

From what I can determine, Version 4 UUID's -- the random kind -- have four variants, signified by the 17th hex digit being one of "8", "9", " a", or "b" (which is how I will refer to each variant here).

What are these four different variants for? How are they used? What determines the use of (say) variant "a" rather than variant "8"?

I'm writing a program to generate these UUID's pseudorandomly, and I don't want to make some kind of ghastly error by providing the wrong type of UUID! Is there a reason why one would use one v4 variant and not another? Are some v4 variants more apprpriate for some uses, and others for other uses? The ONLY document I've yet come across that addresses this issue says (in relevant part):

"...Version-4, variant-1 UUIDs are used in the game Minecraft... Version-4, variant-2 is called a "GUID" on Microsoft systems..." (Source: https://www.uuidtools.com/uuid-versions-explained, Retrieved: Fri., 30-Sep-2022 at 08:43:17pm -0400 UTC.)

However, this leaves unanswered qustions. First (and most obvious) is, what about variants 3 and 4 (what I call "a" and "b" above)?

Also, the phrases "are used in" and "is called a" don't tell me whether these variants are exclusively reserved for these uses, or if it is permitted to use them for other, additional, purposes as well.

The main Wikipedia article doesn't even remotely begin to even touch upon this question...

Guidance? Help? Please?

Citation needed

[edit]

The text says a citation for DomainOS is needed. Here are two:

Leach, P. J., Levine, P.H., Hamilton, J. A., Stumpf, B.L., "UIDs as Internal Names in a Distributed File System," in Proceedings ACM SIGACT-SIGOPS Symposium on Principles of Distributed Computing, Ottawa, Ont., Aug. 18-20, 1982, pp. 34-41.

Leach, P. J., Levine, P.H., Douros, B. D., Hamilton, J. A., Nelson, D. L., Stumpf, B.L., "The Architecture of an Integrated Local Network," IEEE Journal on Selected Areas in Communications, v.SAC-1, n.5, Nov. 1983, pp. 842-857.

The first is more about UIDs in DomainOS, the second is about the OS overall. Paul Jay Seattle (talk) 23:18, 15 September 2023 (UTC)[reply]