-
Notifications
You must be signed in to change notification settings - Fork 9
Conversation
Is there a reason for creating these as new documents rather than revising the existing ones? Seems like it'd be easier to review if we could see side-by-side changes in this PR. |
@broofa fixed |
Isn't this the NIL UUID?
While I appreciate the simplicity of this approach, I thought we'd resolved to stick with the RFC4122 locations / definitions for the |
Good point, yes that's the same thing. It's interesting that RFC4122 doesn't indicate the semantic meaning of a Nil UUID or when one would use it. Seeing that there is no specified use for it, I think it makes sense to recommend a check for Nil UUID as a valid substitute for "is this a valid UUID", in the interest of discouraging unnecessary UUID introspection. Let me know if you think otherwise.
We discussed this here but I don't feel like there is a convincing-enough argument against combining these into one field. I'll drop another comment on that ticket so we can carry on the discussion further there if needed. Other than that, what do you think of the layout overall? Does it seem simpler and more approachable? |
I am all for being streamlined in getting the need-to-know up front then discussing some of the finer details at the end. I knocked out a few things today:
|
Work on 2-16-2022 (ignore the 2021 typo in the commit...):
|
Let's not mess with the verbiage around the Nil UUID.
... for example, it serves as a good placeholder for "null" or "undefined" in places where type constraints otherwise require a valid UUID (e.g. dbs or typed languages). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of comments / questions. Didn't quite get to the end, but I have to get to work.
Wait... we're going with fixed-length unix milliseconds and doing away with all the node/counter/subsecond time stuff for version 7 now? I'm not opposed to this (in fact, I rather like the new format... a lot), but this sweeps a lot of previous discussion aside. I feel like I missed something. |
Summary of work for 2-17-2022
Edit: still a ton left to do. I will resume work on Draft 03 Monday. |
I definitely agree with this. I'll update the language to remove mentions of validation and essentially say the above. The point of the earlier text is that I think UUID validation is generally unnecessary (because everywhere else on the internet when someone generates an ID, the thing storing it just says "thanks" not "this ID is in an invalid format" - I think it's the complexity of RFC4122 that causes people to feel that validation is necessary when in fact I think it's just unneeded complexity that serves practically no purpose). But yeah, just saying "If you need to express the concept of 'there is no UUID here', e.g. database NULL, you can use the Nil UUID" - that totally works. Regarding variable length and text formats, let's move that to the separate issues, I'll tag you and Fabio there and we can hash those points out. |
Yeah this is one of the reasons I wanted to get this new draft being looked at. Based on our discussion about typical clock resolutions, and my experience just trying to explain the concept to people, I changed my position on this idea of variable time length encoding to be not worth the effort. Such a scheme is still possible in UUIDv8 if it's really needed. But basically most of the people I talked to about it sort of just scratched their heads and went "hm, uh I guess so, I sort of think I get it". Neither my explanation, nor the need for such a system seemed to proove useful after the shopping the idea around. So I'm okay to just get it over it and go with a milliseconds timestamp. It will be a lot easier for folks to implement, and I think serves the purpose quite well. |
I kinda miss and would appreciate the smart subsec fraction idea, but the choice of timestamp encoding might be a trivial issue because, for a given size of binary timestamp field, the same information can be placed regardless of encoding techniques. R.I.P. |
At the risk of horsing a dead beat... Is there a reason Seems like a waste. E.g. a 44 bit
|
A 44 bits millisecond field gives 500 years of lifespan. It's more than enough in my opinion. At the end of this lifespan, we probably won't be using UUIDs anymore, unless something goes wrong along the way (Madmax, Skynet, etc). The remaining 20 bits in
So I agree that maybe 48 bits is too much. P.S. a 20-bit counter can gives us 1 billion monotonic UUIDs per second instead of just 65k. UUIDv1 gives us 10 million. |
This is just where the logical previous I am totally fine to drop this down to 44 bits and give some bits back to Edit: and ULID uses 48 bits for timestamp. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nits, and one big ask (remove var_ver
concept until we've definitively concluded it's the right approach.)
For UUID versions 7 and 8, the variant field has been incremented and | ||
the version field has been moved to the same octet as the variant. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Guess I'll make a nuisance of myself by asking that we revert this var_ver
field concept until #26 has been resolved.
As I said, I feel it's incumbent upon @bradleypeabody to make a better case for why a new variant is needed, so I'd prefer it if we didn't just default to this in the event that conversation peters out.
On some of these recent changes, I think we're loosing some important aspects that work together:
|
The only objection I have against moving the version number closer to the variant is that it reserves 2 more bits. Perhaps it is more beneficial, in terms of entropy gain, to remove the version number altogether and just create a versionless 'E' variant. But it would exclude what we now call UUIDv8. Alternatively, we could create an 'E' variant plus 1 bit (or 2 bits) to separate the key spaces for UUIDv7 from UUIv8. But it would require other names for them. EDIT: the metaphor was removed from this comment for not being objective. |
There is a single TODO! @bradleypeabody I need a C code snippet for UUIDv7 in the appendix! Work from today:
Edit: |
@kyzer-davis Great! UUIDv7 generation in C:
|
Today's changelog:
At this point I do not have any additional items to change and all of the TO DOs are gone. I will return Monday to check this thread and work on any required items called out to me. Cheers, Edit: |
Where are we at with #26? I'm concerned that our rationale for changing the variant won't hold up to scrutiny once this spec is published. BTW, have we reached out to any of the original RFC authors for feedback on all of this? ( |
This is a good point. I think richsalz was involved in some of the early discussion on the IETF mailing list, IIRC, but that discussion was years ago now and the idea has of course changed a lot since. Getting the 03 draft to the IETF is a good way to get feedback. Most of the early IETF mailing list discussion culminated in (to parapharse) "just make a draft, so we can see what you're talking about in detail". |
Thanks to everybody for helping review the current Draft 03! I may be the one editing the XML file but the groups feedback is beyond invaluable! Today's changelog:
|
@kyzer-davis Here is what I'm thinking in terms of a newer and simpler format:
There are still various TODOs in there, which I plan on filling in later in the coming week. And a lot of the text under UUID Concerns is still pretty terse and note-like, but I think that can be fixed up as well without too much trouble. I also left the previous text down at the bottom as comments for easy reference in case I moved stuff out that we want to bring back.
But yeah, let me know what you think in terms of the overall approach with this.