Can anyone familier with Riak explain how to do a link-walk to find common friends among two people (eg. just like Facebook's common friends)? Also, the computation requirement should ideally be minimal - ie. the server does not have to go through great length do do calculations.
I'm thinking of putting all 'persons' in a "people" bucket, and each 'person' will have a friends link (this is like a one-to-many relationship), then for each 'person' is reversed relationship-linked back to the other person (this is like a one-to-one relationship). I think it is possible to do this efficiently and calculation/result will be instantly available, but just can't figure it out.
(Alright, I have not exactly started real-coding with Riak, so a more thorough explanation on Riak's link walking feature would be appreciated.)
Thanks!