[Neo] Can Neo4j read and process a rdf file?
Hi guys, I'm just wondering whether Neo has a utility to read in the contents of an rdf file. Jena has this functionality InputStream in = FileManager.*get*().open( filename); *this*.model.read(in, *null*); in.close(); but does Neo4j has this. It will be cool if one can read in an rdf data file and perform some node-type query and processing. -- Francis ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo] Checking whether a relationship exists between two nodes...
2010/2/2 Maria Giatsoglou mgiat...@csd.auth.gr: Hello all I am creating a project that performs a number of benchmark tasks on Neo. One of the tests measures the required time for creating a relationship between two neo nodes A and B. However, before creating the relationship, it should firs be checked whether a relationship of the same type already exists between these two nodes. My current implementation calls the getRelationships() function for the A node and then iterates over the returned Iterable object checking whether a relationship's end node is equal to node B. If such a relationship does not exist, then the required relationship is created between nodes A and B. Yep that's a very common scenario, however exposing that as a method in the API could potentially hide performance pitfalls if a node has several millions of relationships on it, or similar. However, this technique seems to be very slow, with the creation of a relationship (including the check operation) taking around 57msec to complete. Is there a faster way to implement this operation? I considered trying to modify the LuceneIndexService implementation in order to enable indexing relationships apart from nodes. Do you recommend such an approach for this problem? That's normally a very fast operation. Does your nodes have a very large amount of relationships on them? And also, are you including the time it takes to commit the transaction in those 57ms? Would it be ok if you could post a piece of your code which handles this? Many thanks in advance, Best regards, Maria Giatsoglou ___ 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
Re: [Neo] Can Neo4j read and process a rdf file?
You'll need to take a look at exposing Neo4j as an RDF store, a SAIL rather. So take a look at: http://components.neo4j.org/neo4j-rdf/ http://components.neo4j.org/neo4j-rdf-sail/ Those sites have slightly outdated examples, but will get fixed during the day! So then when you have your Neo4j SAIL instance you could use already existing tools (like RIO, http://www.openrdf.org/doc/rio/api/) to import such RDF data from file. 2010/2/3 francis adediran adedi...@gmail.com: Hi guys, I'm just wondering whether Neo has a utility to read in the contents of an rdf file. Jena has this functionality InputStream in = FileManager.*get*().open( filename); *this*.model.read(in, *null*); in.close(); but does Neo4j has this. It will be cool if one can read in an rdf data file and perform some node-type query and processing. -- Francis ___ 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
Re: [Neo] Neo In The Wild - Vizatweet
Thanks for all the comments so far and please feel free to share/tweet/link/slashdot/digg/whatever you want with the link. I do welcome feedback. Part of the reason I posted this in a pretty early release state is because I want to see how people will use something like this and what features would be most useful. I tried to stick with thejit because it was javascript, but that seems to make a non-ideal experience on IE. If I keep running into roadblocks with IE, I may have to switch to flash and use flare. Matt On Tue, Feb 2, 2010 at 2:30 PM, Mattias Persson matt...@neotechnology.comwrote: Looks really cool! If you're in a state where you're ready for feedback: I noticed that sometimes the texts gets a little displaced from the graph thought. 2010/2/2 Peter Neubauer peter.neuba...@neotechnology.com: Wohow, cool! The service is down but I got some searches going. Let us know when it is up again, together with your twitter name, so I can slashdot it ;) 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://gremlin.tinkerpop.com- The terminal to the Giant Global Graph. On Tue, Feb 2, 2010 at 8:10 PM, Matt Johnston m...@lattaoutdoors.com wrote: I just posted a simple app I've been working on. The app lets you search twitter and then displays the relationships between the tweets, popular users and popular words. Everything is stored in Neo and I used thejit javascript library for the display. Check it out. http://www.vizatweet.com/ Matt ___ 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
Re: [Neo] Neo In The Wild - Vizatweet
Each report is a node that connects to a common parent container node. Essentially creating sub-graphs for each report. The dataset is actually pretty small for each report. Since the maximum number of tweets that are being analyzed is 100, I would guesstimate that the total number of nodes would be less than 300 (100 users + 100 tweets + 100 popular words). But that is the maximum number and actually it would be less than that because the app only pulls common words amongst all 100 tweets, so the number of words would be smaller than that. Matt On Wed, Feb 3, 2010 at 8:48 AM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Matt, what is the size of the dataset you are sucking into Neo4j? Any strategy there? 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://gremlin.tinkerpop.com- The terminal to the Giant Global Graph. On Wed, Feb 3, 2010 at 3:42 PM, Matt Johnston m...@lattaoutdoors.com wrote: Thanks for all the comments so far and please feel free to share/tweet/link/slashdot/digg/whatever you want with the link. I do welcome feedback. Part of the reason I posted this in a pretty early release state is because I want to see how people will use something like this and what features would be most useful. I tried to stick with thejit because it was javascript, but that seems to make a non-ideal experience on IE. If I keep running into roadblocks with IE, I may have to switch to flash and use flare. Matt On Tue, Feb 2, 2010 at 2:30 PM, Mattias Persson matt...@neotechnology.comwrote: Looks really cool! If you're in a state where you're ready for feedback: I noticed that sometimes the texts gets a little displaced from the graph thought. 2010/2/2 Peter Neubauer peter.neuba...@neotechnology.com: Wohow, cool! The service is down but I got some searches going. Let us know when it is up again, together with your twitter name, so I can slashdot it ;) 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://gremlin.tinkerpop.com- The terminal to the Giant Global Graph. On Tue, Feb 2, 2010 at 8:10 PM, Matt Johnston m...@lattaoutdoors.com wrote: I just posted a simple app I've been working on. The app lets you search twitter and then displays the relationships between the tweets, popular users and popular words. Everything is stored in Neo and I used thejit javascript library for the display. Check it out. http://www.vizatweet.com/ Matt ___ 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 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] Neo In The Wild - Vizatweet
Would be awesome to test this with bigger amounts of data and do some more fancy stuff with it! Any plans going forward? 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://gremlin.tinkerpop.com- The terminal to the Giant Global Graph. On Wed, Feb 3, 2010 at 3:56 PM, Matt Johnston m...@lattaoutdoors.com wrote: Each report is a node that connects to a common parent container node. Essentially creating sub-graphs for each report. The dataset is actually pretty small for each report. Since the maximum number of tweets that are being analyzed is 100, I would guesstimate that the total number of nodes would be less than 300 (100 users + 100 tweets + 100 popular words). But that is the maximum number and actually it would be less than that because the app only pulls common words amongst all 100 tweets, so the number of words would be smaller than that. Matt On Wed, Feb 3, 2010 at 8:48 AM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Matt, what is the size of the dataset you are sucking into Neo4j? Any strategy there? 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://gremlin.tinkerpop.com - The terminal to the Giant Global Graph. On Wed, Feb 3, 2010 at 3:42 PM, Matt Johnston m...@lattaoutdoors.com wrote: Thanks for all the comments so far and please feel free to share/tweet/link/slashdot/digg/whatever you want with the link. I do welcome feedback. Part of the reason I posted this in a pretty early release state is because I want to see how people will use something like this and what features would be most useful. I tried to stick with thejit because it was javascript, but that seems to make a non-ideal experience on IE. If I keep running into roadblocks with IE, I may have to switch to flash and use flare. Matt On Tue, Feb 2, 2010 at 2:30 PM, Mattias Persson matt...@neotechnology.comwrote: Looks really cool! If you're in a state where you're ready for feedback: I noticed that sometimes the texts gets a little displaced from the graph thought. 2010/2/2 Peter Neubauer peter.neuba...@neotechnology.com: Wohow, cool! The service is down but I got some searches going. Let us know when it is up again, together with your twitter name, so I can slashdot it ;) 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://gremlin.tinkerpop.com - The terminal to the Giant Global Graph. On Tue, Feb 2, 2010 at 8:10 PM, Matt Johnston m...@lattaoutdoors.com wrote: I just posted a simple app I've been working on. The app lets you search twitter and then displays the relationships between the tweets, popular users and popular words. Everything is stored in Neo and I used thejit javascript library for the display. Check it out. http://www.vizatweet.com/ Matt ___ 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 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] Neo In The Wild - Vizatweet
Hi, Matt. I share your pain. We ended up back on Flex/Flash because we can provide a much more exciting and interactive user experience than we could with HTML 5 (at present). Just as important was that we didn't need to screw around with browser incompatibility issues which, by some of Google's estimates, consume 30-50% of the effort of developing web-based UIs. Would I love to see all of the capabilities of Flex/Flash (and Silverlight) as native browser capabilities? Sure, of course. But even if HTML 5 hits its stride, we're still a couple years away from broad based usage...even more so if you're developing apps for use behind the corporate firewall. -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Matt Johnston Sent: Wednesday, February 03, 2010 9:42 AM To: Neo user discussions Subject: Re: [Neo] Neo In The Wild - Vizatweet Thanks for all the comments so far and please feel free to share/tweet/link/slashdot/digg/whatever you want with the link. I do welcome feedback. Part of the reason I posted this in a pretty early release state is because I want to see how people will use something like this and what features would be most useful. I tried to stick with thejit because it was javascript, but that seems to make a non-ideal experience on IE. If I keep running into roadblocks with IE, I may have to switch to flash and use flare. Matt On Tue, Feb 2, 2010 at 2:30 PM, Mattias Persson matt...@neotechnology.comwrote: Looks really cool! If you're in a state where you're ready for feedback: I noticed that sometimes the texts gets a little displaced from the graph thought. 2010/2/2 Peter Neubauer peter.neuba...@neotechnology.com: Wohow, cool! The service is down but I got some searches going. Let us know when it is up again, together with your twitter name, so I can slashdot it ;) 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://gremlin.tinkerpop.com- The terminal to the Giant Global Graph. On Tue, Feb 2, 2010 at 8:10 PM, Matt Johnston m...@lattaoutdoors.com wrote: I just posted a simple app I've been working on. The app lets you search twitter and then displays the relationships between the tweets, popular users and popular words. Everything is stored in Neo and I used thejit javascript library for the display. Check it out. http://www.vizatweet.com/ Matt ___ 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 mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo] Neo Error - Block not inuse
Has anyone seen an error like this? Block not inuse[0] blockId[10931] Seems to be occurring attempting to commit an update to a node's properties. I ended up deleting and recreating the entire graph and it went away.but still curious to know what the cause might have been. Thanks, Rick ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo] Strange behavior when calling getSingleRelationship : More than one relationship[DynamicRelationshipType[profile], OUTGOING]
Here is a attached a video that shows a similar or the same problem. Calling getSingleRelationship results in a exception but after inspecting the variables call the relationships with that same type have the have the same relationship id. Does it make sense to have a two relationships of the same type attached to the same node with the same id? or is this a bug? 2010/2/3 Raul Raja Martinez raulr...@gmail.com: ...ThreadPoolTaskExecutor#7ec48b77-42 02/03 exception: class org.neo4j.api.core.NotFoundException : More than one relationship[DynamicRelationshipType[profile], OUTGOING] found for NodeImpl#56493... Strange behavior when calling getSingleRelationship This is a strange bug or some issue we're finding when running in separate threads. In some cases this exception is thrown even when the node has a single relationship after placing a debug point. In other cases after inspecting the node the is in fact two relationships of the same type pointing to the same end node but different node proxy instances. Has anybody seen anything similar? We assumed Nodes and their operations are thread safe so we have no particular synchronization around creating relationships. We have not been able to create a test case for this issue besides putting a debug point on that exception and let it run on thousands of records for a while with operations managed by a thread-pool. -- Raul Raja ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo] Neo Error - Block not inuse
Rick, Johan is sick today, but will take a look at this asap. Can you reproduce this in any way? 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://gremlin.tinkerpop.com- The terminal to the Giant Global Graph. On Wed, Feb 3, 2010 at 7:29 PM, Rick Bullotta rick.bullo...@burningskysoftware.com wrote: Has anyone seen an error like this? Block not inuse[0] blockId[10931] Seems to be occurring attempting to commit an update to a node's properties. I ended up deleting and recreating the entire graph and it went away.but still curious to know what the cause might have been. Thanks, Rick ___ 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] Strange behavior when calling getSingleRelationship : More than one relationship[DynamicRelationshipType[profile], OUTGOING]
Raul, the video did not make it through to the mailing list, can you send it off-list directly to me? Then we can take a look at this tomorrow first thing! 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://gremlin.tinkerpop.com- The terminal to the Giant Global Graph. On Thu, Feb 4, 2010 at 12:18 AM, Raul Raja Martinez raulr...@gmail.com wrote: Here is a attached a video that shows a similar or the same problem. Calling getSingleRelationship results in a exception but after inspecting the variables call the relationships with that same type have the have the same relationship id. Does it make sense to have a two relationships of the same type attached to the same node with the same id? or is this a bug? 2010/2/3 Raul Raja Martinez raulr...@gmail.com: ...ThreadPoolTaskExecutor#7ec48b77-42 02/03 exception: class org.neo4j.api.core.NotFoundException : More than one relationship[DynamicRelationshipType[profile], OUTGOING] found for NodeImpl#56493... Strange behavior when calling getSingleRelationship This is a strange bug or some issue we're finding when running in separate threads. In some cases this exception is thrown even when the node has a single relationship after placing a debug point. In other cases after inspecting the node the is in fact two relationships of the same type pointing to the same end node but different node proxy instances. Has anybody seen anything similar? We assumed Nodes and their operations are thread safe so we have no particular synchronization around creating relationships. We have not been able to create a test case for this issue besides putting a debug point on that exception and let it run on thousands of records for a while with operations managed by a thread-pool. -- Raul Raja ___ 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
Re: [Neo] Strange behavior when calling getSingleRelationship : More than one relationship[DynamicRelationshipType[profile], OUTGOING]
Hi Raul, Thanks for spotting this bug, not many people have. This is a cache bug that was found and fixed a while back (10 days or so). There has not been a new release since then, so if you are not running on the version from trunk that would explain it. If however you are running on the version in trunk that would mean that there are other causes of this problem that we have not found yet. So I guess my followup question to you is: Which version of Neo4j are you running? The video you sent is still interesting (you don't have to send it to me) I'll watch it with Peter when he gets into the office this morning. To answer another question you had: yes, it does make sense to be able to have multiple relationships of the same type with the same source node and target node, in the case of this bug however you end up with two copies (in the in-memory cache, not on disk) of the exact same relationship. Cheers, Tobias On Thu, Feb 4, 2010 at 12:18 AM, Raul Raja Martinez raulr...@gmail.comwrote: Here is a attached a video that shows a similar or the same problem. Calling getSingleRelationship results in a exception but after inspecting the variables call the relationships with that same type have the have the same relationship id. Does it make sense to have a two relationships of the same type attached to the same node with the same id? or is this a bug? 2010/2/3 Raul Raja Martinez raulr...@gmail.com: ...ThreadPoolTaskExecutor#7ec48b77-42 02/03 exception: class org.neo4j.api.core.NotFoundException : More than one relationship[DynamicRelationshipType[profile], OUTGOING] found for NodeImpl#56493... Strange behavior when calling getSingleRelationship This is a strange bug or some issue we're finding when running in separate threads. In some cases this exception is thrown even when the node has a single relationship after placing a debug point. In other cases after inspecting the node the is in fact two relationships of the same type pointing to the same end node but different node proxy instances. Has anybody seen anything similar? We assumed Nodes and their operations are thread safe so we have no particular synchronization around creating relationships. We have not been able to create a test case for this issue besides putting a debug point on that exception and let it run on thousands of records for a while with operations managed by a thread-pool. -- Raul Raja ___ Neo 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 ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user