We're starting to do a little looking into graph databases, as we have
relationships between some data objects that could probably be nicely
modeled using something like neo4j. However, it also got me thinking
about using Redis as a graph database, with sets describing "edges"
between nodes/elements. I wondered if anyone here has done any work
like this, and what you think about it...
Thanks for any thoughts.
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To post to this group, send email to redi...@googlegroups.com.
To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.
Yes, that's an interesting problem. As you note, I suppose that it's
possible using more sets could make it work, but the duplication of
data might make the dataset grow too large too quickly. I've been
contemplating whether there are any tricks to make use of the set
operators (intersection, etc) to work the edges bidirectionally
without duplicating everything... We'll see!
Indeed, Neo4J seems to be the best solution out there (and
neo4jr-social provides some nice features out of the box for those of
us using Ruby), but since we're already using Redis in our world, it
would be great to use it. I like to try to minimize the moving parts
when I can. Plus it's simply an interesting question!
> To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
For searching, I would expect that using something designed for that
purpose like Sphinx, Solr, etc would be the best bet. For filtering,
it's hard to say -- depends on your precise use cases, I would think.
Thanks again -- I'd love to see any further details you can share.
It's only 2x as large on the graph side of things. If you're running
into issues where a factor of 2x will kill your application, you need
to work on how to scale your application (outgoing edges on one
machine, incoming edges on another is a very basic first step,
sharding is the next obvious step; be careful about writing to
multiple shards at the same time). Incidentally, if you only care
about twitter-style "following" relationships, you could have up to 1
entry in each of 4 sets for a bi-directional follow relationship: x
follows y, y is being followed by x, y follows x, x is being followed
by y... which will grow pretty fast for any nontrivial graph.
Regards,
- Josiah
You can try redis graph module, it is a Redis module as the name implies, which means it’s runs within Redis (so hopefully decent performance).
It also exposes a simple query language which is based on Neo4J’s Cypher, so those who are familiar with it can get started quickly.