Buckets and riak instances

Bryan Fink bryan at basho.com
Mon Oct 26 08:57:24 EDT 2009

On Mon, Oct 26, 2009 at 5:05 AM, Timothy Perrett
<timothy at getintheloop.eu> wrote:
> Thanks for your response - most helpful. One thing that is not clear on the
> NYC nosql slides ( http://riak.basho.com/nyc-nosql/ ) on slide number 21 is
> weather or not Artist, Album and Track are all in the same bucket?
> Im guessing they are, but its kinda tough to know :-) In this example, is
> the bucket also called "artist"?

Hi, Tim.  In slide 21, Artists, Albums, and Tracks are definitely each
in their own bucket.  The reason they must be in their own bucket has
to do with the link-traversing syntax.  In either the Erlang or URL
syntax, the first element of the link query is a "bucket match",
meaning "follow all links that point to objects in bucket X".

So, the example says:
  1. Start at the "artist" keyed "REM"
  2. Follow all links that artist has to objects in the "album" bucket
  3. Follow all links those albums have to objects in the "track" bucket

This simple example could be transformed into having all objects in
one bucket by using the link tag to differentiate among types instead
of the bucket name, but that seemed less natural in this case.


More information about the riak-users mailing list