When are you truly forced to use UUID as part of the design?

前端 未结 16 838
盖世英雄少女心
盖世英雄少女心 2020-11-28 17:39

I don\'t really see the point of UUID. I know the probability of a collision is effectively nil, but effectively nil is not even close to impossible.

16条回答
  •  萌比男神i
    2020-11-28 18:12

    Using the version 1 algorithm it seems that it is impossible collision under the constraint that less than 10 UUIDs per millisecond are generated from the same MAC address

    Conceptually, the original (version 1) generation scheme for UUIDs was to concatenate the UUID version with the MAC address of the computer that is generating the UUID, and with the number of 100-nanosecond intervals since the adoption of the Gregorian calendar in the West. In practice, the actual algorithm is more complicated. This scheme has been criticized in that it is not sufficiently 'opaque'; it reveals both the identity of the computer that generated the UUID and the time at which it did so.

    Someone correct me if I misinterpreted how it works

提交回复
热议问题