Re: [Neo] Limits of Neo4j
Hi Chris, Neo4j should be suitable for your problem. I just built a similar application (using an email corpus for relationships not facebook). The size of the system was the following: Nodes: 100,030,002 Edges: 3,041,030,000 Attributes: 140,120,000 We did standard friend-of-a-friend and other navigational queries. Most of our queries came back under 50 milliseconds (often under 10 milliseconds). In an EC2 instance we were able to ingest the entire 95GB graph in 100m39.661s. I don't think we did a really good job optimizing Neo4j or the VMs, plus it was all virtualized in EC2 (dedicated hardware would have been faster). But with those speeds and at that scale, we were happy without spending any time optimizing. :) -Todd On Mon, Apr 19, 2010 at 2:21 PM, snacktime snackt...@gmail.com wrote: Would Neo4j scale to handle the friend relationships handled by Facebook? Where I work we run a number of large social games mostly on Facebook, and for a number of reasons we end up caching a lot of the friend data (mostly because their api can be unreliable and slow). I'd like to have a more intelligent caching system where our side is relationship aware, so when relationships change we can show that to users, as opposed to doing stuff like caching your friends list for 48 hours, regardless of whether it's changed. Is Ne04j even in the ballpark for something like this? Chris ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo] Connecting to Neo4j DB from ActionScript
Hi Amir, I used GSON (google's json package) on the Neo side and Flex's json AS3 classes to make the connection. -Todd On Fri, Mar 12, 2010 at 4:31 PM, Amir Hossein Jadidinejad amir.jad...@yahoo.com wrote: Hi, Is it possible to connect a Neo4j instance using ActionScript and Adobe Flex?! Thanks. ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo] Graph Algo Problems
Hi Peter, I have the centrality stuff working now, no further help required. :) My nodeset had to be larger. -Todd On Mar 1, 2010, at 10:02 PM, Todd Stavish t...@stavi.sh wrote: Hi Everyone, I am running into some null pointer exceptions when I try to feed things into some of the graph algos. The test cases can be found in the link below. It is all maven based and the pre-built graph is included. Queries19 (Floyd-Warshall), 20 (Eigenvector Centrality with the Arnoldi iteration), and 21 (Eigenvector Centrality with the Power method) are the problematic ones. To run each query, change the query number in the configuration.properties in the resources directory. Then, mvn compile, mvn exec:exec. http://www.stavi.sh/backend.zip I constrained the sub-graph to be the smallest possible one. I also tried setting the max iterations and calling calculate before the getCentrality call. I followed the same pattern I used for the BFS-Centrality and Dijikstra for shortest path (which seem to be working). Not sure what I am doing wrong here. Any help would be appreciated. Thanks, Todd ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo] Graph Algo Problems
Those exceptions seem like it might not be setup properly. No matter, I changed the implementation. I am seeing different centrality calculations for Arnoldi versus Power. I tweaked the iterations to see if it made a difference. Is it the precision setting causing the difference maybe? The target and nodeset are the same for each. -Todd On Mar 3, 2010, at 11:04 AM, Peter Neubauer peter.neuba...@jayway.com wrote: Ok, great, I am just now looking at it and noticed a NPE in Node topicNodes = referenceNode.getSingleRelationship(RelationshipTypes.TOPICS, Direction.OUTGOING).getEndNode(); The referenceNode.getSingleRelationship(RelationshipTypes.TOPICS, Direction.OUTGOING) is returning NULL ... Cheers, /peter neubauer COO and Sales, Neo Technology 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://www.tinkerpop.com - Processing for Internet-scale graphs. http://www.thoughtmade.com - Scandinavias coolest Bring-a-Thing party. On Wed, Mar 3, 2010 at 6:55 PM, Todd Stavish toddstav...@gmail.com wrote: Hi Peter, I have the centrality stuff working now, no further help required. :) My nodeset had to be larger. -Todd On Mar 1, 2010, at 10:02 PM, Todd Stavish t...@stavi.sh wrote: Hi Everyone, I am running into some null pointer exceptions when I try to feed things into some of the graph algos. The test cases can be found in the link below. It is all maven based and the pre-built graph is included. Queries19 (Floyd-Warshall), 20 (Eigenvector Centrality with the Arnoldi iteration), and 21 (Eigenvector Centrality with the Power method) are the problematic ones. To run each query, change the query number in the configuration.properties in the resources directory. Then, mvn compile, mvn exec:exec. http://www.stavi.sh/backend.zip I constrained the sub-graph to be the smallest possible one. I also tried setting the max iterations and calling calculate before the getCentrality call. I followed the same pattern I used for the BFS-Centrality and Dijikstra for shortest path (which seem to be working). Not sure what I am doing wrong here. Any help would be appreciated. Thanks, Todd ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo] Graph Algo Problems
Hi Peter, Thanks for the help. It is critical. I need to provide feedback to my customer on the suitability of using the in-built Neo4J graph algos. Or if someone has a working testcase of Floyd-Warshall or either Eigenvector implementation, I could use that to compare with my code / graph. Thanks, Todd On Tue, Mar 2, 2010 at 3:10 AM, Peter Neubauer neubauer.pe...@gmail.com wrote: Thanks Todd for the pointers! Is this absolutely critical for you? Otherwise, we will put it into our backlog and do as time permits. Great you got testcases, so I'm sure we should be able to sort it out. The graph algos are written some time ago and would need some general review - we are not quite satisfied with the semantics and logic of things. Meanwhile, another possibility would be to look at the JUNG algos via Gremlin, see http://wiki.github.com/tinkerpop/gremlin/working-with-jung-algorithms. They do not use traversers, but the algos themselfes should be very good and otherwise performance is prolly ok. Cheers, /peter neubauer COO and Sales, Neo Technology 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://www.tinkerpop.com - Processing for Internet-scale graphs. http://www.thoughtmade.com - Scandinavias coolest Bring-a-Thing party. On Tue, Mar 2, 2010 at 6:02 AM, Todd Stavish t...@stavi.sh wrote: Hi Everyone, I am running into some null pointer exceptions when I try to feed things into some of the graph algos. The test cases can be found in the link below. It is all maven based and the pre-built graph is included. Queries19 (Floyd-Warshall), 20 (Eigenvector Centrality with the Arnoldi iteration), and 21 (Eigenvector Centrality with the Power method) are the problematic ones. To run each query, change the query number in the configuration.properties in the resources directory. Then, mvn compile, mvn exec:exec. http://www.stavi.sh/backend.zip I constrained the sub-graph to be the smallest possible one. I also tried setting the max iterations and calling calculate before the getCentrality call. I followed the same pattern I used for the BFS-Centrality and Dijikstra for shortest path (which seem to be working). Not sure what I am doing wrong here. Any help would be appreciated. Thanks, Todd ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo] Graph Algo Problems
Hi Everyone, I am running into some null pointer exceptions when I try to feed things into some of the graph algos. The test cases can be found in the link below. It is all maven based and the pre-built graph is included. Queries19 (Floyd-Warshall), 20 (Eigenvector Centrality with the Arnoldi iteration), and 21 (Eigenvector Centrality with the Power method) are the problematic ones. To run each query, change the query number in the configuration.properties in the resources directory. Then, mvn compile, mvn exec:exec. http://www.stavi.sh/backend.zip I constrained the sub-graph to be the smallest possible one. I also tried setting the max iterations and calling calculate before the getCentrality call. I followed the same pattern I used for the BFS-Centrality and Dijikstra for shortest path (which seem to be working). Not sure what I am doing wrong here. Any help would be appreciated. Thanks, Todd ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo] Porting to RC1 for algos?
Hi Mattias, Thanks, I've already upgraded to RC1 and 0.3-SNAPSHOT . It was pretty straightforward and painless. So if anyone that is thinking of upgrading and hasn't, it's not a big deal. Don't let the initial compilation errors scare you. :) Regards, Todd On Sat, Feb 6, 2010 at 5:14 PM, Mattias Persson matt...@neotechnology.com wrote: which version are you using? If you're using maven then that component have changed name to (artifactId) neo4j-graph-algo and uses the latest kernel snapshot, so my thought would be to try that. (version 0.3-SNAPSHOT) 2010/2/6, Todd Stavish t...@stavi.sh: Hi Everyone, Is it better for us to port to RC1 if we are trying to use graph-algos or stay on the old stuff? Thanks Todd ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Mattias Persson, [matt...@neotechnology.com] Neo Technology, www.neotechnology.com ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo] Graph Algos
Hello, When I migrated from: dependency groupIdorg.neo4j/groupId artifactIdgraph-algo/artifactId version0.2-SNAPSHOT/version /dependency to: dependency groupIdorg.neo4j/groupId artifactIdneo4j-graph-algo/artifactId version0.3-SNAPSHOT/version /dependency It gave me the following compilation errors: NeoQuery.java:[719,35] cannot find symbol symbol : constructor SingleSourceShortestPathBFS(nulltype,org.neo4j.api.core.Direction,com.cisco.collectiveintelligence.RelationshipTypes) location: class org.neo4j.graphalgo.shortestpath.SingleSourceShortestPathBFS NeoQuery.java:[736,44] getCentrality(org.neo4j.graphdb.Node) in org.neo4j.graphalgo.centrality.ShortestPathBasedCentralityjava.lang.Double,java.lang.Integer cannot be applied to (org.neo4j.api.core.Node) Looking in SVN, the constructor seems to be there, but getCentrality is gone? Thanks, Todd ListNode nodeList = findPeopleByATopic(person,topic); // Set up shortest path algorithm. // Observe that we don't need to specify a start node. SingleSourceShortestPathInteger singleSourceShortestPath; singleSourceShortestPath = new SingleSourceShortestPathBFS( person, Direction.BOTH, RelationshipTypes.KNOWS); System.out.println(after single sorce shortest path); // Set up betweenness centrality algorithm. Set nodeSet = new HashSet(nodeList); BetweennessCentralityInteger betweennessCentrality; betweennessCentrality = new BetweennessCentralityInteger( singleSourceShortestPath, nodeSet); System.out.println(after betweeness centrality constructor); // Get centrality value for a node. Double value = betweennessCentrality.getCentrality(person); ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo] Does anyone have Prefuse (not flare) with Neo4j sample code?
In particular, how to use their graph reader class or custom mapping? Thanks, Todd ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo] Neo Shell listing a relationship's property
Ah, I was trying to cd to the relationship ID without the -r. Works perfectly. Thanks Mattias. On Sat, Dec 12, 2009 at 5:54 AM, Mattias Persson matt...@neotechnology.com wrote: This can be done. You're using b11 right? In that case you do a: ls -rv to list your relationships with their ids (the -v flag) then you take the relationship's id and do a: cd -r relationship-id you're now standing on that relationship and can do operations like ls, set, rm a.s.o. From there you can then do cd .. to get back or cd start or cd end to go to its start/end node 2009/12/11, Todd Stavish toddstav...@gmail.com: Is there a way to list a property of a relationship in Neo Shell? If not, is there another way to do this without using Neoclipse? I am SSHing into an EC2 instance. Thanks, Todd ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Mattias Persson, [matt...@neotechnology.com] Neo Technology, www.neotechnology.com ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo] SingleValueIndex org.neo4j.api.core.NotFoundException: More than one relationship
Hi Arin, I just ran into this same problem. I am not sure about the scalability of my solution, but I only had 20,000 users. It may scale, but I just wanted you to know that I didn't test for it. My goal was to step into the graph using a string based query, that is supplying a user's name. An index seemed like overkill to me. I created my users with all of the relationships that I needed for modeling, however I created one extra relationship that attached to a sub-reference node that attached to the reference node. So when I needed to needed a user, I could open the reference node, got to the people sub-reference node, and traverse to all of my people nodes adding them to a hashmapstring:name,long:nodeId. This hashmap can be used to resolve users to their nodeId for other queries along the graph. Code is below. -Todd private static HashMapString,Long getMap(String type, NeoService neo) { long referenceNodeId = 0; HashMapString,Long map = new HashMapString,Long(); Node referenceNode = neo.getNodeById(referenceNodeId); if (type.equals(topic)) { Node topicNodes = referenceNode.getSingleRelationship(RelationshipTypes.TOPICS, Direction.OUTGOING).getEndNode(); for (Relationship topic : topicNodes.getRelationships(RelationshipTypes.TOPIC, Direction.OUTGOING)) { Node topicNode = topic.getEndNode(); map.put(topicNode.getProperty(topic).toString(), topicNode.getId()); } } else if (type.equals(person)) { Node personNodes = referenceNode.getSingleRelationship(RelationshipTypes.PEOPLE, Direction.OUTGOING).getEndNode(); for (Relationship person : personNodes.getRelationships(RelationshipTypes.PERSON, Direction.OUTGOING)) { Node personNode = person.getEndNode(); map.put(personNode.getProperty(name).toString(), personNode.getId()); } } return map; } On Thu, Dec 10, 2009 at 2:19 PM, Arin Sarkissian a...@rspot.net wrote: Hey guys, I'm pretty new to Neo4j, especially the indexing stuff. Here's my situation. I want to be able to get nodes via one of their properties; in this case let's say the Nodes represent a user I want to be able to grab a User's node via their username. So, my initial attempt may be naive (no batching etc) but I've been reading thru a a large text file (CSV format: username, userid), creating a node for each of these lines indexing the username component. Now this needs to be unique (given that usernames are unique) so I've been using the SingleValueIndex and have run into a problem: It looks like the SingleValueIndex actually does allow multiple values for a given lookup (ex: username = phatduckk) however when trying to fetch a Node from the index that has multiples (ie: username=phatduckk was indexed twice) I get a NotFoundException with More than one relationship as the message. I have posted a skeleton piece of code that surfaces this problem over at: http://gist.github.com/253553 This code does not make sure that the Node being indexed for a key is always the same - it actually does the opposite: it tries to index username=phatduckk w/ a different node each time. The bit of code at http://gist.github.com/253569 does the opposite: i tries to index the same node for the index username=phatduckk each time. I also have a few random questions sprinkled in the code as comments which illustrate my noobiness =) Honestly, I'm not claiming this is a bug - I may be completely misusing and misunderstanding the indexing functionality but with my limited experience it doesn't seem that SingleValueIndex is single at all (hopefully - i'm just wrong and made a dumb mistake). Thanks for the help guys, Arin ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo] Neo Shell listing a relationship's property
Is there a way to list a property of a relationship in Neo Shell? If not, is there another way to do this without using Neoclipse? I am SSHing into an EC2 instance. Thanks, Todd ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo] LuceneIndexBatchInserter doubt
Hi Mattias, Núria. I am also running into scalability problems with the Lucene batch inserter at much smaller numbers, 30,000 indexed nodes. I tried calling optimize more. Increasing ulimit didn't help. INFO] Exception in thread main java.lang.RuntimeException: java.io.FileNotFoundException: /Users/todd/Code/neo4Jprototype/target/classes/data/graph/lucene/name/_0.cfx (Too many open files) [INFO] at org.neo4j.util.index.LuceneIndexBatchInserterImpl.getNodes(LuceneIndexBatchInserterImpl.java:186) [INFO] at org.neo4j.util.index.LuceneIndexBatchInserterImpl.getSingleNode(LuceneIndexBatchInserterImpl.java:238) [INFO] at com.collectiveintelligence.QueryNeo.loadDataToGraph(QueryNeo.java:277) [INFO] at com.collectiveintelligence.QueryNeo.main(QueryNeo.java:57) [INFO] Caused by: java.io.FileNotFoundException: /Users/todd/Code/neo4Jprototype/target/classes/data/graph/lucene/name/_0.cfx (Too many open files) I tried breaking up to separate batchinserter instances, and it hangs now. Can I create more than one batch inserter per process if they run sequentially and non-threaded? Thanks, Todd On Mon, Dec 7, 2009 at 7:28 AM, Núria Trench nuriatre...@gmail.com wrote: Hi again Mattias, I have tried to execute my application with the last version available in the maven repository and I still have the same problem. After creating and indexing all the nodes, the application calls the optimize method and, then, it creates all the edges by calling the method getNodes in order to select the tail and head node of the edge, but it doesn't work because many nodes are not found. I have tried to create only 30 nodes and 15 edges and it works properly, but if I try to create a big graph (180 million edges + 20 million nodes) it doesn't. I have also tried to call the optimize method every time the application has been created 1 million nodes but it doesn't work. Have you tried to create as many nodes as I have said with the newer index-util version? Thank you, Núria. 2009/12/4 Núria Trench nuriatre...@gmail.com Hi Mattias, Thank you very much for fixing the problem so fast. I will try it as soon as the new changes will be available in the maven repository. Núria. 2009/12/4 Mattias Persson matt...@neotechnology.com I fixed the problem and also added a cache per key for faster getNodes/getSingleNode lookup during the insert process. However the cache assumes that there's nothing in the index when the process starts (which almost always will be true) to speed things up even further. You can control the cache size and if it should be used by overriding the (this is also documented in the Javadoc): boolean useCache() int getMaxCacheSizePerKey() methods in your LuceneIndexBatchInserterImpl instance. The new changes should be available in the maven repository within an hour. 2009/12/4 Mattias Persson matt...@neotechnology.com: I think I found the problem... it's indexing as it should, but it isn't reflected in getNodes/getSingleNode properly until you flush/optimize/shutdown the index. I'll try to fix it today! 2009/12/3 Núria Trench nuriatre...@gmail.com: Thank you very much for your response. If you need more information, you only have to send an e-mail and I will try to explain it better. Núria. 2009/12/3 Mattias Persson matt...@neotechnology.com This is something I'd like to reproduce and I'll do some testing on this tomorrow 2009/12/3 Núria Trench nuriatre...@gmail.com: Hello, Last week, I decided to download your graph database core in order to use it. First, I created a new project to parse my CSV files and create a new graph database with Neo4j. This CSV files contain 150 milion edges and 20 milion nodes. When I finished to write the code which will create the graph database, I executed it and, after six hours of execution, the program crashes because of a Lucene exception. The exception is related to the index merging and it has the following message: mergeFields produced an invalid result: docCount is 385282378 but fdx file size is 3082259028; now aborting this merge to prevent index corruption I have searched on the net and I found that it is a lucene bug. The libraries used for executing my project were: neo-1.0-b10 index-util-0.7 lucene-core-2.4.0 So, I decided to use a newer Lucene version. I found that you have a newer index-util version so I updated the libraries: neo-1.0-b10 index-util-0.9 lucene-core-2.9.1 When I had updated those libraries, I tried to execute my project again and I found that, in many occassions, it was not indexing properly. So, I tried to optimize the index after every time I indexed something. This was a solution because, after that, it was indexing properly but the time execution increased a lot. I am not using transactions, instead of this, I am using the Batch Inserter with
[Neo] Maven Dependency For Neo Util for Lucene BatchInserter?
I am using the Lucene Batch Inserter with attributes that have a space (combined first name and last name). Exception in thread main java.lang.NoSuchMethodError: org.neo4j.impl.util.FileUtils.fixSeparatorsInPath(Ljava/lang/String;)Ljava/lang/String; at org.neo4j.util.index.LuceneIndexBatchInserterImpl.fixPath(LuceneIndexBatchInserterImpl.java:61) at org.neo4j.util.index.LuceneIndexBatchInserterImpl.init(LuceneIndexBatchInserterImpl.java:51) at com.cisco.collectiveintelligence.QueryNeo.addData(QueryNeo.java:135) at com.cisco.collectiveintelligence.QueryNeo.main(QueryNeo.java:43) I tried the obvious: dependency groupIdorg.neo4j/groupId artifactIdutil/artifactId version1.0-b9/version /dependency Anyone know where I can find this? Thanks, Todd ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo] Maven Dependency For Neo Util for Lucene BatchInserter?
Thanks Mattias. Just an FYI, there doesn't seem to be 1.0-b10 version build for neo-utils yet. http://m2.neo4j.org/org/neo4j/neo-utils/ Regards, Todd On Fri, Dec 4, 2009 at 12:26 PM, Mattias Persson matt...@neotechnology.com wrote: 2009/12/4 Todd Stavish toddstav...@gmail.com: I am using the Lucene Batch Inserter with attributes that have a space (combined first name and last name). Exception in thread main java.lang.NoSuchMethodError: org.neo4j.impl.util.FileUtils.fixSeparatorsInPath(Ljava/lang/String;)Ljava/lang/String; at org.neo4j.util.index.LuceneIndexBatchInserterImpl.fixPath(LuceneIndexBatchInserterImpl.java:61) at org.neo4j.util.index.LuceneIndexBatchInserterImpl.init(LuceneIndexBatchInserterImpl.java:51) at com.cisco.collectiveintelligence.QueryNeo.addData(QueryNeo.java:135) at com.cisco.collectiveintelligence.QueryNeo.main(QueryNeo.java:43) I tried the obvious: dependency groupIdorg.neo4j/groupId artifactIdutil/artifactId Try 'neo-utils' instead version1.0-b9/version /dependency Anyone know where I can find this? Thanks, Todd ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Mattias Persson, [matt...@neotechnology.com] Neo Technology, www.neotechnology.com ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo] setProperty allowed objects
Plagiarizing the now defunct American anti-drug campaign, Just say no...to object features. The memory management and schema processing of objects would decrease the speed (and arguably the elegance) of the graph. On Sun, Nov 22, 2009 at 1:26 PM, Emil Eifrem e...@neotechnology.com wrote: On Sun, Nov 22, 2009 at 18:34, Robert Lockhart bobby...@gmail.com wrote: it's super-lame that you only allow a basic set of objects to be the values of properties. Any plans to open it up to arbitrary objects? No. We're not an object database. I think going down that path opens up a whole can of worms that I'd rather not get us into. For example, class/object versioning and activation depth. On the contrary, I've always agreed with the relational gurus that separating data and logic is a good thing. I.e., a programming language paradigm is not necessarily the most robust and effective data model. I disagree with the RDBMS guys, however, that tables is that data model. At least not for the majority of the applications in 2009. Anyway, it seems to be easy enough to map any object down to the property data types Neo4j provides. If you think about it, you can recursively decompose most Java object's state to Strings + the JVM primitive types. What we need to add is more powerful wiring so you won't have to do as much of the get/setProperty that you need to do today. Cheers, -- Emil Eifrém, CEO [e...@neotechnology.com] Neo Technology, www.neotechnology.com Cell: +46 733 462 271 | US: 206 403 8808 http://blogs.neotechnology.com/emil http://twitter.com/emileifrem ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo] Garbage nodes
Based on my experience with Object Databases, I can't recommend a persistent garbage collector implementation (PGC). Just like all parts of your object model don't need to be expressed in your graph, persistence doesn't need garbage collectors. Based on what I've seen implemented by customers, GC's are meant for dynamic memory allocation only. One consequence, we found, is that the PGC often delays the application. To avoid this, you end up avoiding or delaying the PGC for a long time, which means there is no automatic GC, so ultimately the application is making a manual process of a supposedly automatic operation. The delay also ends up bloating the database, ie the impact of not deleting the nodes is that you end up using more storage space, when you create new nodes you end up allocating more because the old ones are still around. Not sure about Neo4j, but this also ended up fragmenting the database files. So for us, we found that we were setting ourselves up for bloat and fragmentation, and poor performance because you are going to have access more data. It was also kind of fragile, because if you make a mistake and not root something, you may end up having the PGC accidentally delete something that you wanted. We had a tragically sad experience were a customer was complaining about the PGC taking a long time, the PGC was deleting more objects then they intended, good data was lost (the performance was fine). Please take this as a data point on the decision, it's possible that PGCs could be implemented in a way that don't experience these problems, and end-users could be guided to avoid pitfalls, or PGCs might work for a certain class of applications and not others. -Todd On Fri, Nov 6, 2009 at 12:47 PM, Johan Svensson jo...@neotechnology.com wrote: I'll jump in on this one then. Node or relationship IDs will only be reused if they are deleted. There is no possibility that any IDs change without deleting. Regards, -Johan On Fri, Nov 6, 2009 at 3:11 PM, Andrea Puddu kiedi...@gmail.com wrote: Hi Peter, I'm sorry if I jump in the discussion. I have a question about garbage collection. Are node IDs reused only if some node is deleted? I mean, is there any possibility that some IDs change without deleting any nodes? And what about relationship IDs? Thank you in advance. Andrea ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo] Hadoop
I think you just have to import data into HDFS, a NeoInputFormat class - http://hadoop.apache.org/common/docs/current/api/org/apache/hadoop/mapred/InputFormat.html Relational implementation - http://www.cloudera.com/blog/2009/03/06/database-access-with-hadoop/ On Sat, Oct 3, 2009 at 5:36 AM, Johan Svensson jo...@neotechnology.com wrote: Hi Oleg, On Wed, Sep 30, 2009 at 12:41 PM, Oleg Aravin oara...@griddynamics.com wrote: Hello Can i use Hadooop to store neo4j storage ? I would say not possible at the moment. It might be possible to write some glue in-between but it will still not work as expected in some use-cases. What problem did you intend to solve by using Neo4j+Hadoop? Regards, -Johan ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo] Traversing between two nodes
Does anybody have traversal code that shows if two nodes are connected, and if so the nodes that connect them? Thanks, Todd ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo] Neo4J Scalability
Hi Johan, Thanks! Quick summary, it was definitely a config issue. Changing to the recommend config settings makes the exceptions go away. Weird though, those config values are for VM memory management. But the exceptions looked like file I/O issues. How does Neo4J get around the OS max file size limitation, does it just overflow into a new file? I successfully ran the code resulting in roughly 190M nodes/properties and 390M relationships injected in 35min (the condition in one of your for loops probably has a typo, should have been personnumberOfPeople Oh thanks, I thought that I was accessing a nodeID that didn't exist, so I tried to go above the total number of nodes. I forgot to change it back. Sorry. I first tried on my laptop but ran out of disk space (with a similar exception you got) since the full load requires 41GB of free space. Could you please try the injection again (using similar configuration and verifying you have enough disk space)? I had enough disk space, 200GB+. I am still getting heap issues, I don't have enough memory on my laptop, but I will run it on the cloud later and they should go away. Also (maybe not important since this is just a test but) relationships can be treated as bi-directional/non directed using the enum constant Direction.BOTH, so the two relationships a-KNOWS-b and b-KNOWS-a can be represented with one a-KNOWS-b. This is just for traversals, no? You can't define it as bi-directional on creation, can you? I noticed that Neo doesn't explicitly define cardinality (many-to-many, one-to-many, etc). Everything is supported though. And the API is concise, which is prefereable. Thanks again. Regards, Todd Regards, -Johan On Wed, Sep 9, 2009 at 3:11 AM, Todd Stavishtoddstav...@gmail.com wrote: He Johan, What OS do you run this on? The FileChannel.write fail with an exception saying buffer is too large is new to me. OSX. Snow Leopard. java -version java version 1.6.0_15 Java(TM) SE Runtime Environment (build 1.6.0_15-b03-219) Java HotSpot(TM) 64-Bit Server VM (build 14.1-b02-90, mixed mode) I can try it on centos too. I was going to try to run in it in EC2, but lost momentum and ideas to try. Try decrease the amount of memory you give the store files (if you have modified default configuration) and make sure you at least have disk space to write out 1/10th of the dedicated memory for each store file. Plenty of disk space. Do you mean pre-allocate the database file? How do you do that? I will run some tests on this code first thing in the morning to see if I can reproduce it. Thanks. I will send you the input files. And other code. Regards, Todd -Johan On Tue, Sep 8, 2009 at 5:45 PM, Todd Stavishtoddstav...@gmail.com wrote: Hello All, I hope that I haven't been too demanding of this list. I am pushing a tight deadline. I can't seem to get Neo4J to scale above 1.5 million nodes. The code is simple, just create a node, give it one property. Then go back and randomly create relationships. I moved to the BatchInserter too. Is there a way to use more than one DB? Is it a file size limitation? Can I commit incrementally somehow? I looked at the BatchInterter source, and there doesn't seem to be anything that I can do. Exceptions and demo code below. Thanks, Todd Created 1516633 nodes in 33 seconds Exception in thread main org.neo4j.impl.nioneo.store.StoreFailureException: Unable to write record[1419120] @[188742960] at org.neo4j.impl.nioneo.store.AbstractPersistenceWindow.writeOut(AbstractPersistenceWindow.java:111) at org.neo4j.impl.nioneo.store.AbstractPersistenceWindow.force(AbstractPersistenceWindow.java:123) at org.neo4j.impl.nioneo.store.PersistenceWindowPool.flushAll(PersistenceWindowPool.java:229) at org.neo4j.impl.nioneo.store.PersistenceWindowPool.close(PersistenceWindowPool.java:203) at org.neo4j.impl.nioneo.store.CommonAbstractStore.close(CommonAbstractStore.java:503) at org.neo4j.impl.nioneo.store.PropertyStore.closeStorage(PropertyStore.java:106) at org.neo4j.impl.nioneo.store.CommonAbstractStore.close(CommonAbstractStore.java:500) at org.neo4j.impl.nioneo.store.NeoStore.closeStorage(NeoStore.java:81) at org.neo4j.impl.nioneo.store.CommonAbstractStore.close(CommonAbstractStore.java:500) at org.neo4j.impl.batchinsert.BatchInserterImpl.shutdown(BatchInserterImpl.java:311) at com.palantir.pathfind.GraphIngestBatch.main(GraphIngestBatch.java:78) Caused by: java.io.IOException: Result too large at sun.nio.ch.FileDispatcher.pwrite0(Native Method) at sun.nio.ch.FileDispatcher.pwrite(FileDispatcher.java:45) at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:100) at sun.nio.ch.IOUtil.write(IOUtil.java:75) at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:651) at
Re: [Neo] Looking at DB contents
Hi Mattias, Yes, that is correct. I think fundamentally I do not understand how your locking works. I assumed that both the shell and traverser would have read only locks. However, I left the shell open and the traverser was blocked. I did not do anything in the shell other than read-only commands. -Todd On Wed, Sep 9, 2009 at 5:47 AM, Mattias Persson matt...@neotechnology.comwrote: I don't follow entirely... you mean that the shell held locks on nodes which made another traverser (executed via script or something) wait? At the moment every command in the shell is wrapped in its own transaction. 2009/9/7 Todd Stavish toddstav...@gmail.com: Hi Martin, Anders, The standalone version of neoclipse works like a charm, thanks. I was surprised that the shell locked out a non-updating traverse application that I wrote. Where do I explicitly declare locking? My natural assumption was in beginTx( kindOfLock ). Thanks, Todd On Mon, Sep 7, 2009 at 1:17 AM, Martin Filipczyk i...@mupitu.de wrote: Hi Todd, have you already tried the neoclipse standalone version? -Martin Todd Stavish schrieb: Thanks I'll give the shell a try. Was it crashing on opening the database or what happened? It shows the reference node and then just hangs. I am using Galileo though and maybe the wrong version of GEF. So no big deal. -Todd /anders -- Anders Nawroth [and...@neotechnology.com] GTalk, Skype: anders.nawroth Phone: +46 737 894 163 http://twitter.com/nawroth http://blog.nawroth.com/ ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Mattias Persson, [matt...@neotechnology.com] Neo Technology, www.neotechnology.com ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo] Neo4J Scalability
Hello All, I hope that I haven't been too demanding of this list. I am pushing a tight deadline. I can't seem to get Neo4J to scale above 1.5 million nodes. The code is simple, just create a node, give it one property. Then go back and randomly create relationships. I moved to the BatchInserter too. Is there a way to use more than one DB? Is it a file size limitation? Can I commit incrementally somehow? I looked at the BatchInterter source, and there doesn't seem to be anything that I can do. Exceptions and demo code below. Thanks, Todd Created 1516633 nodes in 33 seconds Exception in thread main org.neo4j.impl.nioneo.store.StoreFailureException: Unable to write record[1419120] @[188742960] at org.neo4j.impl.nioneo.store.AbstractPersistenceWindow.writeOut(AbstractPersistenceWindow.java:111) at org.neo4j.impl.nioneo.store.AbstractPersistenceWindow.force(AbstractPersistenceWindow.java:123) at org.neo4j.impl.nioneo.store.PersistenceWindowPool.flushAll(PersistenceWindowPool.java:229) at org.neo4j.impl.nioneo.store.PersistenceWindowPool.close(PersistenceWindowPool.java:203) at org.neo4j.impl.nioneo.store.CommonAbstractStore.close(CommonAbstractStore.java:503) at org.neo4j.impl.nioneo.store.PropertyStore.closeStorage(PropertyStore.java:106) at org.neo4j.impl.nioneo.store.CommonAbstractStore.close(CommonAbstractStore.java:500) at org.neo4j.impl.nioneo.store.NeoStore.closeStorage(NeoStore.java:81) at org.neo4j.impl.nioneo.store.CommonAbstractStore.close(CommonAbstractStore.java:500) at org.neo4j.impl.batchinsert.BatchInserterImpl.shutdown(BatchInserterImpl.java:311) at com.palantir.pathfind.GraphIngestBatch.main(GraphIngestBatch.java:78) Caused by: java.io.IOException: Result too large at sun.nio.ch.FileDispatcher.pwrite0(Native Method) at sun.nio.ch.FileDispatcher.pwrite(FileDispatcher.java:45) at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:100) at sun.nio.ch.IOUtil.write(IOUtil.java:75) at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:651) at org.neo4j.impl.nioneo.store.AbstractPersistenceWindow.writeOut(AbstractPersistenceWindow.java:105) public class GraphIngestBatch { public static void main(String[] args) { try { // Create graph database service BatchInserter neo = new BatchInserterImpl(graphDB/, BatchInserterImpl.loadProperties(neo.props)); // Read raw text for name data FileReader namesFile = new FileReader(/Users/todd/Code/pathfind/target/classes/rawData/lastNames.txt); BufferedReader namesBuffer = new BufferedReader(namesFile); String name; // Start timer and counter Stopwatch timer = new Stopwatch(); timer.start(); long numberOfPeople = 1; // Initialize root node long person, neighbor; MapString,Object properties = new HashMapString,Object(); properties.put(name, Philberto Anderossono); neighbor = neo.createNode(properties); neo.createRelationship(neighbor, 0, DynamicRelationshipType.withName(ROOT), null); // Create people and neighbor relationships while ((name = namesBuffer.readLine()) != null) { properties.put(name, name); person = neo.createNode(properties); neo.createRelationship(person, neighbor, DynamicRelationshipType.withName(KNOWS), null); neo.createRelationship(neighbor, person, DynamicRelationshipType.withName(KNOWS), null); neighbor = person; numberOfPeople++; } namesBuffer.close(); namesFile.close(); System.out.println(Number of people is: + numberOfPeople); // Randomly generate relationships (minimum four per person + both neighbors, mean ten relationships / person) Long friend; int numberOfFriends = 1; for (person=1; personnumberOfPeople; person++) { for (int i=0; inumberOfFriends; i++)
Re: [Neo] Neo4J Scalability
He Johan, What OS do you run this on? The FileChannel.write fail with an exception saying buffer is too large is new to me. OSX. Snow Leopard. java -version java version 1.6.0_15 Java(TM) SE Runtime Environment (build 1.6.0_15-b03-219) Java HotSpot(TM) 64-Bit Server VM (build 14.1-b02-90, mixed mode) I can try it on centos too. I was going to try to run in it in EC2, but lost momentum and ideas to try. Try decrease the amount of memory you give the store files (if you have modified default configuration) and make sure you at least have disk space to write out 1/10th of the dedicated memory for each store file. Plenty of disk space. Do you mean pre-allocate the database file? How do you do that? I will run some tests on this code first thing in the morning to see if I can reproduce it. Thanks. I will send you the input files. And other code. Regards, Todd -Johan On Tue, Sep 8, 2009 at 5:45 PM, Todd Stavishtoddstav...@gmail.com wrote: Hello All, I hope that I haven't been too demanding of this list. I am pushing a tight deadline. I can't seem to get Neo4J to scale above 1.5 million nodes. The code is simple, just create a node, give it one property. Then go back and randomly create relationships. I moved to the BatchInserter too. Is there a way to use more than one DB? Is it a file size limitation? Can I commit incrementally somehow? I looked at the BatchInterter source, and there doesn't seem to be anything that I can do. Exceptions and demo code below. Thanks, Todd Created 1516633 nodes in 33 seconds Exception in thread main org.neo4j.impl.nioneo.store.StoreFailureException: Unable to write record[1419120] @[188742960] at org.neo4j.impl.nioneo.store.AbstractPersistenceWindow.writeOut(AbstractPersistenceWindow.java:111) at org.neo4j.impl.nioneo.store.AbstractPersistenceWindow.force(AbstractPersistenceWindow.java:123) at org.neo4j.impl.nioneo.store.PersistenceWindowPool.flushAll(PersistenceWindowPool.java:229) at org.neo4j.impl.nioneo.store.PersistenceWindowPool.close(PersistenceWindowPool.java:203) at org.neo4j.impl.nioneo.store.CommonAbstractStore.close(CommonAbstractStore.java:503) at org.neo4j.impl.nioneo.store.PropertyStore.closeStorage(PropertyStore.java:106) at org.neo4j.impl.nioneo.store.CommonAbstractStore.close(CommonAbstractStore.java:500) at org.neo4j.impl.nioneo.store.NeoStore.closeStorage(NeoStore.java:81) at org.neo4j.impl.nioneo.store.CommonAbstractStore.close(CommonAbstractStore.java:500) at org.neo4j.impl.batchinsert.BatchInserterImpl.shutdown(BatchInserterImpl.java:311) at com.palantir.pathfind.GraphIngestBatch.main(GraphIngestBatch.java:78) Caused by: java.io.IOException: Result too large at sun.nio.ch.FileDispatcher.pwrite0(Native Method) at sun.nio.ch.FileDispatcher.pwrite(FileDispatcher.java:45) at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:100) at sun.nio.ch.IOUtil.write(IOUtil.java:75) at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:651) at org.neo4j.impl.nioneo.store.AbstractPersistenceWindow.writeOut(AbstractPersistenceWindow.java:105) public class GraphIngestBatch { public static void main(String[] args) { try { // Create graph database service BatchInserter neo = new BatchInserterImpl(graphDB/, BatchInserterImpl.loadProperties(neo.props)); // Read raw text for name data FileReader namesFile = new FileReader(/Users/todd/Code/pathfind/target/classes/rawData/lastNames.txt); BufferedReader namesBuffer = new BufferedReader(namesFile); String name; // Start timer and counter Stopwatch timer = new Stopwatch(); timer.start(); long numberOfPeople = 1; // Initialize root node long person, neighbor; MapString,Object properties = new HashMapString,Object(); properties.put(name, Philberto Anderossono); neighbor = neo.createNode(properties); neo.createRelationship(neighbor, 0, DynamicRelationshipType.withName(ROOT), null); // Create people and neighbor relationships while ((name = namesBuffer.readLine()) != null) { properties.put(name, name); person = neo.createNode(properties); neo.createRelationship(person, neighbor, DynamicRelationshipType.withName(KNOWS), null); neo.createRelationship(neighbor, person, DynamicRelationshipType.withName(KNOWS), null);
Re: [Neo] Looking at DB contents
Hi Martin, Anders, The standalone version of neoclipse works like a charm, thanks. I was surprised that the shell locked out a non-updating traverse application that I wrote. Where do I explicitly declare locking? My natural assumption was in beginTx( kindOfLock ). Thanks, Todd On Mon, Sep 7, 2009 at 1:17 AM, Martin Filipczyk i...@mupitu.de wrote: Hi Todd, have you already tried the neoclipse standalone version? -Martin Todd Stavish schrieb: Thanks I'll give the shell a try. Was it crashing on opening the database or what happened? It shows the reference node and then just hangs. I am using Galileo though and maybe the wrong version of GEF. So no big deal. -Todd /anders -- Anders Nawroth [and...@neotechnology.com] GTalk, Skype: anders.nawroth Phone: +46 737 894 163 http://twitter.com/nawroth http://blog.nawroth.com/ ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo] Looking at DB contents
Are there command line tools that can output the database \ nodes to text? Or any quick way to inspect the contents of Neo? I didn't have luck getting Neoclipse to work. Thanks, Todd ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo] JTA Classes
Hello, Sun's website is down. Not sure, maybe Oracle isn't paying the bill. Anyway, can someone please email me the JTA classes. I used Maven to download Neo / APOC, but no JTA in the repositories. Thanks, -Todd ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo] JTA Classes
Thanks Andreas. Worked like a charm. Does anyone have any sample code that does larger graphs? Like 100M or 1B nodes? Thanks, Todd On Fri, Sep 4, 2009 at 9:47 AM, Andreas Kolleggerakolleg...@tembopublic.org wrote: Add this to your pom: dependency groupIdorg.apache.geronimo.specs/groupId artifactIdgeronimo-jta_1.1_spec/artifactId version1.1.1/version /dependency On Sep 4, 2009, at 9:41 AM, Todd Stavish wrote: Hello, Sun's website is down. Not sure, maybe Oracle isn't paying the bill. Anyway, can someone please email me the JTA classes. I used Maven to download Neo / APOC, but no JTA in the repositories. Thanks, -Todd ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo] JTA Classes
I am writing a prototype to link the relationships between people based on cell call records. I was hoping someone had a large graph sample that dynamically generated 100M nodes \ people. Even if it was something entirely different like a massive social graph ala linkin \ facebook, I could just add in the phone number property and my own traversal code. -Todd On Fri, Sep 4, 2009 at 10:42 AM, Dan Heaverdan.hea...@peepwl.com wrote: Todd, what are you trying to achieve? lots of us have large graphs and code that works with them. can you be more specific? Dan On Fri, Sep 4, 2009 at 3:40 PM, Todd Stavish toddstav...@gmail.com wrote: Thanks Andreas. Worked like a charm. Does anyone have any sample code that does larger graphs? Like 100M or 1B nodes? Thanks, Todd On Fri, Sep 4, 2009 at 9:47 AM, Andreas Kolleggerakolleg...@tembopublic.org wrote: Add this to your pom: dependency groupIdorg.apache.geronimo.specs/groupId artifactIdgeronimo-jta_1.1_spec/artifactId version1.1.1/version /dependency On Sep 4, 2009, at 9:41 AM, Todd Stavish wrote: Hello, Sun's website is down. Not sure, maybe Oracle isn't paying the bill. Anyway, can someone please email me the JTA classes. I used Maven to download Neo / APOC, but no JTA in the repositories. Thanks, -Todd ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo] getReferenceNode
How do you set a reference node? Or create a root node? Is the examples.NeoclipseExample package published somewhere? Thanks, Todd ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo] getReferenceNode
Cool. Thanks guys, I have it know. Have you given thought to just having a global persistent hash map to find root objects? That way, you could have several root objects that were easily retrievable, and then you could start your navigation / traversal from there. Thanks again, Todd On Fri, Sep 4, 2009 at 6:25 PM, Anders Nawroth and...@neotechnology.com wrote: Hi! Just one small addition to this: don't assume that the reference node will always have an id of 0. To check if a node is the reference node, use the equals() method to compare the nodes! /anders Dan Heaver: Todd, the reference node is node 0 It's there even if you have an empty graph. You don't set it it's just there from the start... Dan On 4 Sep 2009, at 23:00, Todd Stavish toddstav...@gmail.com wrote: How do you set a reference node? Or create a root node? Is the examples.NeoclipseExample package published somewhere? Thanks, Todd ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Anders Nawroth [and...@neotechnology.com] GTalk, Skype: anders.nawroth Phone: +46 737 894 163 http://twitter.com/nawroth http://blog.nawroth.com/ ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user