Jump to content

Talk:Universally unique identifier

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Lowercase sigmabot III (talk | contribs) at 04:27, 16 September 2023 (Archiving 1 discussion(s) to Talk:Universally unique identifier/Archive 1) (bot). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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

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?

Upcoming versions

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 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.

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.

On the draft state, its worth mentioning its been worked since 2021 and there are implementations out there (JS: 1, 2).

Thoughts? Leite~enwiki (talk) 17:08, 17 August 2023 (UTC)[reply]

Citation needed

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]