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.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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.