Re: [Neo4j] Neo4j + Rexster lock problem
For such a situation, you should use the Neoj4 HA cluster, which will manage the propagation of data between the different instances for you. I think that is the cleanest and best solution here. 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, May 11, 2011 at 11:34 AM, Marko Rodriguez wrote: > Hi Sulabh, > > You can only have one instance of Neo4j over a particular directory. As > such, when you want to have multiple threads talking to a single Neo4j, you > will need to pass that reference around to each thread. > > Thus, when Rexster is running over Neo4j, Rexster has that reference. To > have other threads/software talk to Neo4j via Rexster, you can talk to it > with: > > 1. The RESTful interface: > https://github.com/tinkerpop/rexster/wiki/Basic-REST-API > 2. Via Gremlin: https://github.com/tinkerpop/rexster/wiki/Using-Gremlin > 3. By writing an Extension (Rexster-Kibble): > https://github.com/tinkerpop/rexster/wiki/Creating-an-Extension > https://github.com/tinkerpop/rexster-kibbles/wiki > > In other words, its illegal to do this: > > g1 = new Neo4jGraph('/tmp/graph'); > g2 = new Neo4jGraph('/tmp/graph'); > > You get the "Unable to lock store" exception. However you can do this: > > g = new Neo4jGraph('/tmp/graph'); > createThreadAndProcessGraph(g); > > It all comes down to reference to the original instance. > > Thanks, > Marko. > > http://markorodriguez.com > > On May 11, 2011, at 11:33 AM, sulabh choudhury wrote: > > A similar question has been asked previously but I could not find a > solution which would work for me, hence re-posting it. > > I am creating a Neo4j graph and want to expose it over REST using Rexster > so that I can apply traversals to it. > Now after I have started Rexster, I see that I cannot write to the graph as > it throws the "java.lang.IllegalStateException: Unable to lock store > [complete_graph//neostore], this is usually a result of some other Neo4j > kernel running using the same store." > > So does this mean everytime I have to write to the graph I have to shut > down Rexster (hence disabling my traversals) and then start it again after I > finish writing to it? > I read somewhere that you cannot start multiple services to same store in > write mode, so is there a way where I can expose it over Rexster just in > read mode and perform traversals ? > > Or is there any way around this problem ? > > > ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Neo4j + Rexster lock problem
Hi Sulabh, You can only have one instance of Neo4j over a particular directory. As such, when you want to have multiple threads talking to a single Neo4j, you will need to pass that reference around to each thread. Thus, when Rexster is running over Neo4j, Rexster has that reference. To have other threads/software talk to Neo4j via Rexster, you can talk to it with: 1. The RESTful interface: https://github.com/tinkerpop/rexster/wiki/Basic-REST-API 2. Via Gremlin: https://github.com/tinkerpop/rexster/wiki/Using-Gremlin 3. By writing an Extension (Rexster-Kibble): https://github.com/tinkerpop/rexster/wiki/Creating-an-Extension https://github.com/tinkerpop/rexster-kibbles/wiki In other words, its illegal to do this: g1 = new Neo4jGraph('/tmp/graph'); g2 = new Neo4jGraph('/tmp/graph'); You get the "Unable to lock store" exception. However you can do this: g = new Neo4jGraph('/tmp/graph'); createThreadAndProcessGraph(g); It all comes down to reference to the original instance. Thanks, Marko. http://markorodriguez.com On May 11, 2011, at 11:33 AM, sulabh choudhury wrote: > A similar question has been asked previously but I could not find a solution > which would work for me, hence re-posting it. > > I am creating a Neo4j graph and want to expose it over REST using Rexster so > that I can apply traversals to it. > Now after I have started Rexster, I see that I cannot write to the graph as > it throws the "java.lang.IllegalStateException: Unable to lock store > [complete_graph//neostore], this is usually a result of some other Neo4j > kernel running using the same store." > > So does this mean everytime I have to write to the graph I have to shut down > Rexster (hence disabling my traversals) and then start it again after I > finish writing to it? > I read somewhere that you cannot start multiple services to same store in > write mode, so is there a way where I can expose it over Rexster just in read > mode and perform traversals ? > > Or is there any way around this problem ? ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Neo4j + Rexster lock problem
Sulabh, do you have the setup somewhere? This should not be a problem per se, so I think there is some multiple booting of Neo4j going on ... can try to help you off-list with that and get back with the results here. 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, May 11, 2011 at 9:33 AM, sulabh choudhury wrote: > A similar question has been asked previously but I could not find a > solution which would work for me, hence re-posting it. > > I am creating a Neo4j graph and want to expose it over REST using Rexster > so that I can apply traversals to it. > Now after I have started Rexster, I see that I cannot write to the graph as > it throws the "java.lang.IllegalStateException: Unable to lock store > [complete_graph//neostore], this is usually a result of some other Neo4j > kernel running using the same store." > > So does this mean everytime I have to write to the graph I have to shut > down Rexster (hence disabling my traversals) and then start it again after I > finish writing to it? > I read somewhere that you cannot start multiple services to same store in > write mode, so is there a way where I can expose it over Rexster just in > read mode and perform traversals ? > > Or is there any way around this problem ? > ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] Neo4j + Rexster lock problem
A similar question has been asked previously but I could not find a solution which would work for me, hence re-posting it. I am creating a Neo4j graph and want to expose it over REST using Rexster so that I can apply traversals to it. Now after I have started Rexster, I see that I cannot write to the graph as it throws the "java.lang.IllegalStateException: Unable to lock store [complete_graph//neostore], this is usually a result of some other Neo4j kernel running using the same store." So does this mean everytime I have to write to the graph I have to shut down Rexster (hence disabling my traversals) and then start it again after I finish writing to it? I read somewhere that you cannot start multiple services to same store in write mode, so is there a way where I can expose it over Rexster just in read mode and perform traversals ? Or is there any way around this problem ? ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user