TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Understanding How UUIDs Are Generated

169 点作者 aryamansharda超过 4 年前

6 条评论

Vanderson超过 4 年前
After discovering ULIDs [0] I can&#x27;t see ever using UUIDs ever again.<p>ULIDs are sortable (time component), short (26 chars) and nearly human readable, and good enough entropy&#x2F;randomness for everything I&#x27;d ever be working on.<p>Does anyone have any criticisms of ULIDs? I can&#x27;t see how they don&#x27;t take over general purpose use of unique ids in the future except where a more guarantee of uniqueness is needed. (ie, bajillion records a second unique...)<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;ulid&#x2F;spec" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ulid&#x2F;spec</a>
评论 #24645786 未加载
评论 #24646155 未加载
评论 #24648514 未加载
评论 #24644825 未加载
评论 #24648274 未加载
评论 #24645109 未加载
评论 #24646393 未加载
评论 #24648910 未加载
评论 #24649327 未加载
评论 #24644952 未加载
评论 #24646617 未加载
评论 #24648729 未加载
评论 #24646270 未加载
hprotagonist超过 4 年前
<a href="https:&#x2F;&#x2F;tools.ietf.org&#x2F;html&#x2F;rfc4122" rel="nofollow">https:&#x2F;&#x2F;tools.ietf.org&#x2F;html&#x2F;rfc4122</a> is good reading.
评论 #24646675 未加载
userbinator超过 4 年前
In my experience, &quot;UUID&quot; often means nothing more than &quot;take 16 bytes from a CSPRNG&quot;.
paledot超过 4 年前
The different strategies are interesting, but I don&#x27;t understand the bit flags. Why would you want your ID to include a record of how it was generated? Some use cases go out of their way to obfuscate that information, and one selling point of UUID over auto increment is that you can&#x27;t infer missing items or how many are being created by watching PKs.<p>It&#x27;s cool that I can make deterministic UUIDs, but it seems silly that the spec should require me to expose the fact that it&#x27;s deterministic. It&#x27;s not like my deterministic UUID is any more likely to collide with someone else&#x27;s random one than two deterministic or two random are to collide with each other.
评论 #24648474 未加载
timonoko超过 4 年前
Xcuse me asking, but is there some standard way to make a copied partition in Ubuntu bootable as an unique entity? First you change the UUID in Gparted and then you waste an hour rebooting and hunting for references to that old UUID. Not good.
评论 #24648491 未加载
评论 #24648789 未加载
buckleyc超过 4 年前
Along with the comments about ULIDs and KSUIDs, some people might want to check out C4 IDs. Webpage at <a href="http:&#x2F;&#x2F;www.cccc.io&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.cccc.io&#x2F;</a>, which has a link to its Github page.
评论 #24647950 未加载