Millions of buckets?

Jared Morrow jared at basho.com
Wed May 11 15:25:49 EDT 2011


It seems like what you are needing is a lot what the Yammer guys needed for
their streamie application.   They have a video here:
http://vimeo.com/21598799 about how they modeled their data.   It might be
pretty helpful for your application.   If not, no harm done, you still get
to watch a video from some pretty smart people!

Hope it helps,
Jared

On Wed, May 11, 2011 at 12:39 PM, alexeypro <me at alexeypro.com> wrote:

> I have a need to keep "notifications" for "users", where each user has
> folders "a", "b" and "c". Also every note has "read" status
> Original thought was to create bucket "notifications" which will have the
> key user_id, and the value will be JSON object in some structure like this:
> {
>   user_id: "3ds78df7df8d7f8df7",
>   folder: "a",
>   read: 0,
>   note: "my note here",
>   timestamp: 18298329329
> }
> I am using Riak Search, so say, if I need to find all unread notes in
> folder
> "a" for user_id "3ds78df7df8d7f8df7" I am doing:
>
> select?q=..
>
> user_id:3ds78df7df8d7f8df7 AND read:0
>
> This works ugly slow -- takes about 12 secs for my case with only 5mln of
> records bringing 5 results back.
> My next idea was to create buckets per every user. Say user
> "3ds78df7df8d7f8df7" will get bucket: "3ds78df7df8d7f8df7_notes" and we
> search within it, which should be faster.
>
> Please advise!
>
> --
> View this message in context:
> http://riak-users.197444.n3.nabble.com/Millions-of-buckets-tp2928567p2928567.html
> Sent from the Riak Users mailing list archive at Nabble.com.
>
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20110511/1bedfe90/attachment.html>


More information about the riak-users mailing list