On Mon, 2011-04-04 at 15:33 +0530, Anurag Priyam wrote: > > The other way is to do it like libgearmand or libdrizzle, using a server > > list and some sort of hashing and distribution. > > That was the initial plan I believe, and how I would like to go ahead > with it :).
Correct. > > There does arise the issue of how to combine result sets across shards. This > > is a bit of work, as you also have to think about how to deal with order by > > and limit - combining result sets, ordering the records and skimming off the > > top. > > Yeah, this is a bummer. Almost all the times (I could be terribly > wrong here) an application knows whether it should it needs to query a > shard (based on a key), or perform a distributed query (no key, sort, > order). So, my idea is to have something like this: > > drizzle_shard_query(key, query) > drizzle_distributed_query(query) > > and maybe a wrapper over them, which delegates the call to one of > those functions: > drizzle_query(query, key = nil) > > However, I am quite apprehensive about the design, and would like to > see how other databases do it, and get some feedback, before going in > that direction. I'm not quite sure on changing drizzle_query(). I personally think this API should be separate from drizzle_query() but I'm open for discussion. Kind Regards -- Andrew Hutchings - LinuxJedi - http://www.linuxjedi.co.uk/ _______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

