TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

RFC 9562: Universally Unique IDentifiers (May 2024)

48 pointsby htunnicliffabout 1 year ago

8 comments

londons_exploreabout 1 year ago
&gt; UUIDv7 features a time-ordered value field derived from the widely implemented and well-known Unix Epoch timestamp source, the number of milliseconds<p>This just seems to be a way of creating a huge class of subtle bugs. Now, when two things happen to be created in the same millisecond, they may or may not be monotonically increasing.<p>Plenty of systems will end up accidentally depending on the ordering of the UUID&#x27;s being the same order the UUID&#x27;s were generated in. And that will hold true till the system hits production and suddenly there is enough load for that not to be true for a handful of records and the whole system fails.
评论 #40348428 未加载
swyxabout 1 year ago
i collect a list of UUID implementations and concerns to think thru here <a href="https:&#x2F;&#x2F;github.com&#x2F;swyxio&#x2F;brain&#x2F;blob&#x2F;master&#x2F;R%20-%20Dev%20Notes&#x2F;uuid%20list.md">https:&#x2F;&#x2F;github.com&#x2F;swyxio&#x2F;brain&#x2F;blob&#x2F;master&#x2F;R%20-%20Dev%20No...</a>
htunnicliffabout 1 year ago
TL;DR: Several new UUID versions have been standardized<p><i>UUIDv5 is meant for generating UUIDs from &quot;names&quot; that are drawn from, and unique within, some &quot;namespace&quot; as per Section 6.5.</i><p><i>UUIDv6 is a field-compatible version of UUIDv1 (Section 5.1), reordered for improved DB locality. It is expected that UUIDv6 will primarily be implemented in contexts where UUIDv1 is used.</i><p><i>UUIDv7 features a time-ordered value field derived from the widely implemented and well-known Unix Epoch timestamp source, the number of milliseconds since midnight 1 Jan 1970 UTC, leap seconds excluded. Generally, UUIDv7 has improved entropy characteristics over UUIDv1 (Section 5.1) or UUIDv6 (Section 5.6).</i><p><i>UUIDv8 provides a format for experimental or vendor-specific use cases. The only requirement is that the variant and version bits MUST be set as defined in Sections 4.1 and 4.2. UUIDv8&#x27;s uniqueness will be implementation specific and MUST NOT be assumed.</i><p><i>The only explicitly defined bits are those of the version and variant fields, leaving 122 bits for implementation-specific UUIDs. To be clear, UUIDv8 is not a replacement for UUIDv4 (Section 5.4) where all 122 extra bits are filled with random data.</i><p>Background for the changes:<p><i>Many things have changed in the time since UUIDs were originally created. Modern applications have a need to create and utilize UUIDs as the primary identifier for a variety of different items in complex computational systems, including but not limited to database keys, file names, machine or system names, and identifiers for event-driven transactions.</i>
pspeter3about 1 year ago
I&#x27;m curious why they specify the UUID must have dashes in string format. It makes the UUID difficult to select with a double click.
评论 #40353861 未加载
评论 #40349322 未加载
评论 #40349044 未加载
评论 #40346265 未加载
deathanatosabout 1 year ago
&gt; <i>Some UUID implementations, such as those found in Python and Microsoft, will output UUID with the string format, including dashes, enclosed in curly braces.</i><p>No … Python doesn&#x27;t emit them enclosed in curly braces?<p><pre><code> &gt;&gt;&gt; str(uuid.uuid4()) &#x27;593a2ffb-eafc-484a-9a90-93bc91805651&#x27;</code></pre>
LegionMammal978about 1 year ago
&gt; UUIDv7 features a time-ordered value field derived from the widely implemented and well-known Unix Epoch timestamp source, the number of milliseconds since midnight 1 Jan 1970 UTC, leap seconds excluded.<p>That seems like a rather vague way of addressing leap seconds for UUIDv7. For positive leap seconds, an &#x27;exclusion&#x27; of that second would suggest that the millisecond counter is halted until the leap second is over, which doesn&#x27;t seem ideal for monotonicity. And an &#x27;exclusion&#x27; of a negative leap second hardly makes any conventional sense at all, with regard to the millisecond counter.<p>Contrast with the timestamp of UUIDv1&#x2F;v6, where positive leap seconds can just be handled by incrementing the clock sequence.
评论 #40346110 未加载
评论 #40345532 未加载
评论 #40345548 未加载
ComplexSystemsabout 1 year ago
Surprising we&#x27;re using 128 bits - some back of the napkin math tells me that may not be enough to avoid collisions...
评论 #40345537 未加载
评论 #40345528 未加载
评论 #40345436 未加载
评论 #40345465 未加载
评论 #40345519 未加载
cachvicoabout 1 year ago
HNGPT, please summarize the important changes?
评论 #40345343 未加载