[development] Unique/Random IDs and drupal

Ethan Fremen ethan at acquia.com
Sun Aug 10 21:52:17 UTC 2008

On Aug 10, 2008, at 5:11 PM, Konstantin Käfer wrote:
> 32 bit allow for more than 4 billion unique IDs. If any site goes  
> over it, they can easily change their columns (or rethink their data  
> model).

I would definitely accept random 32 bit identifiers as a step in the  
right direction.

That being said, on any 64 bit machine, the 32 bit identifier is  
represented internally as a 64 bit identifier anyway. It is totally  
conceivable to me that the set of drupal sites in existence could  
quickly encounter collisions with a 32 bit identifier.

Again, a driving use case is "two drupal sites that were founded  
independently of any knowledge of each other would like to merge their  

Whenever you're using a hash function to generate identifiers, having  
a key space that is close to the size of the number of keys  
dramatically increases the chance that a collision will occur. By  
using a 64 bit identifier, we minimize that chance.

Thanks for your feedback,

~ethan fremen

More information about the development mailing list