> Another means of doing this is having some parsing in the driver, parse out
> the column that the shard is on and column values. Not sure about this one,
> but this is pretty much how one of the commercial sharding solutions does
> it.

Yup, that is how dbshard does it.

> 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 :).

> 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.

> Hmmm... or is it better to do this at the application level?

If you will see my previous email, I have tried to come up (rather,
borrow :)) with a 'framework' that allows maximum flexibility at the
application level, and at the same time have most of it done for you.

> I'm responding to the original post and I know there have been a bunch of
> replies, but I thought I would get my thoughts on replying to this original
> question down in an email.

Thanks :).

-- 
Anurag Priyam
http://about.me/yeban/

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to