[development] Unique/Random IDs and drupal

Earnie Boyd earnie at users.sourceforge.net
Sun Aug 10 23:00:32 UTC 2008


Quoting Ethan Fremen <ethan at acquia.com>:

>
> a.) it makes it impossible to shard the DB because you have to  
> coordinate what the next sequence ID is, a huge problem with scaling.
> b.) it makes it difficult to merge two (or more) existing DBs, 
> whether  development/production or otherwise.
> c.) it means that every drupal site has namespace collisions all over 
>  the place with every other drupal site.
>

I think you go about the problem incorrectly.  Any merging of data 
would need to use the Drupal API to do that merge.  You therefore do 
not need to know what the next id is because you simply shouldn't care. 
  When merging the data from DB-2 into DB-1 you do not supply the id's 
to the data from DB-2 and allow Drupal to create new id's in DB-1.  As 
for your supposed namespace collisions between sites, that is the 
nature of all data when two merge to one.  It is the job of the one 
doing the bridging to overcome that issue but overcoming that issue 
shouldn't involve needing to make your id's 64bit.

What do you do with users who have subscribed to both sites?  What do 
you do with nodes with matching titles?  The dilemma you describe can 
only be resolved by the rules set forth by the business acquiring DB-2.

Earnie -- http://for-my-kids.com/
-- http://give-me-an-offer.com/



More information about the development mailing list