views:

26

answers:

0

Hey guys,

I'm trying to do some tricks with a graph (node/edges) dataset. In this case a set of data where person x follows person y (direct relation). I want to load this data (from a mysql table) into redis (have it running). I've chosen to use Rediska because I use PHP and it seems stable.

Rediska has very limited documentation and examples, so I was hoping you guys can help me. I have little to no experience with noSQL, especially the naming conventions (userid:1:follows = 2?).

My questions:

  • how do I load a set of person x follows person y data into a redis data set
  • how do I find the "intersect" (SINTER) and end up with a php array (so I get person X and person Y both follow (a result set) of people))
  • and last not but leasy, how would I 'traverse' this graph data to find a relation: person x -> person y -> person z (person x and person z both follow person y, hence person z is in the result set)