3 ms·
MongoDB ObjectID's are designed with similar goal in mind - time based, distributed, uncoordinated, "probably" unique: http://docs.mongodb.org/manual/reference/
by veesahni 13y ago
MongoDB ObjectID's are designed with similar goal in mind - time based, distributed, uncoordinated, "probably" unique: http://docs.mongodb.org/manual/reference/object-id/ http://docs.mongodb.org/manual/reference/object-id/
I say "probably" unique because they depend on the 'machine identifier' being unique, which the ruby driver implements by grabbing the first 3 bytes of the hostname's md5 hash.
- makmanalp 13y agoYep! In essence, this is not too different. I think the main difference is that ObjectIDs are 96 bytes vs simpleflake / snowflake's 64, which fit into standard DB types better. (Don't have to muck around with BINARY and such).