Link walking with Erlang riak client
bryan at basho.com
Wed Jun 20 09:28:47 EDT 2012
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
YMMV, always benchmark real data, etc.
More information about the riak-users