re: What would you use as a sortable, globally unique, ID? VIEW POST


I think simply Unix timestamp + {node_id_with_pedding_zeros} will do


Hi fpim, thanks for your input!

What if you don't have control of the node?
What if two parallel processes generate an ID at the same exact time?

You can understand why this is risky.

Version 1 of UUID did exactly that: used a timestamp and the MAC address of the machine. The problem was that MAC addresses can be spoofed (it means I can use another machine's MAC address on mine) and those UUIDs can also be traced to the machine creating them.

For these reasons it was deprecated.

Code of Conduct Report abuse