[Neo4j] Cypher REST endpoint
Quick question: Just saw this commit from Jake: http://github.com/neo4j/community/commit/f011c51fcbd5f12236fc633f57dcec9fb8cade83 Will the old Cypher plugin endpoint be going away, or will it remain for back-compat? Which release will have the new endpoint? This will be helpful info for library authors. Thanks, -- Josh -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Cypher-REST-endpoint-tp3554828p3554828.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Cypher REST endpoint
No worries :-) I'm on github all day and just happened to see it on my feed. Good to know that the plugin is staying around for a little while. I'll probably make the switch to the new endpoint for the next milestone, so that it can start seeing some use. This will be a good test of libraries supporting multiple REST API versions! -- Josh -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Cypher-REST-endpoint-tp3554828p3555347.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] REST API - always batch?
To toss my two cents in, I had been thinking about moving my REST library to use only batches for all CRUID operations. I've been putting it off, and I will probably drop the idea for now based on Jake's response. Jacob Hansson-2 wrote 1. There are limits to how large the results can be from a batch API call... 2. ...We have lots of ideas for how we can improve the current REST API (add full transactional support, massively improve throughput and latency)... Having real transactions via the REST API (a bit of an oxymoron?) would be most welcome. -- Josh PS, has anyone else used the acronym CRUID (Create Read Update Index Delete) to describe Neo4j operations? My other attempt was ICRUD but that sounds like the stuff you rub out of your eyes when you wake up in the morning. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-REST-API-always-batch-tp3550568p3551739.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] Neo4jPHP v0.0.5
Hey all, Not sure how many people out there are using Neo4j from a PHP application, but I wanted to let you all know that I just released Neo4jPHP v0.0.5-beta. New in this release is better batch support, and a more fluent way of creating nodes and relationships: http://github.com/jadell/Neo4jPHP I feel like the API is stabilizing. I'm planning on removing the beta tag and bumping the version to 0.1 shortly. I'm interested in feedback from any one who is using it in development or production. Please file bug reports or feature requests as GitHub issues. Documentation here: http://github.com/jadell/Neo4jPHP/wiki Even if you're not a PHP developer, inform someone who is! Thanks all, -- Josh -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Neo4jPHP-v0-0-5-tp3514650p3514650.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Cypher-Pickle?
This! A thousand times this! Whenever I'm trying to explain how you find connected information without joins, people's eyes tend to glaze over until I a) draw the graph on the whiteboard, b) write out the Cypher query _directly_inside_the_graph_. That's the no f-ing way! moment for most people to see the power of graphs and graph query languages. -- Josh Adell -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Cypher-Pickle-tp3480817p3481868.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Cypher-Pickle?
Mattias Persson-2 wrote: 2011/11/4 maxdemarzi lt;maxdemarzi@gt; I'd say the strongest part of Cypher is the ascii art pattern where you clearly see what you're querying for, right there and then without having to parse it into a graph into your head. Removing that would reduce my interest in this language significantly. This! A thousand times this! Whenever I'm trying to explain how you find connected information without joins, people's eyes tend to glaze over until I a) draw the graph on the whiteboard, b) write out the Cypher query *directly inside the graph*. That's the no f-ing way! moment for most people to see the power of graphs and graph query languages. -- Josh Adell -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Cypher-Pickle-tp3480817p3481871.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Integer cost property
Created an issue for this: https://github.com/neo4j/community/issues/71 -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Integer-cost-property-tp3077887p3442643.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Run test and development DBs at same time
For development using the REST interface, I usually run two databases on separate ports or hosts. On the development/testing database, I use the remote clean extension found at https://github.com/jexp/neo4j-clean-remote-db-addon to reset the database before running my automated tests. -- Josh Adell -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Run-test-and-development-DBs-at-same-time-tp3405951p3406525.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] REST Performance
Christian, Here are some benchmarks from a few weeks ago that I did comparing batch operations to single operations using a PHP client over REST. Don't know if they help at all, but maybe get you started? http://neo4j.org/forums/#nabble-td3282984 There is another set at the bottom of that thread after some server side improvements were made. Good luck! -- Josh -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-REST-Performance-tp3386667p3387804.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Forward slashes in index values
Thanks for the heads up, Jim. On a tangentially related note, I filed this request: https://github.com/neo4j/community/issues/35 Basically, in the future, it would be useful to have a way to determine the server version via REST so the various clients can account for differences in the protocol like this. Thanks! -- Josh Adell -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Forward-slashes-in-index-values-tp3347515p3377304.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] List all indexed key/values for an entity
Done. http://github.com/neo4j/community/issues/26 Thanks! -- Josh -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/List-all-indexed-key-values-for-an-entity-tp3348997p3355537.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] List all indexed key/values for an entity
OED and Merriam Webster both say it can be either: http://www.merriam-webster.com/dictionary/index I have no technical reasoning one way or the other which it should be called. (A quick search shows that indices is slightly more favored in maths and science, while indexes is the more common form) And I promise this is the last I will comment about it. :) -- Josh -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/List-all-indexed-key-values-for-an-entity-tp3348997p3357630.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] questions related to neo4jphp
Hey Filip, I've tried to answer your questions inline as best as I can: F. De Haes wrote: - Relation types give problems in Cypher when they contain a blank space. Correct? I believe Andres answered this already. According to his example, make sure you are using backticks (`) not single quotes ('). F. De Haes wrote: - In order to solve this, I wanted to rename the relation types. However, I didn't put them on an index when I created them, Now I know why I should have. So I'm retrieving the relations by $startnode-getRelationships(); When changing the relation type I notice it was not saved correctly. $relation-setType(new_name); or $relation-setType(new_name)-save(); don't result in errors but do not save the changed type. What am I doing wrong? I do not believe it is possible to update a relationship's type after it has been created. At least, the REST API docs do not indicate how to do this. A quick workaround would be to delete the old relationship, then unset the relationship's id, so that a new relationship will be created: $relationship-delete(); $relationship-setId(null) -setType(new_name) -save(); You could also index $relationship this time around if you choose. F. De Haes wrote: - I'm a bit confused how to change or add properties from a particular node on the lucene index. Do I have to search whether the property exists already and remove it first? How would I do that with neo4jphp? You could always assume the property exists, remove it, then recreate it: $myIndex = new Index($client, Index::TypeNode, indexName); $index-remove($node, some_key, some_value); $index-add($node, some_key, some_value); The `remove` call will return false if the property did not exist already, but you could ignore that. F. De Haes wrote: - How can I get a list of lucene indexes in neo4jphp? This feature is not implemented yet. I have created an issue on github to get it done soon. F. De Haes wrote: - How can I get a list of relationship types in neo4jphp (supposed I did not index any relationship)? Also not implemented yet. I have created an issue on github to get it done soon. Thanks for checking out Neo4jPHP! -- Josh Adell -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-questions-related-to-neo4jphp-tp3348594p3348958.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] List all indexed key/values for an entity
Is there any way via the REST API to list all the indexes and keys/values that a given entity is indexed on? Something like: GET http://0.0.0.0:7474/db/data/node/123/indexes returns: [ http://0.0.0.0:7474/db/data/index/node/favorites/color/blue;, http://0.0.0.0:7474/db/data/index/node/favorites/food/pizza;, http://0.0.0.0:7474/db/data/index/node/users/name/josh;, http://0.0.0.0:7474/db/data/index/node/authors/post/456;, ] Does anything exist that gives this functionality or similar? -- Josh Adell -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/List-all-indexed-key-values-for-an-entity-tp3348997p3348997.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Traversal REST body language
Thanks Peter. Great turnaround time on the answer, as always! -- Josh -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Traversal-REST-body-language-tp3331584p3332322.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] Traversal REST body language
I don't use traversals that much, and I'm trying to help another user. The docs are a bit ambiguous, so I want to make sure I have this correct. When using a traversal via REST, for the prune_evaluator, I can do this: prune_evaluator: { language : builtin, name : none } or I can do this: prune_evaluator: { language : javascript, body : ...some javascript here... } In other words, when using a builtin, I give a name attribute, and when using another language I give a body attribute. And I'm assuming the same holds true for return_filter as well? Thanks -- Josh Adell -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Traversal-REST-body-language-tp3331584p3331584.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] REST batch completes with error code
I'm sending a batch REST request, with 15000 operations (1 create nodes, and 5000 create relationships between those nodes.) In webadmin, I can see all the nodes and relationships have been created, and I can browse them using the data browser. So the all my entities were successfully created. But the HTTP response is a 500 Java heap space error. It looks from the stack trace in the log like the failure occurred when mapping the results into the HTTP response. This could be a pretty nasty surprise for someone who thinks their batch failed when all the entities were actually created. Is there anyway to not commit the transaction on the server until the response is generated and sent successfully? Here is the stack trace from the log: Sep 1, 2011 11:30:01 PM com.sun.jersey.spi.container.ContainerResponse mapMappableContainerException SEVERE: The exception contained within MappableContainerException could not be mapped to a response, re-throwing to the HTTP container java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2882) at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100) at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390) at java.lang.StringBuffer.append(StringBuffer.java:219) at org.apache.commons.lang.StringUtils.join(StringUtils.java:3088) at org.apache.commons.lang.StringUtils.join(StringUtils.java:3133) at org.neo4j.server.rest.repr.BatchOperationResults.toJSON(BatchOperationResults.java:99) at org.neo4j.server.rest.web.BatchOperationService.performBatchOperations(BatchOperationService.java:88) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:184) at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:67) at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:276) at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:83) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:133) at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:71) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1171) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1103) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1053) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1043) at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:406) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:477) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:662) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) Sep 1, 2011 11:30:01 PM org.mortbay.log.Slf4jLog warn SEVERE: /db/data/batch java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2882) at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100) at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390) at java.lang.StringBuffer.append(StringBuffer.java:219) at org.apache.commons.lang.StringUtils.join(StringUtils.java:3088) at org.apache.commons.lang.StringUtils.join(StringUtils.java:3133) at org.neo4j.server.rest.repr.BatchOperationResults.toJSON(BatchOperationResults.java:99) at org.neo4j.server.rest.web.BatchOperationService.performBatchOperations(BatchOperationService.java:88) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[Neo4j] More batch vs. single operation benchmarks
Here are the latest benchmarks of batch vs. individual entity creation using the Neo4jPHP library. Most of the processing time is spent on the server, so I believe that these numbers are probably not specific to Neo4jPHP. I'm not implying that there is anything wrong or to be fixed; I just thought the results might be of interest to others. I'd love to see results from others using a REST client in any language. 3 scenarios were run 10 times each for different batch sizes. The scenarios and averages of the 10 runs of each batch size are below. First column is the batch size, second column is the average time in seconds to create that many entities in a batch, third column is the average time in seconds to create that many entities with individual calls. Benchmark script can be found here: http://gist.github.com/1177100 Results: Scenario 1: Create nodes sizebatchsingle 10 00 100 00.8 250 0.1 1.5 500 0.9 1.7 10001.5 3.8 25006.7 9.6 500023.5 13.2 Scenario 2: Create relationships sizebatchsingle 10 00 100 0.2 0.2 250 0.3 0.5 500 0.6 1.1 10001.3 3 25007.1 9.7 500025.3 22.2 Scenario 3: Create 2 nodes and a relationship between them sizebatchsingle 10 00.1 100 0.4 1.3 250 0.8 3 500 2.9 5.2 10009.2 11.9 250054.3 29.9 5000710.359.6 Note: in the 5000 run of the last scenario, 15000 operations are sent in a single HTTP request. 10 runs of the 5000 batch size (15 operations total operations in 10 batches) took almost 2 hours to complete. -- Josh Adell -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/More-batch-vs-single-operation-benchmarks-tp3291092p3291092.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Neo4jPHP batch insert benchmarks
Hey Peter, I don't have any way of verifying on the server side, other than measuring the time it takes for curl_exec to return a response. On the client side I can see that PHP's json_encode/json_decode functions are taking less than .5% of the total run time, even with a batch size of 1. During one of my 10 node attempts, I printed out the server response of the 500 Heap space error. It seemed like the last method in the stack trace was dealing with a Deserializer class or method. I will try again and capture the stack trace output to post here. Thanks, -- Josh Adell -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Neo4jPHP-batch-insert-benchmarks-tp3282984p3283926.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Neo4jPHP batch insert benchmarks
Jim, When I was running into the issue, I set the maxmemory=256 and can confirm that it took much longer to fail, but it did fail in the same way. I didn't think of setting it smaller than the default, but I suspect you are correct. I'll try it that way when I attempt to generate the stack trace later so that I don't have to wait several minutes for it to fail. -- Josh -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Neo4jPHP-batch-insert-benchmarks-tp3282984p3284382.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Neo4jPHP batch insert benchmarks
I bumped the maxmemory up to 512 and ran a batch to create 10 nodes (repeated 10 times). After an average of 20 seconds, I always received the following response: HTTP/1.1 100 Continue HTTP/1.1 500 Java heap space Content-Type: text/html; charset=iso-8859-1 Cache-Control: must-revalidate,no-cache,no-store Content-Length: 4389 Server: Jetty(6.1.25) html head meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1/ titleError 500 Java heap space/title /head body HTTP ERROR 500 pProblem accessing /db/data/batch. Reason: preJava heap space/pre/p Caused by: prejava.lang.OutOfMemoryError: Java heap space at java.util.HashMap.lt;initgt;(HashMap.java:209) at java.util.LinkedHashMap.lt;initgt;(LinkedHashMap.java:181) at org.codehaus.jackson.map.deser.UntypedObjectDeserializer.mapObject(UntypedObjectDeserializer.java:199) at org.codehaus.jackson.map.deser.UntypedObjectDeserializer.deserialize(UntypedObjectDeserializer.java:77) at org.codehaus.jackson.map.deser.UntypedObjectDeserializer.mapArray(UntypedObjectDeserializer.java:155) at org.codehaus.jackson.map.deser.UntypedObjectDeserializer.deserialize(UntypedObjectDeserializer.java:73) at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:1980) at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1271) at org.neo4j.server.rest.domain.JsonHelper.readJson(JsonHelper.java:54) at org.neo4j.server.rest.repr.formats.JsonFormat.readList(JsonFormat.java:101) at org.neo4j.server.rest.web.BatchOperationService.performBatchOperations(BatchOperationService.java:78) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:184) at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:67) at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:276) at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:83) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:133) at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:71) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1171) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1103) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1053) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1043) at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:406) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:477) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:662) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) /pre hr //smallPowered by Jetty:///small/br/ br/ br/ br/ /body /html So it seems to be an issue with deserializing the JSON. Unfortunately, I am not familiar enough with Java's dev environment or tools to diagnose any further. Any ideas? -- Josh -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Neo4jPHP-batch-insert-benchmarks-tp3282984p3285635.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] Neo4jPHP batch insert benchmarks
Hey all, I've been working on adding batch support to http://github.com/jadell/Neo4jPHP Neo4jPHP . Here are the results of my latest benchmarks. First column is the number of nodes being inserted, second column is the average in seconds over 5 runs to insert that many nodes in a single batch, third column is the average in seconds over 5 runs to insert that many nodes one at a time: #nodes batchsingle 100 0 100 0.2 0.4 250 0 1 500 0.8 2 10001.4 4 25006 10.6 500023.2 21.2 1 91.6 40.4 It seems like batches win out until right around 5000 nodes at a time. I've profiled my code, and it seems like the time spent in PHP is roughly equivalent for batch vs. single. All the time difference is spent in a curl_exec call, talking to or waiting to hear back from the server. I tried going up to 10 nodes. Single insert handled this just fine, but the server kept returning a 500 Java Heap space error on the batch, even with 512M max heap. Benchmark script can be found here: http://gist.github.com/1169394 http://gist.github.com/1169394 Benchmarks were run on an 4 x 2.3GHz core Intel i7, 4G RAM, running Ubuntu 10.10. Neo4j server was run with out-of-the-box settings in a VM runnning Ubuntu 10.10 with 1 dedicated core and 1G RAM. I hope this is of interest to anyone. I'd love to get some feedback from anyone using Neo4j from PHP, with Neo4jPHP or any other library. -- Josh Adell -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Neo4jPHP-batch-insert-benchmarks-tp3282984p3282984.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user