Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can easily look it up on Wikipedia. [1]

But version 1 of UUID's, for example, concatenates a MAC address, a timestamp, and a "uniquifying" clock sequence.

As long as you're ensuring your MAC addresses are all unique (which they should be, except for manufacturing error) and only one UUID library per device, collisions are impossible.

Whereas with random numbers, there's always a chance of collisions. (There are also other versions of UUID's that do include randomness, with collision potential, in exchange for not revealing information such as timestamps and MAC addresses.)

[1] https://en.wikipedia.org/wiki/Universally_unique_identifier



Ah, got it. Reading the spec, that seems like an awful lot of trouble to prevent something that will never happen anyway.

Just wondering, can v1 guarantee uniqueness with multiple processes using the same network adapter or within containers?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: