Y
Hacker News
new
|
ask
|
show
|
jobs
by
hanszarkov
886 days ago
I've used the BSON Java ObjectId for distributed primary key generation for a long time. Really useful for distributed systems.
1 comments
salil999
885 days ago
It's specifically advised NOT to use ObjectId for distribution. This data type has a notion of time embedded in it which results in monotonically increasing ObjectIds. Use UUID or a hashed version of the ObjectId
link