#328 new
jeff

sharding support

Reported by jeff | May 30th, 2008 @ 04:39 PM | in 1.x

would be nice for DM to have support for sharding like http://www.hivedb.org does for java.

Comments and changes to this ticket

  • Dan Kubb

    Dan Kubb June 5th, 2008 @ 01:35 AM

    jeff, I'm curious how you think this would work? I've not used hivedb before, but how do you see it fitting in with DataMapper?

  • Sam Smoot

    Sam Smoot June 5th, 2008 @ 11:03 AM

    Yehuda and I have been talking about this a bit. I think we can do something in Repository to handle this. So instead of Repository -> Adapter being 1:1, it'd become 1:N(readers)+N(writers).

    Obviously the idea needs more fleshing out, but whatever the solution, I think we can extend the capabilities of the existing system rather than adding a bunch of new classes, and we have to be ultimately concerned that the Adapters should not be aware of the sharding at all.

    This way, eventually, you might have in-memory storage for readers for example, and database storage for a writer, and the readers are updated through a background synchronization process.

    Just to throw out something wild. ;-) But it's vitally important the Adapters remain ignorant as much as possible. dm-core should do all the heavy lifting as a general philosophy.

  • Adam French

    Adam French June 12th, 2008 @ 01:00 PM

    • → Milestone changed from “” to “1.x”
  • Diogo Almeida

    Diogo Almeida August 21st, 2008 @ 05:31 AM

    • → Tag changed from “” to “feature suggestion”

    For reference:

    ActiveRecord sharding with DataFabric, by FiveRuns: http://blog.fiveruns.com/2008/7/...

    Read slaves with ActsAsReadOnlyable plugin (not sharding but a lot of sharding setups use read slave clusters): http://revolutiononrails.blogspo...

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins