-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Shard ID design question
PostPosted: Tue Oct 09, 2007 6:01 am 
Newbie

Joined: Tue Aug 07, 2007 2:31 am
Posts: 11
I am dividing my data into shards based on which user it belongs to.


My initial plan was take the user ID modulo the number of shards to determine which shard a user belongs to. The problem is my ShardSelectionStrategy gets called before an ID is assigned to the user via a ShardedTableHiLoGenerator. I can, however, get around this by generating the IDs outside of hibernate and assigning them directly to the User at object creation time.

My questions are a) Overall is this sharding strategy sound? b) Is there a way to have hibernate assign the IDs

Thanks,
Eric


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.