Link walking with Erlang riak client

Morgan Segalis msegalis at gmail.com
Wed Jun 20 09:36:11 EDT 2012


Actually this is what I'm doing…

A as an unique ID, lets call it A-UID

A and B are stored in the bucket with keys A-UID and B-UID

The link in B for A will be named A-UID
And link in A for B will be named B-UID

Thanks,

Morgan.

Le 20 juin 2012 à 15:28, Bryan Fink a écrit :

> On Wed, Jun 20, 2012 at 8:00 AM, Morgan Segalis <msegalis at gmail.com> wrote:
>> Why would you think that fetch both user and look through the links is fastest than A -> B -> A ? Are links really that slow ?
> 
> It's not that links are that slow, but that they're not that focused.
> Unless you're using B's key as the tag on the link from A, and A's key
> as the tag on the link from B, you'll have to follow all "person" or
> "friend" (or whatever) links from A, and the same from B.  So, what
> you'd actually be walking is A -> [any person/friend] -> A.  You could
> put a map or reduce phase between the two link phases to filter out
> everything but B, but my bet is that simply fetching A and B
> individually will be much faster than setting up and tearing down the
> MR framework.
> 
> YMMV, always benchmark real data, etc.
> 
> -Bryan





More information about the riak-users mailing list