On Sun, May 2, 2010 at 2:52 AM, Continuation <[email protected]> wrote: > Hi, > > I read the doc on the multi-database feature in 1.2. It seems it's > mostly geared towards vertical partitioning of databases. > > Any way to use it for horizontal sharding? > > For example, say I have a Message class. I want to use a hash on > Message.id to point to a database server where the specific message > will be stored. > > Is there any way to do that with the multi-database support in 1.2?
It should be possible. A router that uses the hint objects (in your case, the hash of Message.id when the hint is a message) should be able to implement a sharding behavior. There are, of course, many little details -- for example, if an object has foreign keys to another object, both objects need to be routed to the same shard. However, these details mostly fall into the implementation of your application logic or your router logic. Yours, Russ Magee %-) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

