performance impact of many buckets?

Brian Hammond brian at brianhammond.com
Wed Oct 7 23:18:51 EDT 2009


I'm considering writing a Twitter clone (the post-modern "Hello World"  
of nosql) as a means to learn the ins and outs of Riak.

Here's some off-the-top-of-my-head ideas on how to design something  
like (an incomplete) Twitter.  Please comment on what is and isn't a  
good idea design-wise due to performance implications or feature usage  
or lack thereof.

Alright, let's just start with Users.

Either:
1) each user is a bucket (/jiak/brian); or
2) each user is a document in the 'users' bucket (/jiak/users/brian).

Thoughts?  Any implications of having a "large" number of buckets, or  
having a "large" number of documents/keys in a single bucket?  Any  
general design guidelines here?

Following and Followers.  User A follows B, C and is followed by D,  
E.  I suppose this could be links in the user's document.  Perhaps the  
links would be to the other user's documents and the link tag per link  
either 'following' or 'follower'.  Thoughts?

Tweets.  Either links in the user's document with link tag 'tweet' or  
perhaps stored in the user's document directly.  Thoughts?

Feel free to extend this very trivial model if you feel it would  
better explain certain things about treating Riak well.

Thanks,
Brian




More information about the riak-users mailing list