Hello, I am new to riak so I might miss something essential. As I understand from (http://wiki.basho.com/Replication.html), the decision about where a piece of data is stored depends on the key (and the ring). Looking at the source code this is defined in chash.erl as:
key_of(ObjectName) ->
crypto:sha(term_to_binary(ObjectName)).
So naming a thing is at the same time saying the data belongs to a certain set
of nodes.
In my application I have a set of buckets, 'users', 'conditions', 'actions'.
All conditions and all actions are linked to a particular user and in the vast
majority of cases they are loaded in one statement using link walking.
So when reading the data it would be beneficial to have them stored on the same
node in order to minimize inter-node traffic. Writing is not an issue since it
happens much less frequently.
So my question is: What is a good way to specify that certain pieces of data
are stored together.
Intuitively I would patch key_of/1 to allow for something like:
/riak/users/123
/riak/conditions/a...@123
/riak/actions/x...@123
so '123' would be hashed in all cases.
Any thoughts on this are appreciated.
Best Regards,
Florian
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ riak-users mailing list [email protected] http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
