3
votes

Our company is evaluating Neo4J as the database of choice for our social network. Our main requirement is a high performance social activity stream (reads eclipse writes). In modeling our data we independently designed what you call the Graphity model, which scales well, but is limited by Neo's max relationship types (~32,700).

Is there a way to increase the # of relationship types in order to use Graphity at scale?

http://docs.neo4j.org/chunked/milestone/cypher-cookbook-graphity.html http://docs.neo4j.org/chunked/milestone/cypher-cookbook-newsfeed.html

1
+1 @Greg thanks for the link, I´m just in the same journey of how ho model an activity stream, good luck and let me know if you find something interestingpedrommuller

1 Answers

0
votes

If the number of relationships types is a concern, keep in mind that Neo4j supports properties on relationships.

So instead of MATCH p=me-[:jane_knows*]->friend .... you chould have something modeled like:

MATCH me-[jk:who_knows]->friend WHERE jk.who = 'jane'

That could effectively make all of you x_knows relationships into one relationship type with a property. I am not sure if that would yield the same semantic or performance benefits of your use-case, but it is a possible solution to your concern.