Re: [Neo4j] How to check, if nodes (more than 2) are connect with relationship
Yeah, sorry to say but I think this is algo-territory not covered already ... Cheers, /peter neubauer GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - Your high performance graph database. http://startupbootcamp.org/- Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Tue, Aug 30, 2011 at 1:37 PM, deker heinz-peter.wi...@rubicon.eu wrote: hi i only habe the node ids, nothing else. i only want to now if there is any path between all nodes. i thought so, that i had to do my own algorithm thx -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/How-to-check-if-nodes-more-than-2-are-connect-with-relationship-tp3294832p3295249.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 mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] EXTERNAL: Re: Running out of memory in creating large graph..
Gautam, look at http://docs.neo4j.org/chunked/snapshot/configuration-caches.html for some high-level information on caching. Does that meet your needs or is there more you want to know? Cheers, /peter neubauer GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - Your high performance graph database. http://startupbootcamp.org/- Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Wed, Aug 31, 2011 at 9:31 PM, Gautam Thaker gautam.h.tha...@lmco.comwrote: On 8/31/2011 2:39 PM, Rick Bullotta wrote: What is probably happening is that the relationship references might be concentrated around a couple of nodes, forcing a large number of them to be in memory. I can't really tell without understanding the model and how you're randomizing relationships. well, with 1,000,000 nodes and each node having exactly one relations to a randomly chosen other node, it would be very unlikely for a node to have 10 to 20 relationships. In any event, is there an explanation some place of exactly what stays in memory and what is on the disk in the datastore when my graph gets big like this? What can I do minimize the amount of java heap used? Gautam ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] Lucene index recovery
Dear list members, Each time I restart my server based on Neo4J I can see this in the logs: Sep 1, 2011 7:23:17 PM org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog doInternalRecovery INFO: Non clean shutdown detected on log [/opt/data/nioneo_logical.log.2]. Recovery started ... Sep 1, 2011 7:23:18 PM org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog doInternalRecovery INFO: Non clean shutdown detected on log [/opt/data/index/lucene.log.1]. Recovery started ... Operation which takes time ... lots of time. What is the correct way of preventing that when restarting ? Thanks in advance. Regards, Dima Gutzeit. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Hyperedges in Neo4j
Yup, +1 on that. This is just a workaround for expressing things in property graph language. I think for proper HyperGraph support, we need to go a bit further in the modeling and querying capabilities. Will be interesting to see what you cook up :) Cheers, /peter neubauer GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - Your high performance graph database. http://startupbootcamp.org/- Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Thu, Sep 1, 2011 at 4:11 PM, Niels Hoogeveen pd_aficion...@hotmail.comwrote: Hi Peter, Thanks for sharing this. Layout-wise, the solution you present is not really different from what Enhanced API does with regard to n-ary relationships. I would like to know if there is an elegant creation pattern for n-ary relationships, or do you have to rely on a manual creation of the proper edge-node and role-relationships? The query to extract information from the graph is however quite different from what I am aiming for. The back-operator is an interesting one and necessary in this situation, whereas I would like to do a query like that without the use of a back-operator. This is possible when the filter operator can take a traversal of itself, something of the form filter(in(groupIn).name = group2) I think a traversal should in principal be performed with a query language that is not turing complete so we can guarantee termination. This is especially important in a REST architecture where we can't control the type of queries asked. Niels From: peter.neuba...@neotechnology.com Date: Wed, 31 Aug 2011 18:19:00 +0200 To: user@lists.neo4j.org Subject: [Neo4j] Hyperedges in Neo4j Hi folks, I took a discussion over at Tinkerpop as the excuse to put in an example of modeling and traversing Hyperedges in neo4j (in this case with Gremlin). Of course this is nowhere near Nils thinking, but for simple cases this might serve as a pattern. http://docs.neo4j.org/chunked/snapshot/gremlin-plugin.html#rest-api-hyperedges---find-user-roles-in-groups Let me know if you find that helpful. Cheers, /peter neubauer GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - Your high performance graph database. http://startupbootcamp.org/- Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Hyperedges in Neo4j
Hey, I think a traversal should in principal be performed with a query language that is not turing complete so we can guarantee termination. Turning completeness is not the lower bound for non-guaranteed termination. You can't guarantee completion in a regular language when your String (data structure) is a graph. E.g. a* The only languages guaranteed to complete are Star-free languages. That is, those that don't allow for recursion. See ya, Marko. http://markorodriguez.com ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Test and try/catch block
I like. Thanks for sharing it! Cheers, /peter neubauer GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - Your high performance graph database. http://startupbootcamp.org/- Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Tue, Aug 30, 2011 at 2:31 PM, Benjamin Gehrels neo4j-mailingl...@gehrels.info wrote: TemporaryFolder is a Junit-Rule coming with JUnit 4.7 The TemporaryFolder Rule allows creation of files and folders that are guaranteed to be deleted when the test method finishes (whether it passes or fails) http://kentbeck.github.com/junit/javadoc/latest/org/junit/rules/TemporaryFolder.html Best Regards, Benjamin Am Dienstag, 30. August 2011 10:34:23, Peter Neubauer schrieb: Nice one! TemporaryFolder is a standard Java class or your custom one? Cheers, /peter neubauer GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - Your high performance graph database. http://startupbootcamp.org/- Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Mon, Aug 29, 2011 at 9:51 PM, Alexander Smirnovalsmirn...@gmail.com wrote: I use jUnit MethodRule that starts embedded server in temporary folder and cleans up transaction after the test: public class Neo4jRule extends TemporaryFolder { private GraphDatabaseService graphDatabase; private Transaction transaction; @Override protected void before() throws Throwable { super.before(); graphDatabase = new EmbeddedGraphDatabase(newFolder(neo4j).getAbsolutePath()); transaction = graphDatabase.beginTx(); } @Override protected void after() { transaction.finish(); graphDatabase.shutdown(); super.after(); } public GraphDatabaseService getGraphDatabase() { return graphDatabase; } public Transaction getTransaction() { return transaction; } } On Thu, Aug 25, 2011 at 7:18 AM, Jim Webberj...@neotechnology.com wrote: If you're using the standard try/catch/finally idiom in Neo4j then consider using Nat Pryce/Steve Freeman's transactor pattern. We have an example of this in the neo4j server code here: https://github.com/neo4j/community/blob/master/server/src/functionaltest/java/org/neo4j/server/helpers/Transactor.java It's not always appropriate, but it the general case it can keep your code a bit terser and more intent-ful. Jim ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- _ entia non sunt multiplicanda praeter necessitatem, (entities should not be multiplied beyond necessity.) ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] problem in SPARQL querying
Hey, Even on closing the manager, I did not see any change.. any further ideas?? Thanks! The best thing to do is not dive straight into a complex SPARQL query, but look to see if the particular triples you think are lost are actually there. You can do this with simple SPARQL queries or drop into Gremlin and search around. The SPARQL query engine you are using was developed by Aduna and has been in use for many many years so I doubt there is a problem with their engine. I suspect there is some missing data. ?? .. Or perhaps your query is wrong. ?. Good luck, Marko. http://markorodriguez.com ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] FluentPipeline with Pipes
Hi everyone, For those on the Gremlin-users mailing list, this is not new. However, for others, I thought you would like to see some work over at TinkerPop that I'm really diggin'. In Pipes 0.8-SNAPSHOT, we have made it so that its much easier to construct Gremlin-esque traversals in native Java. The new killer pipe is called FluentPipeline. It works as such: Graph g = new Neo4jGraph('/tmp/mygraph'); ListString friendsProjectNames = new FluentPipeline(g.getVertex(1)).out(knows).out(created).property(name).toList() In short, every Pipe in Pipes has an associated (in many cases, many associated) methods in FluentPipeline that to allow for this style of traversal construction. As you may realize, the only reason Gremlin still exists is because of the ease by which closures (~anonymous functions) can be defined in Groovy (as well as some other random meta-programming stuff). With FluentPipeline, inner-classes are required which are very verbose. See the last two code blobs of https://github.com/tinkerpop/pipes/wiki/FluentPipeline that compare pure Java and Groovy. This work along with some vast speed improvements to Gremlin will be seen in Gremlin 1.3 which will probably trickle up to Neo4j at version 1.4.3. Enjoy, Marko. http://markorodriguez.com ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Lucene index recovery
Dima, are you shutting down your database correctly? Make sure you can database.shutdown() and wait for it to finish ... Cheers, /peter neubauer GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - Your high performance graph database. http://startupbootcamp.org/- Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Thu, Sep 1, 2011 at 1:31 PM, Dima Gutzeit dima.gutz...@mailvision.comwrote: Dear list members, Each time I restart my server based on Neo4J I can see this in the logs: Sep 1, 2011 7:23:17 PM org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog doInternalRecovery INFO: Non clean shutdown detected on log [/opt/data/nioneo_logical.log.2]. Recovery started ... Sep 1, 2011 7:23:18 PM org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog doInternalRecovery INFO: Non clean shutdown detected on log [/opt/data/index/lucene.log.1]. Recovery started ... Operation which takes time ... lots of time. What is the correct way of preventing that when restarting ? Thanks in advance. Regards, Dima Gutzeit. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Unable to being transaction
Dima, got the rest of the stacktrace? Cheers, /peter neubauer GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - Your high performance graph database. http://startupbootcamp.org/- Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Thu, Sep 1, 2011 at 1:44 PM, Dima Gutzeit dima.gutz...@mailvision.comwrote: Any idea what can cause this: org.neo4j.graphdb.TransactionFailureException: Unable to begin transaction at org.neo4j.kernel.EmbeddedGraphDbImpl.beginTx(EmbeddedGraphDbImpl.java:393) ~[neo4j-kernel-1.4.jar:1.4] at org.neo4j.kernel.EmbeddedGraphDatabase.beginTx(EmbeddedGraphDatabase.java:138) ~[neo4j-kernel-1.4.jar:1.4] Caused by: javax.transaction.SystemException: TM has encountered some problem, please perform neccesary action (tx recovery/restart) at org.neo4j.kernel.impl.transaction.TxManager.begin(TxManager.java:554) ~[neo4j-kernel-1.4.jar:1.4] at org.neo4j.kernel.EmbeddedGraphDbImpl.beginTx(EmbeddedGraphDbImpl.java:388) ~[neo4j-kernel-1.4.jar:1.4] ... 22 common frames omitted ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Hyperedges in Neo4j
Correct, turing completeness is not the lower bound for non-guaranteed termination. It is however possible to have some forms of recursion without sacrificing guaranteed termination. Neo4j traversals, memorizing visited paths, relationships or nodes are an example (Note, it would be nice to have an option to memorize visited (Node, RelationshipType, Direction)). This limited form of recursion is useful as a query language. Doing so of course eliminates correct statements. When memorizing nodes, the statement john (FRIEND_OF, OUTGOING) pete (FRIEND_OF, OUTGOING) john can no longer be true, but we could memorize relationships instead of nodes. This makes the former statement possible, but makes it impossible to return the statement john (FRIEND_OF, OUTGOING) pete (FRIEND_OF, OUTGOING) john (FRIEND_OF, OUTGOING) pete, unless john has more than one outgoing FRIEND relationship with pete (Memorizing (Node, RelationshipType, Direction) would make that statement impossible even in the presence of more than one FRIEND relationship from john to pete). While repeated paths in the graph are in principle true statements of the graph grammar, in many practical programming tasks we are not interested in such statements and in fact like to see those eliminated. Niels From: okramma...@gmail.com Date: Thu, 1 Sep 2011 08:17:27 -0600 To: user@lists.neo4j.org Subject: Re: [Neo4j] Hyperedges in Neo4j Hey, I think a traversal should in principal be performed with a query language that is not turing complete so we can guarantee termination. Turning completeness is not the lower bound for non-guaranteed termination. You can't guarantee completion in a regular language when your String (data structure) is a graph. E.g. a* The only languages guaranteed to complete are Star-free languages. That is, those that don't allow for recursion. See ya, Marko. http://markorodriguez.com ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Unable to being transaction
Here is the story. I had some problem with my index, some inconsistency, which cause lots of those: org.neo4j.graphdb.NotFoundException: phone property not found for NodeImpl#115. at org.neo4j.kernel.impl.core.Primitive.newPropertyNotFoundException(Primitive.java:172) ~[neo4j-kernel-1.4.jar:1.4] at org.neo4j.kernel.impl.core.Primitive.getProperty(Primitive.java:167) ~[neo4j-kernel-1.4.jar:1.4] at org.neo4j.kernel.impl.core.NodeProxy.getProperty(NodeProxy.java:145) ~[neo4j-kernel-1.4.jar:1.4] at com.foo.module.graph.actors.BaseGraphServiceActor.nodeTo(BaseGraphServiceActor.java:89) ~[module-neo4j-1.0-SNAPSHOT.jar:na] at com.foo.module.graph.actors.NodeManagerActor.updates(NodeManagerActor.java:118) ~[module-neo4j-1.0-SNAPSHOT.jar:na] at com.foo.module.graph.actors.NodeManager$$ProxiedByAWDelegation$$ 1315857921056.aw$original$_AW_$updates$_AW_$com_foo_module_graph_actors_NodeManager$$ProxiedByAWDelegation$$1315857921056(Unknown Source) [aspectwerkz-2.2.3.jar:na] at com.foo.module.graph.actors.NodeManager$$ProxiedByAWDelegation$$1315857921056_1_2012754604_1561793389___AW_JoinPoint.proceed(Unknown Source) [aspectwerkz-2.2.3.jar:na] at akka.actor.TypedActor$$anonfun$receive$1$$anonfun$apply$1$$anonfun$apply$2.apply(TypedActor.scala:227) [akka-typed-actor-1.2-RC5.jar:na] at scala.util.DynamicVariable.withValue(DynamicVariable.scala:57) [scala-library-2.9.0-1.jar:na] at akka.actor.TypedActor$$anonfun$receive$1$$anonfun$apply$1.apply(TypedActor.scala:216) [akka-typed-actor-1.2-RC5.jar:na] at scala.util.DynamicVariable.withValue(DynamicVariable.scala:57) [scala-library-2.9.0-1.jar:na] at akka.actor.TypedActor$$anonfun$receive$1.apply(TypedActor.scala:215) [akka-typed-actor-1.2-RC5.jar:na] at akka.actor.TypedActor$$anonfun$receive$1.apply(TypedActor.scala:213) [akka-typed-actor-1.2-RC5.jar:na] at akka.actor.Actor$class.apply(Actor.scala:551) [akka-actor-1.2-RC5.jar:na] at akka.actor.TypedActor.apply(TypedActor.scala:114) [akka-typed-actor-1.2-RC5.jar:na] at akka.actor.LocalActorRef.invoke(ActorRef.scala:905) [akka-actor-1.2-RC5.jar:na] at akka.dispatch.MessageInvocation.invoke(MessageHandling.scala:25) [akka-actor-1.2-RC5.jar:na] at akka.dispatch.ExecutableMailbox$class.processMailbox(ExecutorBasedEventDrivenDispatcher.scala:216) [akka-actor-1.2-RC5.jar:na] at akka.dispatch.ExecutorBasedEventDrivenDispatcher$$anon$4.processMailbox(ExecutorBasedEventDrivenDispatcher.scala:122) [akka-actor-1.2-RC5.jar:na] at akka.dispatch.ExecutableMailbox$class.run(ExecutorBasedEventDrivenDispatcher.scala:188) [akka-actor-1.2-RC5.jar:na] at akka.dispatch.ExecutorBasedEventDrivenDispatcher$$anon$4.run(ExecutorBasedEventDrivenDispatcher.scala:122) [akka-actor-1.2-RC5.jar:na] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_25] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_25] at java.lang.Thread.run(Thread.java:662) [na:1.6.0_25] at akka.dispatch.MonitorableThread.run(ThreadPoolBuilder.scala:184) [akka-actor-1.2-RC5.jar:na] it happened only one some of the operations. Over time all operations started to fail with: org.neo4j.graphdb.TransactionFailureException: Unable to begin transaction at org.neo4j.kernel.EmbeddedGraphDbImpl.beginTx(EmbeddedGraphDbImpl.java:393) ~[neo4j-kernel-1.4.jar:1.4] at org.neo4j.kernel.EmbeddedGraphDatabase.beginTx(EmbeddedGraphDatabase.java:138) ~[neo4j-kernel-1.4.jar:1.4] at com.foo.module.graph.actors.NodeManagerActor.promoteNode(NodeManagerActor.java:228) ~[module-neo4j-1.0-SNAPSHOT.jar:na] at com.foo.module.graph.actors.NodeManagerActor.createNode(NodeManagerActor.java:55) ~[module-neo4j-1.0-SNAPSHOT.jar:na] at com.foo.module.graph.actors.NodeManager$$ProxiedByAWDelegation$$ 1316234529667.aw$original$_AW_$createNode$_AW_$com_foo_module_graph_actors_NodeManager$$ProxiedByAWDelegation$$1316234529667(Unknown Source) ~[aspectwerkz-2.2.3.jar:na] at com.foo.module.graph.actors.NodeManager$$ProxiedByAWDelegation$$1316234529667_1_1717022187_920046141___AW_JoinPoint.proceed(Unknown Source) ~[aspectwerkz-2.2.3.jar:na] at akka.actor.TypedActor$$anonfun$receive$1$$anonfun$apply$1$$anonfun$apply$2.apply(TypedActor.scala:227) ~[akka-typed-actor-1.2-RC5.jar:na] at scala.util.DynamicVariable.withValue(DynamicVariable.scala:57) [scala-library-2.9.0-1.jar:na] at akka.actor.TypedActor$$anonfun$receive$1$$anonfun$apply$1.apply(TypedActor.scala:216) [akka-typed-actor-1.2-RC5.jar:na] at scala.util.DynamicVariable.withValue(DynamicVariable.scala:57) [scala-library-2.9.0-1.jar:na] at akka.actor.TypedActor$$anonfun$receive$1.apply(TypedActor.scala:215) [akka-typed-actor-1.2-RC5.jar:na] at
Re: [Neo4j] 10 questions
anyone show some love ;) seriously, the product is great but not the documentation. e.g. about the general rule for choosing property or relationship: in the matrix example, the year of a movie should be modelled as relationship since every year lots of movies are produced. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-10-questions-tp3300093p3302418.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] 10 questions
Hi there, would love to answer but had no time today, will try tomorrow. Also, very valid points about the docs, will try to put as much of the answers into the docs as possible. What Matrix example are you looking at? Cheers, /peter neubauer GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - Your high performance graph database. http://startupbootcamp.org/- Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Thu, Sep 1, 2011 at 10:10 PM, wangii tali.w...@gmail.com wrote: anyone show some love ;) seriously, the product is great but not the documentation. e.g. about the general rule for choosing property or relationship: in the matrix example, the year of a movie should be modelled as relationship since every year lots of movies are produced. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-10-questions-tp3300093p3302418.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 mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] 10 questions
Thanks! The Matrix example I was referring to http://docs.neo4j.org/chunked/stable/indexing-add.html Sent from my iPad On 1 Sep 2011, at 21:21, Peter Neubauer peter.neuba...@neotechnology.com wrote: Hi there, would love to answer but had no time today, will try tomorrow. Also, very valid points about the docs, will try to put as much of the answers into the docs as possible. What Matrix example are you looking at? Cheers, /peter neubauer GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - Your high performance graph database. http://startupbootcamp.org/- Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Thu, Sep 1, 2011 at 10:10 PM, wangii tali.w...@gmail.com wrote: anyone show some love ;) seriously, the product is great but not the documentation. e.g. about the general rule for choosing property or relationship: in the matrix example, the year of a movie should be modelled as relationship since every year lots of movies are produced. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-10-questions-tp3300093p3302418.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 mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] IndexedRelationship some observations and questions
Hi, I have been looking at performance options for Neo4j as presently I have been observing a number of performance issues. I am still investigating the way to get the best performance out of what I am doing, and one thing it might be are longer running transactions stopping other work going on (but thats an aside to what this message is about). One of the things that I investigated using was the IndexedRelationship work by Niels. Thought I would give a bit of feedback, although I haven't quite got this implemented at present. 1) I had to change the IndexedRelationshipExpander to be a public class in order to use it outside the package its in. 2) IndexedRelationship assumes only one tree root per node, whereas the expander allows for multiple (IndexedRelationship uses getSingleRelationship vs expander using getRelationships then matching on tree name). Having multiple would obviously be good as it means you could have two types of relationships covered by IndexedRelationship's. 3) Might pay to make it clear in the Javadocs for IndexedRelationship that the comparator can't be an anonymous inner class. Then I have some questions about usage of this. First a little background of the model I have, from reading a few things it seems quite standard. There are a lot of document nodes each of which have a relationship with multiple tag nodes. Documents generally have in the order of 10-20 tags, and tags can have as few as 1 document and sometimes tens of thousands. When tags are viewed through the UI they are almost always displayed with a descending date ordered list of documents. Seemed to be to fit quite well with IndexedRelationship. 1) I was thinking of having a switch over point at say around 500 documents for a given node where I will switch from using normal relationships to an IndexedRelationship as I was thinking at small numbers of relationships normal relationships would be quicker. Would that be correct, or not worth it? 2) On the tag end (which is the incoming end of the document-tag relationship) I was going to use a IndexedRelationshipExpander which would cover the case of whether the relationship was done through normal relationships, or through an IndexedRelationship. I also need to get a set of tags from the document end where their may be both normal relationships, and relationships coming from multiple IndexedRelationship's. From looking at it IndexedRelationshipExpander doesn't cover the reverse direction, but I would imagine using a relationship expander here would be correct. What would the best way of doing this be? As an aside it may be a good idea to note in the configuration settings page: http://wiki.neo4j.org/content/Configuration_Settings#Optimizing_for_traversals_example that -XX:+UseNUMA only works when using the Parallel Scavenger garbage collector (default or -XX:+UseParallelGC) not the concurrent mark and sweep one. Based on Cheers Bryce ___ 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)