[Neo4j] Traversing all relationship types
Hello neo4j users I'm just diving into neo4j and playing around with graph algorithms and traversers. As a start, I just wanted to traverse the whole graph with all relationship types in the OUTGOING direction. The traverse() method always expects a RelationshipType. Is there a simpler way to traverse all RelationshipTypes then building up an array that contains all types and the outgoing direction (as described here http://sujitpal.blogspot.com/2009/06/custom-traverser-for-neo4j.html)? Thanks for the help, James ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Traversing all relationship types
There is a tentative new traversal API included in Neo4j that features this functionality: org.neo4j.kernel.Traversal.description().expand( org.neo4j.kernel.Traversal.expanderForAllTypes( Direction.OUTGOING ) ); You can read more about it here: http://wiki.neo4j.org/content/Traversal_Framework Cheers, Tobias On Wed, May 11, 2011 at 9:08 AM, Jean-Pierre Bergamin jpberga...@gmail.comwrote: Hello neo4j users I'm just diving into neo4j and playing around with graph algorithms and traversers. As a start, I just wanted to traverse the whole graph with all relationship types in the OUTGOING direction. The traverse() method always expects a RelationshipType. Is there a simpler way to traverse all RelationshipTypes then building up an array that contains all types and the outgoing direction (as described here http://sujitpal.blogspot.com/2009/06/custom-traverser-for-neo4j.html)? Thanks for the help, James ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Tobias Ivarsson tobias.ivars...@neotechnology.com Hacker, Neo Technology www.neotechnology.com Cellphone: +46 706 534857 ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Traversing all relationship types
Thank you Tobias. This new traversal framework looks much more powerful and fluent then the traverser I have been playing with so far. The getting started guide should definitively point to it. Best regards, James 2011/5/11 Tobias Ivarsson tobias.ivars...@neotechnology.com There is a tentative new traversal API included in Neo4j that features this functionality: org.neo4j.kernel.Traversal.description().expand( org.neo4j.kernel.Traversal.expanderForAllTypes( Direction.OUTGOING ) ); You can read more about it here: http://wiki.neo4j.org/content/Traversal_Framework Cheers, Tobias On Wed, May 11, 2011 at 9:08 AM, Jean-Pierre Bergamin jpberga...@gmail.comwrote: Hello neo4j users I'm just diving into neo4j and playing around with graph algorithms and traversers. As a start, I just wanted to traverse the whole graph with all relationship types in the OUTGOING direction. The traverse() method always expects a RelationshipType. Is there a simpler way to traverse all RelationshipTypes then building up an array that contains all types and the outgoing direction (as described here http://sujitpal.blogspot.com/2009/06/custom-traverser-for-neo4j.html)? Thanks for the help, James ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Tobias Ivarsson tobias.ivars...@neotechnology.com Hacker, Neo Technology www.neotechnology.com Cellphone: +46 706 534857 ___ 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] finding all shortest paths between one node and all other nodes in a large scale databse
Hi, I'm trying to use Neo4j graph database to store a large social network(more than 5,000,000 nodes) for academic research. I need to compute the separation degree(path length) between any two nodes in the graph then get the average degree of whole database. The solution I'm using use now is archieved by executing API GraphAlgoFactory.shortestPath, but it means I need to execute (n*(n-1))/2 times to get all path length. I don't think it's a very good idea :( So, I'm wondering that is there any function which can assign one node and whole DB as Input, and return the paths or only path lengths between the node and all other nodes in the graph as Output? Just like Dijkstra algorithm did. I know there is a Dijkstra function in the API, but it only return the path between two nodes. It'll be really helpful for me if there is any function can return all the result in one computation(even the whole result array computing by Dijkstra) Or does anyone has better idea to deal with this issue? I tried to implement Dijkstra by myself, but it was impossible to declare such big 2D array in the program...(OutOfMemoryException) If there is any advice, I'll really appreciate it. Thanks. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Traversing all relationship types
Jean-Pierre, we are in the process of moving the Getting started guides to docs.neo4j,org, along with a number of good examples, amongst others on traversal. You might find http://components.neo4j.org/neo4j-examples/1.4-SNAPSHOT/ interesting, too? 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 12:41 AM, Jean-Pierre Bergamin jpberga...@gmail.com wrote: Thank you Tobias. This new traversal framework looks much more powerful and fluent then the traverser I have been playing with so far. The getting started guide should definitively point to it. Best regards, James 2011/5/11 Tobias Ivarsson tobias.ivars...@neotechnology.com There is a tentative new traversal API included in Neo4j that features this functionality: org.neo4j.kernel.Traversal.description().expand( org.neo4j.kernel.Traversal.expanderForAllTypes( Direction.OUTGOING ) ); You can read more about it here: http://wiki.neo4j.org/content/Traversal_Framework Cheers, Tobias On Wed, May 11, 2011 at 9:08 AM, Jean-Pierre Bergamin jpberga...@gmail.comwrote: Hello neo4j users I'm just diving into neo4j and playing around with graph algorithms and traversers. As a start, I just wanted to traverse the whole graph with all relationship types in the OUTGOING direction. The traverse() method always expects a RelationshipType. Is there a simpler way to traverse all RelationshipTypes then building up an array that contains all types and the outgoing direction (as described here http://sujitpal.blogspot.com/2009/06/custom-traverser-for-neo4j.html)? Thanks for the help, James ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Tobias Ivarsson tobias.ivars...@neotechnology.com Hacker, Neo Technology www.neotechnology.com Cellphone: +46 706 534857 ___ 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] Index Framework - Query Question
Is there currently any way to have a composite index consisting of fulltext and non-analyzed (simple fields), and to query them in a single query statement? e.g. : title:Reloaded AND year:1999 In this case, I'd be using a Lucene Analyzer on the title, but indexing the primitive types without using the analyzer/norms/etc...I know how to do it with Lucene directly, but not clear if it can be done w/Neo4J. Thanks! Rick ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] REST API (optimistic or transactional) concurrency?
I think you have to still do it over HTTP *in addition* to any other transport, if for no other reason than the ubiquity of HTTP-capable client applications/platforms/languages. That said, I'd implement a pessimistic transaction recovery scheme with a configurable time to live. -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Jacob Hansson Sent: Wednesday, May 11, 2011 10:58 AM To: Neo4j user discussions Subject: Re: [Neo4j] REST API (optimistic or transactional) concurrency? We started discussing how an implementation would look, but bumped into problems. The plan was to look at potentially adding a restful transaction API, something like create a transaction context resource via a POST, and then work with the database via that context resource, commiting/aborting it when done. The problem with this approach, and with any other HTTP-based approach that we could come up with that allows real over-the-wire transactions, is that we have no easy way of knowing if a client has crashed. We could potentially end up with a ton of open transactions holding locks on the DB, and wouldn't know if the clients were still around. With an approach that's closer to the network, we can roll back transactions if the connection dies, but doing that with HTTP is a lot harder. The idea of transactional support over the wire is still very much alive, but it will probably not be done over HTTP.. /Jake On Wed, May 11, 2011 at 12:21 PM, Aseem Kishore aseem.kish...@gmail.comwrote: Just wanted to ask: how'd the lab day go last Friday? Any updates on this? =) Cheers, Aseem On Thu, May 5, 2011 at 7:42 AM, Mattias Persson matt...@neotechnology.comwrote: 2011/5/5 Aseem Kishore aseem.kish...@gmail.com Yes, great points. I've worked a good deal with Microsoft's cloud NoSQL DB, Windows Azure Table Storage, and for what it's worth, I thought they solved this problem very elegantly. That API is entirely REST-based, and they use HTTP If-Match / If-Modified-Since headers to achieve conditional requests, which gets them optimistic concurrency like I described below. E.g. if you want to read and update a row, your update request (e.g. PUT) is conditional based on what you expect the value to be (specified via the If-* header or headers). If it's no longer that value, the request will fail, so you can re-read and try again. This allows it to be nicely scalable since it doesn't require transactions AKA locks. Part of the problem for Neo4j though is that (a) the index is separate from the graph, which requires separate manual operations, and (b) the index supports multiple nodes under a single key/value pair, which doesn't lend itself to a fail if a node already exists metaphor. I know you guys are working on solving (a) in the next release, but I would also love an alternative to (b), e.g. being able to specify (whether at an index level, a key/value pair level, or a query/request level) that I *don't* want multiple nodes under the same key/value pair in an index. I have also think that such an index type is good to have, for just this and for performance reasons in that you can do low-level optimizations if you know that there will be only zero or one node/relationship for a given key/value pair in an index. Hopefully there will be time for that soon :) Thanks much for your consideration! And good luck. =) Aseem On Thu, May 5, 2011 at 1:00 AM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Assem, I agree. The problem is not the database API IMHO, but the mismatching semantics of HTTP REST and transactional DB APIs, and the balancing of shoving over work to the database server via server side processing scripting or plugins and client side operations via HTTP. Let's see if we can come up with a first prototype. 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, May 5, 2011 at 9:26 AM, Aseem Kishore aseem.kish...@gmail.com wrote: Thanks Peter. Looking forward to seeing what you guys come up with! Dima, thanks for the tip. It would be nice to not to have to write a custom plugin for what's arguably a pretty fundamental need from database APIs. =) Aseem On Wed, May 4, 2011 at 2:05 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Guys, Friday is labday, so we
Re: [Neo4j] Multiple users on a embedded graphdb
No problem at all. As tx are bound to the executing thread. And the singleton graph-db instance is the way to go. Good Luck with your efforts Michael Am 11.05.2011 um 17:04 schrieb John Doran: Thanks Micheal, Good points, I have 3 weeks to finish up(along with a mountain of other things to do so I can't see the server as and option, I'm really looking for a quick work around because of time limitations. I actually helped Rene get stated with combining the two, I have the two working well together. Apart from the problem I have now of distributions. Could a workaround be to have a singleton instance of the db when clients are performing queries run from this instance, or would there be transactional problems? Regards, John. ___ 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] 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
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 sula...@gmail.com 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] Basic Ruby/Neo4j question
Hi, I just started using Neo4j and I've got a pretty basic question. I've been running the gem using JRuby but I'm having trouble calling on edges/nodes I've made in previous transactions. So one of the very basic example scripts I've been working with looks like: require rubygems require 'neo4j' Neo4j::Transaction.run do a = Neo4j::Node.new :name = 'A' b = Neo4j::Node.new :name = 'B' c = Neo4j::Node.new :name = 'C' d = Neo4j::Node.new :name = 'D' e = Neo4j::Node.new :name = 'E' a.outgoing(:friends) b c b.outgoing(:friends) d e c.outgoing(:friends) b end If I call on any of those within the same transaction, things work great, but if I run that and then open a new transaction to query it, say: Neo4j::Transaction.run do a.outgoing(:friends).depth(2).each {|node| puts node[:name]} end I get undefined local variable errors for a. I thought that maybe I was missing a step where the database committed, but when I tried to switch over to the Transaction.new ... Transaction.finish formulation, I started getting undefined method errors for 'finish'... I assume I'm missing some basic step, but didn't see an answer in the examples/documentation, so I'd appreciate any help! Kristen ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] Creating EXE and a java.Lang error
Was creating an exe by exporting JAR and Runnable JARs thro eclipse.. Using Launch4j to do that. and having proper manifest files with the class path too.. But i get the following error when i try to run the created exe file. Caused by: java.Lang.ClassNotFoundException: org.neo4j.graphdb.GraphDatabaseService at java.net.URLClassLoader$1.run at java.security.AccessController.doPrivileged at java.net.URLClassLoader.findClass at java.Land.ClassLoader.loadClass at sun.misc.Launcher$AppClassLoader.loadClass at java.Lang.ClassLoader.loadClass Could not find the main class: package name.Class name is there a solution to this. i had actually created an exe earlier which was working perfectly fine.. Thanks, Regards Abhishek ___ 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] Basic Ruby/Neo4j question
Vaccaro, could this be a simple Ruby scoping issue, since you are defining a within the transaction block? If you move the definition onto a global variable or declare a outside the block, does it work then? 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 10:47 AM, Vaccaro, Kristen M kvacc...@mitre.orgwrote: Hi, I just started using Neo4j and I've got a pretty basic question. I've been running the gem using JRuby but I'm having trouble calling on edges/nodes I've made in previous transactions. So one of the very basic example scripts I've been working with looks like: require rubygems require 'neo4j' Neo4j::Transaction.run do a = Neo4j::Node.new :name = 'A' b = Neo4j::Node.new :name = 'B' c = Neo4j::Node.new :name = 'C' d = Neo4j::Node.new :name = 'D' e = Neo4j::Node.new :name = 'E' a.outgoing(:friends) b c b.outgoing(:friends) d e c.outgoing(:friends) b end If I call on any of those within the same transaction, things work great, but if I run that and then open a new transaction to query it, say: Neo4j::Transaction.run do a.outgoing(:friends).depth(2).each {|node| puts node[:name]} end I get undefined local variable errors for a. I thought that maybe I was missing a step where the database committed, but when I tried to switch over to the Transaction.new ... Transaction.finish formulation, I started getting undefined method errors for 'finish'... I assume I'm missing some basic step, but didn't see an answer in the examples/documentation, so I'd appreciate any help! Kristen ___ 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] 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 okramma...@gmail.comwrote: 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
[Neo4j] Neo4j and Gremlin at ChicagoDB
Hi there, Bobby Norton and Dave Astels are giving a lecture in Chicago on May 16th on Neo4j+Gremlin. If you are around, please feel free to sign up. http://chicagodb.gathers.us/events/dots-lines-and-query-paths 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
Re: [Neo4j] finding all shortest paths between one node and all other nodes in a large scale databse
Hey JueiTing, I'm not sure if Hadoop is needed here. What is the current performance characteristics for the shortest path you are using? You could take a decent machine and just fire up, e.g. blocks of 10k node pairs to a ThreadPoolExecutor with cores*2 threads. Each of those tasks only has to return the sum of the path lengths (and you know the block size) so you can sum the whole thing up onto a long and divide it by the number of pairs processed at the end? Perhaps instead of brute force looping one and a half times over all nodes it is perhaps better to do a breath first traversal over all nodes (regardless of relationships, just outgoing rels) and returning unique paths from the traverser and calculating the path lenghts from the start nodes to each _connected_ node on the paths (start node - path[0..n].nodes[1..n]) Cheers Michael Am 11.05.2011 um 21:12 schrieb Peter Neubauer: Hi JueiTing, I think this is a typical case for a massive Map/Reduce job. I am thinking of combining Hadoop works with replicas of the graph and then do the computation. I believe Paddy Fitzgerald has been working with these approaches and can give some feedback. Of course, given the size of the graph, that might prove a problem. OTOH, if there are no modifications during the computation, you could run the calculations on read-only databases from the same store. Would that work? 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 12:47 AM, 翁瑞廷 wshir...@gmail.com wrote: Hi, I'm trying to use Neo4j graph database to store a large social network(more than 5,000,000 nodes) for academic research. I need to compute the separation degree(path length) between any two nodes in the graph then get the average degree of whole database. The solution I'm using use now is archieved by executing API GraphAlgoFactory.shortestPath, but it means I need to execute (n*(n-1))/2 times to get all path length. I don't think it's a very good idea :( So, I'm wondering that is there any function which can assign one node and whole DB as Input, and return the paths or only path lengths between the node and all other nodes in the graph as Output? Just like Dijkstra algorithm did. I know there is a Dijkstra function in the API, but it only return the path between two nodes. It'll be really helpful for me if there is any function can return all the result in one computation(even the whole result array computing by Dijkstra) Or does anyone has better idea to deal with this issue? I tried to implement Dijkstra by myself, but it was impossible to declare such big 2D array in the program...(OutOfMemoryException) If there is any advice, I'll really appreciate it. Thanks. ___ 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] Creating EXE and a java.Lang error
Abhishek, this looks like a packaging classpath problem, not sure how to help. I guess we could have some Skype screen sharing session and try to sort it out? 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:14 AM, Abhishek AS abhishek@gmail.comwrote: Was creating an exe by exporting JAR and Runnable JARs thro eclipse.. Using Launch4j to do that. and having proper manifest files with the class path too.. But i get the following error when i try to run the created exe file. Caused by: java.Lang.ClassNotFoundException: org.neo4j.graphdb.GraphDatabaseService at java.net.URLClassLoader$1.run at java.security.AccessController.doPrivileged at java.net.URLClassLoader.findClass at java.Land.ClassLoader.loadClass at sun.misc.Launcher$AppClassLoader.loadClass at java.Lang.ClassLoader.loadClass Could not find the main class: package name.Class name is there a solution to this. i had actually created an exe earlier which was working perfectly fine.. Thanks, Regards Abhishek ___ 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] Getting started with Ruby
I'll put some cons, but the pros are just the opposite for the other. - Well, one con that comes to my mind regarding the use of the embedded API that you're attached to JRuby and maybe you want/have to use plain MRI, Rubinius or something else. - One con that I can think on the REST API is network latency, which may become a performance bottleneck. I think that both configurations are simple. However I prefer using the embedded API, just cos I really enjoy the way the embedded API is designed. Regards 2011/5/11 Evan Haveman evanhave...@gmail.com Can someone outline the pros and cons of using Neo4J's embedded API vs its REST API given Ruby as the preferred language. One pro of the embedded API is I believe it is more complete than the REST API -- what is the REST API missing? One pro of the REST API is that my configuration is much simpler. Any others? ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Adriano Almeida Caelum | Ensino e Inovação www.caelum.com.br ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Getting started with Ruby
I think each has their place. This is how I see it: If you're going all in (your graph db is your primary db) then use the Andreas Neo4j.rb gem. If you're not, (your graph db is used as a secondary db or as an index for graph specific tasks) then it may be easier to use my Neography gem. I believe the above decision is complicated and depends very much on how much your model benefits from a graph vs a relational or other database type. On Wed, May 11, 2011 at 10:43 PM, Adriano Henrique de Almeida adrianoalmei...@gmail.com wrote: I'll put some cons, but the pros are just the opposite for the other. - Well, one con that comes to my mind regarding the use of the embedded API that you're attached to JRuby and maybe you want/have to use plain MRI, Rubinius or something else. - One con that I can think on the REST API is network latency, which may become a performance bottleneck. I think that both configurations are simple. However I prefer using the embedded API, just cos I really enjoy the way the embedded API is designed. Regards 2011/5/11 Evan Haveman evanhave...@gmail.com Can someone outline the pros and cons of using Neo4J's embedded API vs its REST API given Ruby as the preferred language. One pro of the embedded API is I believe it is more complete than the REST API -- what is the REST API missing? One pro of the REST API is that my configuration is much simpler. Any others? ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Adriano Almeida Caelum | Ensino e Inovação www.caelum.com.br ___ 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] Neo4j EC2 AMI image available
This is great news! What is the simplest way to secure a Neo4j instance on AWS? Daniel On Tue, May 10, 2011 at 06:29, Peter Neubauer peter.neuba...@neotechnology.com wrote: Hi all, Jussi Heinonen from OpenCredo has created a Neo4j Server EC2 image to try out things with. Well done, thanks for the effort Jussi! Read more abotu it and feel free to give feedback - http://jussiheinonen.blogspot.com/2011/05/neo4j-graph-database-server-image-in.html 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