0

Does anyone know whether it is better to use core java traversal api provided by neo4j or use php api for neo 4j. Would there be any limitation in terms of distribution and scalability for a large dataset if I use php. Would one be really faster than other for say more than 1000 requests per second.

Would there be any design issues that i may run into while using either of them.

I am trying to build a friends of friends relationship till level 6.

Thanks for any help!

DevD
  • 1,201
  • 2
  • 12
  • 20

1 Answers1

2

The Java API will be faster as the PHP Neo4j library relies on REST to call Neo4j, and there will be overhead in the REST Traversal framework vs the Java Traversal framework.

Now in terms of the actual traversal, there shouldn't be that much of a difference, because by the end of the day, the actual traversal is done in Java, either by native API, or by the REST endpoint translating into Java(groovy I believe).

Nicholas
  • 7,403
  • 10
  • 48
  • 76
  • Thanks! any limitations in terms of scalability for the two frameworks? – DevD Jun 24 '13 at 04:13
  • The typical Memory/disk space. If you run a DFS or BFS on a graph that is massive, it may not all fit into memory, at which point you may end up writing your own code in in native Java, but you can cross that bridge when you come to it. – Nicholas Jun 24 '13 at 04:19
  • sorry i have trouble understanding your last point - "writing my own code in java"...but that is possible with neo4j HA edition rite. Or would i need to write my own code to facilitate clustering? Or do you mean in terms of scaling out.. – DevD Jun 24 '13 at 04:35
  • Neo4j doesn't do clustering. It does HA, which means that it replicates the data across nodes, but it doesn't do anything like distributed queries. What I meant by that line is you can develop against the embedded neo4j and use the native API, which will give you some performance gains. – Nicholas Jun 24 '13 at 04:37
  • Thanks,much appreciated. Do you also have some idea about my other question... [replication-alternative-to-neo4j-enterprise-edition](http://stackoverflow.com/questions/17262316/what-can-be-neo4j-replication-alternative-to-neo4j-enterprise-edition)..Thanks again. – DevD Jun 24 '13 at 04:56
  • I do not have an official answer for that. I don't believe there is a way, but there may be hacks available to perform functionality like that. – Nicholas Jun 24 '13 at 15:12
  • Can you please point to any good hack. I am getting totally confused searching for hacks. Also would it be legal and allowed by neo4j to use hacks? I was thinking of some opensource HA solution would do the trick may be something that uses zookeeper and something else. – DevD Jun 25 '13 at 06:05
  • When I say hack, I mean something that would do the copy over for you, not a "hack" of neo4j. The only way I can think of is to do something like a split message sender that would manually send the message to the number of graph database replica that you want. – Nicholas Jun 25 '13 at 14:27
  • Oh ok, my apologies...So what exactly should a split message sender do, can you please throw some light (would it just run the requests onto a different instance keeping it synchronized with the main instance or it would do more than that?)... and is there a solution out there for this or does it require some code to be written...Thanks again. – DevD Jun 26 '13 at 05:28