[Neo4j] Social Networks And Graph Databases
Hi, I am new to graph databases. I and my friends decided to make simple social network and i am researching about graph databases and other nosql databases. I like the idea of graph db and i want to use them but i have questions. My question is if i decided to use graph database am i need another database system like mysql or ms sql, There are a lot of social networks which are using graph,other nosql databases and relational databases together. Can i hold all my data in graph database. For example my users login data, such as email, password, user roles,pictures etc. Sincerely ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Social Networks And Graph Databases
Hi Fatih Yes, a graph database can be a complete replacement, holding your user's login data, profiles, pictures, etc. If you're using JRuby, there's a gem that interacts with the excellent devise authentication system. For photos and certain other media, it probably makes more sense to store them on a Content Delivery Network (CDN) with references to them (and their metadata) only in your graph database. You can certainly mix and match databases and I think that's the future of web applications. But if you're starting from scratch I'd suggest putting everything into the graph database. For pictures, I'd consider Amazon's S3 from the get go, and you can later migrate to CloudFront if necessary. Would love to hear alternate views. Stephen 2011/2/20 Fatih ÖZKAN zi...@hotmail.com Hi, I am new to graph databases. I and my friends decided to make simple social network and i am researching about graph databases and other nosql databases. I like the idea of graph db and i want to use them but i have questions. My question is if i decided to use graph database am i need another database system like mysql or ms sql, There are a lot of social networks which are using graph,other nosql databases and relational databases together. Can i hold all my data in graph database. For example my users login data, such as email, password, user roles,pictures etc. Sincerely ___ 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] Traversal Framework question
Dear all, could somebody point me to more documentation on the new traversal framework (besides http://wiki.neo4j.org/content/Traversal_Framework)? Also the new Evaluator and how to use it? If we have a graph described in the pipes Co-Developers example (https://github.com/tinkerpop/pipes/wiki/Using-Pipes-to-Traverse-Graphs). Would this traversal return the co-developers? Traversal.description() .depthFirst() .relationships(RelationshipTypes.CREATED, Direction.OUTGOING) .relationships(RelationshipTypes.CREATED, Direction.INCOMING) .traverse(developer).nodes() Thanks, Alfredas ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Social Networks And Graph Databases
Hi Stephen I am seriously considering to build my application on graph database but i read about facebook, digg and linkedin use Key/value database. Why dont they use graph database? What is the differences between Key/Value and graph databases. And i am using .Net Framework 4.0 for my application. There is not too much thing about .Net, tutorial,samples etc. There are some library for .net ,Neo4RestNet,Neo4jRestSharp. Which one should i use and can i develop strong application with this library? Fatih -Özgün İleti- From: Stephen Cremin Sent: Sunday, February 20, 2011 11:17 AM To: Neo4j user discussions Subject: Re: [Neo4j] Social Networks And Graph Databases Hi Fatih Yes, a graph database can be a complete replacement, holding your user's login data, profiles, pictures, etc. If you're using JRuby, there's a gem that interacts with the excellent devise authentication system. For photos and certain other media, it probably makes more sense to store them on a Content Delivery Network (CDN) with references to them (and their metadata) only in your graph database. You can certainly mix and match databases and I think that's the future of web applications. But if you're starting from scratch I'd suggest putting everything into the graph database. For pictures, I'd consider Amazon's S3 from the get go, and you can later migrate to CloudFront if necessary. Would love to hear alternate views. Stephen 2011/2/20 Fatih ÖZKAN zi...@hotmail.com Hi, I am new to graph databases. I and my friends decided to make simple social network and i am researching about graph databases and other nosql databases. I like the idea of graph db and i want to use them but i have questions. My question is if i decided to use graph database am i need another database system like mysql or ms sql, There are a lot of social networks which are using graph,other nosql databases and relational databases together. Can i hold all my data in graph database. For example my users login data, such as email, password, user roles,pictures etc. Sincerely ___ 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] Traversal Framework question
On Sun, Feb 20, 2011 at 10:48 AM, Alfredas Chmieliauskas al.fre...@gmail.com wrote: Dear all, could somebody point me to more documentation on the new traversal framework (besides http://wiki.neo4j.org/content/Traversal_Framework)? Also the new Evaluator and how to use it? That page, along with the examples pages is the best there is: * http://components.neo4j.org/neo4j-examples/snapshot/traversal.html * http://wiki.neo4j.org/content/Traversal_HowTo If we have a graph described in the pipes Co-Developers example (https://github.com/tinkerpop/pipes/wiki/Using-Pipes-to-Traverse-Graphs). Would this traversal return the co-developers? Traversal.description() .depthFirst() .relationships(RelationshipTypes.CREATED, Direction.OUTGOING) .relationships(RelationshipTypes.CREATED, Direction.INCOMING) .traverse(developer).nodes() No, unfortunately it wouldn't. Relationship type specifications in TraversalDescriptions are not ordered, what you have written is just a different spelling of: Traversal.description() .depthFirst() .relationships(RelationshipTypes.CREATED, Direction.BOTH) .traverse(developer).nodes() Cheers, -- 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] Traversal Framework question
Thanks. On Sun, Feb 20, 2011 at 2:24 PM, Tobias Ivarsson tobias.ivars...@neotechnology.com wrote: On Sun, Feb 20, 2011 at 10:48 AM, Alfredas Chmieliauskas al.fre...@gmail.com wrote: Dear all, could somebody point me to more documentation on the new traversal framework (besides http://wiki.neo4j.org/content/Traversal_Framework)? Also the new Evaluator and how to use it? That page, along with the examples pages is the best there is: * http://components.neo4j.org/neo4j-examples/snapshot/traversal.html * http://wiki.neo4j.org/content/Traversal_HowTo I think that some of the examples are deprecated in the new release. If we have a graph described in the pipes Co-Developers example (https://github.com/tinkerpop/pipes/wiki/Using-Pipes-to-Traverse-Graphs). Would this traversal return the co-developers? Traversal.description() .depthFirst() .relationships(RelationshipTypes.CREATED, Direction.OUTGOING) .relationships(RelationshipTypes.CREATED, Direction.INCOMING) .traverse(developer).nodes() No, unfortunately it wouldn't. Relationship type specifications in TraversalDescriptions are not ordered, what you have written is just a different spelling of: Traversal.description() .depthFirst() .relationships(RelationshipTypes.CREATED, Direction.BOTH) .traverse(developer).nodes() So this would be one way of finding co-developers using traversal: Traversal.description() .depthFirst() .relationships(RelationshipTypes.CREATED) .evaluator(new Evaluator() { @Override public Evaluation evaluate(Path path) { if (path.length() 1) { // co-developer return Evaluation.INCLUDE_AND_CONTINUE; } else { // project return Evaluation.EXCLUDE_AND_CONTINUE; } } }); I can imagine a few more ways to do that. I wonder if there are any guidelines on whats the better way to do it (performance considerations). Alfredas ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] Spring data and Pipes
Dear all, I'm trying to combine spring data with tinkerpop pipes. This is the way I'm trying to get a Blueprints graph from a GraphDatabaseService injected by spring. Graph graph = new Neo4jGraph(this.getGraphDatabaseContext().getGraphDatabaseService()); But this gives me an exception: Exception in thread main java.lang.NullPointerException at com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jGraph.loadIndices(Neo4jGraph.java:76) at com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jGraph.init(Neo4jGraph.java:69) Everything else in the spring-data domain works. Any ideas? Alfredas ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Traversal Framework question
Hi, Traversal.description() .depthFirst() .relationships(RelationshipTypes.CREATED, Direction.BOTH) .traverse(developer).nodes() To be clear, a co-creator is someone is who has created the same things as you and who is not you. Thus, you need to go outgoing CREATED, then incoming CREATED, then you need to make sure that the vertex you land at is not the one you left from -- thus, you need to filter the originating vertex. See ya, Marko. http://markorodriguez.com ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Online backup works in full but not incremental
On Sun, Feb 20, 2011 at 6:11 PM, Brendan ccp...@gmail.com wrote: Hi, After I install the neo4j on ubuntu server I'm able to backup the full database, even repeatedly but it crashed on incremental. Could you please provide a stacktrace, and other kinds of error output from this crash. Thank you, -- 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] Spring data and Pipes
Hi, But this gives me an exception: Exception in thread main java.lang.NullPointerException at com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jGraph.loadIndices(Neo4jGraph.java:76) at com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jGraph.init(Neo4jGraph.java:69) Everything else in the spring-data domain works. Any ideas? This is because there is a bug in Blueprints 0.4 regarding Neo4j indices and Blueprints. Blueprints 0.5-SNAPSHOT currently has this fixed if you want to try that. dependency groupIdcom.tinkerpop/groupId artifactIdblueprints/artifactId version0.5-SNAPSHOT/version /dependency However, note that Blueprints 0.5-SNAPSHOT has a slightly different Index API (Index, AutomaticIndex) than 0.4, so be vigilant. https://github.com/tinkerpop/blueprints/tree/master/src/main/java/com/tinkerpop/blueprints/pgm TinkerPop plans to release Blueprints 0.5 next week sometime (hopefully). If you care -- the reason it throws a NullPointerException is because Blueprints checks for Blueprints-related index metadata on the Neo4j index. If you create your indices with Blueprints, then there is no problem. If you create your indices with Neo4j and then go to using Blueprints, Blueprints goes ah?! There is no metadata on this index---let me be dumb and not check on null. :) ... As stated previously, Blueprints 0.5-SNAPSHOT handles the null with grace and behaves appropriately. Hope that helps, Marko. http://markorodriguez.com ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Traversal Framework question
On Sun, Feb 20, 2011 at 7:04 PM, Marko Rodriguez okramma...@gmail.comwrote: Hi, Traversal.description() .depthFirst() .relationships(RelationshipTypes.CREATED, Direction.BOTH) .traverse(developer).nodes() To be clear, a co-creator is someone is who has created the same things as you and who is not you. Thus, you need to go outgoing CREATED, then incoming CREATED, then you need to make sure that the vertex you land at is not the one you left from -- thus, you need to filter the originating vertex. The easiest way to do that in this case is by adding: .uniqueness(Uniqueness.NODE_PATH) Cheers, -- 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] Traversal Framework question
Hi, Just to be picky: The easiest way to do that in this case is by adding: .uniqueness(Uniqueness.NODE_PATH) A co-creator's co-creator can be you. Thus, marko's co-creator's co-creator is marko (amongst other people). In this case, unique on a path would not fail, no? Can you do something like .filter(from two steps ago)? Thanks, Marko. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Spring data and Pipes
Updated to 0.5-SNAPSHOT. Works. Great! On a more abstract topic - I'm wondering it there's a good way to use your domain objects in Pipes instead of vertices and edges? So far I've just created a new PipeVertex, T that converts the vertices to your domain object by referring to node id. What would be a better way? Alfredas On Sun, Feb 20, 2011 at 7:09 PM, Marko Rodriguez okramma...@gmail.com wrote: Hi, But this gives me an exception: Exception in thread main java.lang.NullPointerException at com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jGraph.loadIndices(Neo4jGraph.java:76) at com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jGraph.init(Neo4jGraph.java:69) Everything else in the spring-data domain works. Any ideas? This is because there is a bug in Blueprints 0.4 regarding Neo4j indices and Blueprints. Blueprints 0.5-SNAPSHOT currently has this fixed if you want to try that. dependency groupIdcom.tinkerpop/groupId artifactIdblueprints/artifactId version0.5-SNAPSHOT/version /dependency However, note that Blueprints 0.5-SNAPSHOT has a slightly different Index API (Index, AutomaticIndex) than 0.4, so be vigilant. https://github.com/tinkerpop/blueprints/tree/master/src/main/java/com/tinkerpop/blueprints/pgm TinkerPop plans to release Blueprints 0.5 next week sometime (hopefully). If you care -- the reason it throws a NullPointerException is because Blueprints checks for Blueprints-related index metadata on the Neo4j index. If you create your indices with Blueprints, then there is no problem. If you create your indices with Neo4j and then go to using Blueprints, Blueprints goes ah?! There is no metadata on this index---let me be dumb and not check on null. :) ... As stated previously, Blueprints 0.5-SNAPSHOT handles the null with grace and behaves appropriately. Hope that helps, Marko. http://markorodriguez.com ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Traversal Framework question
Marko, I don't understand what you are trying to say. Is the question about finding, given a person node, the co-creators for that person on any project? Or is it about reasoning in the abstract co-creator graph. I was under the impression that finding co-creators was the only thing we were interested in, in that case path-uniqueness will do the trick. What node-path-uniqueness guarantees is that within each path the same node occurs at most once. In a path from a creator to her co-creator that would mean that the creator cannot be her own co-creator. If the starting person has created both x and y, the path through x and the path through y will be different paths, which means that the path uniqueness will allow the same persons to be co-creator on both projects. Path uniqueness would get you into problem if person A created person B and person B (who was created) was also a creator of herself, then person B would not be discovered as a co-creator. I cannot imagine a case where that would be sensible. It is also impossible to store in Neo4j, since self-relationships are not allowed. You can do something like .filter(from two steps ago) by looking two steps back in the path of what you've traversed so far in the evaluator. I fear that if we continue further on the path where this discussion is currently headed, it will become too theoretical to be of use to anyone. Let's keep such discussions isolated. Cheers, Tobias On Sun, Feb 20, 2011 at 7:14 PM, Marko Rodriguez okramma...@gmail.comwrote: Hi, Just to be picky: The easiest way to do that in this case is by adding: .uniqueness(Uniqueness.NODE_PATH) A co-creator's co-creator can be you. Thus, marko's co-creator's co-creator is marko (amongst other people). In this case, unique on a path would not fail, no? Can you do something like .filter(from two steps ago)? Thanks, Marko. ___ 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] Spring data and Pipes
Hi, Updated to 0.5-SNAPSHOT. Works. Great! Excellent. (Again: note that IndexableGraph and AutomaticIndex are slightly different in 0.5 than 0.4). On a more abstract topic - I'm wondering it there's a good way to use your domain objects in Pipes instead of vertices and edges? So far I've just created a new PipeVertex, T that converts the vertices to your domain object by referring to node id. The trick to Pipes is to build more abstract relations with lower-level pipes. So yes, you want to go from 'graph speak' of edges, vertex, etc. to 'domain speak' of people, companies, etc. --- for example, MyDomainSpecificFriendRecommendationPipePerson,MapPerson,Integer. See slide 117 here: http://www.slideshare.net/slidarko/memoirs-of-a-graph-addict-despair-to-redemption Finally, see slide 116 in the same slideshow. All you have to do is overwrite AbstractPipe.processNextStarts() and you can map from any type to any other type. Hope that answers your question. Take care, Marko. http://markorodriguez.com ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Spring data and Pipes
On Sun, Feb 20, 2011 at 7:43 PM, Marko Rodriguez okramma...@gmail.com wrote: Hi, Updated to 0.5-SNAPSHOT. Works. Great! Excellent. (Again: note that IndexableGraph and AutomaticIndex are slightly different in 0.5 than 0.4). On a more abstract topic - I'm wondering it there's a good way to use your domain objects in Pipes instead of vertices and edges? So far I've just created a new PipeVertex, T that converts the vertices to your domain object by referring to node id. The trick to Pipes is to build more abstract relations with lower-level pipes. So yes, you want to go from 'graph speak' of edges, vertex, etc. to 'domain speak' of people, companies, etc. --- for example, MyDomainSpecificFriendRecommendationPipePerson,MapPerson,Integer. See slide 117 here: Thats exactly what I did. class MappingPipe extends AbstractPipeVertex, T implements PipeVertex, T { @Override protected T processNextStart() throws NoSuchElementException { Vertex v = this.starts.next(); return findById((Long) v.getId()); } } I'm just not sure if findById((Long) v.getId()); is the best way to map. findById is provided by NodeFinder of spring data. http://www.slideshare.net/slidarko/memoirs-of-a-graph-addict-despair-to-redemption I know that presentation! It still is one of the most comprehensive graph presentations out there. If someone asks me graphs... what? I usually send that link. Thanks :-) Finally, see slide 116 in the same slideshow. All you have to do is overwrite AbstractPipe.processNextStarts() and you can map from any type to any other type. Hope that answers your question. Take care, Marko. http://markorodriguez.com ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Spring data and Pipes
Hey, Thats exactly what I did. class MappingPipe extends AbstractPipeVertex, T implements PipeVertex, T { @Override protected T processNextStart() throws NoSuchElementException { Vertex v = this.starts.next(); return findById((Long) v.getId()); } } I'm just not sure if findById((Long) v.getId()); is the best way to map. findById is provided by NodeFinder of spring data. Hmm.. Sorry, I don't know anything about NodeFinder nor do I grock the Neo4j Spring work :(. I suppose someone else will have to help you there.. Sorry. Marko. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Spring data and Pipes
all finders map back to the underlying graph so it doesnt matter which one to use. one could still add a toVertex wrapper to your domain objects to have them be usable in tinkerpop what is the usecase you want to achieve with the combination of spring data graph and tinkerpop glad that spring data graph works well for you if you have any feedback or issues just ping me Michael Sent from my iBrick4 Am 20.02.2011 um 20:00 schrieb Marko Rodriguez okramma...@gmail.com: Hey, Thats exactly what I did. class MappingPipe extends AbstractPipeVertex, T implements PipeVertex, T { @Override protected T processNextStart() throws NoSuchElementException { Vertex v = this.starts.next(); return findById((Long) v.getId()); } } I'm just not sure if findById((Long) v.getId()); is the best way to map. findById is provided by NodeFinder of spring data. Hmm.. Sorry, I don't know anything about NodeFinder nor do I grock the Neo4j Spring work :(. I suppose someone else will have to help you there.. Sorry. Marko. ___ 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] Traversal Framework question
Hi there, I think something like returning all but the start node would do the trick in this special, see http://api.neo4j.org/1.2/org/neo4j/graphdb/ReturnableEvaluator.html#ALL_BUT_START_NODE or similar. More generally, if you want to see the history of things, you can examine the provided PATH in the evaluator (look 2 steps back and see if the node if the same as the current node, in that case do not return the path), http://api.neo4j.org/1.2/org/neo4j/graphdb/Path.html, or hold of course a state HashMap or other structure to compare against in order to exclude historic hit nodes. Would one of these approaches work to get the same effect as the Gremlin example? 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 Sun, Feb 20, 2011 at 7:14 PM, Marko Rodriguez okramma...@gmail.com wrote: Hi, Just to be picky: The easiest way to do that in this case is by adding: .uniqueness(Uniqueness.NODE_PATH) A co-creator's co-creator can be you. Thus, marko's co-creator's co-creator is marko (amongst other people). In this case, unique on a path would not fail, no? Can you do something like .filter(from two steps ago)? Thanks, Marko. ___ 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] Root Node
Hi, Silly question perhaps, but what is the purpose of the root node? Why would I want to get it? -Mark -- Mark Nijhof m: 0047 95 00 99 37 e: mark.nij...@cre8ivethought.com b: cre8ivethought.com/blog/index Walking on water and developing software from a specification are easy if both are frozen. -- Edward V Berard ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Spring data and Pipes
On Sun, Feb 20, 2011 at 8:20 PM, Michael Hunger michael.hun...@neotechnology.com wrote: all finders map back to the underlying graph so it doesnt matter which one to use. one could still add a toVertex wrapper to your domain objects to have them be usable in tinkerpop what is the usecase you want to achieve with the combination of spring data graph and tinkerpop So far I'm just experimenting with different ways query the graph :-) In the end I hope to build an AbstractRepositoryT class that would allow me to find things in the same underlying graph using TraversalDescriptions, Pipes, Gremlin or even SPARQL. Having that would add a lot of flexibility in writing domain methods. glad that spring data graph works well for you if you have any feedback or issues just ping me Yes. Spring data is very interesting. Although I am still trying to understand how to query a graph of heterogeneous nodes and relationships and discover patterns. A quick/trick question: I noticed that father.relateTo(child, RelationshipTypes.PARENT) works only if father has Direction.BOTH or Direction.OUTGOING; and @RelatedTo(type = PARENT, elementClass = Person.class, direction = Direction.INCOMING) private SetPerson children; father.relateTo(child, RelationshipTypes.PARENT); father.getChildren() would return empty in case of Direction.INCOMING this might be confusing! Thanks, Alfredas ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Root Node
One purpose of the reference not is that you don't have to rely on indexing for getting to certain nodes. If you connect your nodes to the reference node in a way that puts them in certain categories you can always get to them via traversal. Connections to the reference node are also used for visualization (e.g. for Neoclipse) HTH Michael From the docs of the method: Node getReferenceNode() Returns the reference node, which is a starting point in the node space. Usually, a client attaches relationships to this node that leads into various parts of the node space. For more information about common node space organizational patterns, see the design guide at http://wiki.neo4j.org/content/Design_Guide. Specifically: http://wiki.neo4j.org/content/Design_Guide#Subreferences Am 20.02.2011 um 21:19 schrieb Mark Nijhof: Hi, Silly question perhaps, but what is the purpose of the root node? Why would I want to get it? -Mark -- Mark Nijhof m: 0047 95 00 99 37 e: mark.nij...@cre8ivethought.com b: cre8ivethought.com/blog/index Walking on water and developing software from a specification are easy if both are frozen. -- Edward V Berard ___ 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] Spring data and Pipes
Alfredas, very interesting ideas. I think that kind of repository would have to be built in your application, _but_ we should provide the building blocks so that you can easily put it together. I'm thinking about providing support for Repositories in the Hades/Spring JPA style where you get a generic repository as base with additional finder-method-name parsing and whatever you add to that as a kind of custom extension gets exposed in your repo too. So if you're interested in this we can make this a use case for the M4 release of Spring-Data-Graph and experiment with that. I'm currently working on the Neo4jTemplate API for Spring-Data-Graph, if you (or anyone else) would like to look at that and provide feedback, I'd be happy. http://gist.github.com/835408 I think you spotted a least issue with the relateTo. Currently it assumes that you relate the father - OUTGOING - child. (Would you please try child.relateTo(father) for incoming rels and communicate the results). That is because it doesn't rely existing annotated relationships when doing that operation. I could extend it in looking for such annotated fields and use the values given there. But then you can also just add the child to the collection to create the relationship. Cheers Michael Am 20.02.2011 um 21:22 schrieb Alfredas Chmieliauskas: On Sun, Feb 20, 2011 at 8:20 PM, Michael Hunger michael.hun...@neotechnology.com wrote: all finders map back to the underlying graph so it doesnt matter which one to use. one could still add a toVertex wrapper to your domain objects to have them be usable in tinkerpop what is the usecase you want to achieve with the combination of spring data graph and tinkerpop So far I'm just experimenting with different ways query the graph :-) In the end I hope to build an AbstractRepositoryT class that would allow me to find things in the same underlying graph using TraversalDescriptions, Pipes, Gremlin or even SPARQL. Having that would add a lot of flexibility in writing domain methods. glad that spring data graph works well for you if you have any feedback or issues just ping me Yes. Spring data is very interesting. Although I am still trying to understand how to query a graph of heterogeneous nodes and relationships and discover patterns. A quick/trick question: I noticed that father.relateTo(child, RelationshipTypes.PARENT) works only if father has Direction.BOTH or Direction.OUTGOING; and @RelatedTo(type = PARENT, elementClass = Person.class, direction = Direction.INCOMING) private SetPerson children; father.relateTo(child, RelationshipTypes.PARENT); father.getChildren() would return empty in case of Direction.INCOMING this might be confusing! Thanks, Alfredas ___ 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] Root Node
Ah right, so I could connect via a relationship my type nodes to this reference node (atm I was using an index to get to them). -Mark On 20. feb. 2011, at 22:24, Michael Hunger michael.hun...@neotechnology.com wrote: One purpose of the reference not is that you don't have to rely on indexing for getting to certain nodes. If you connect your nodes to the reference node in a way that puts them in certain categories you can always get to them via traversal. Connections to the reference node are also used for visualization (e.g. for Neoclipse) HTH Michael From the docs of the method: Node getReferenceNode() Returns the reference node, which is a starting point in the node space. Usually, a client attaches relationships to this node that leads into various parts of the node space. For more information about common node space organizational patterns, see the design guide at http://wiki.neo4j.org/content/Design_Guide. Specifically: http://wiki.neo4j.org/content/Design_Guide#Subreferences Am 20.02.2011 um 21:19 schrieb Mark Nijhof: Hi, Silly question perhaps, but what is the purpose of the root node? Why would I want to get it? -Mark -- Mark Nijhof m: 0047 95 00 99 37 e: mark.nij...@cre8ivethought.com b: cre8ivethought.com/blog/index Walking on water and developing software from a specification are easy if both are frozen. -- Edward V Berard ___ 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] Neo4j rest server indexing
On Fri, Feb 18, 2011 at 12:42, francoisk6 francois_...@hotmail.com wrote: [...] is there an example to use fulltext search On Saturday, 19 February 2011 at 6:08 AM, Maximilian Schulz wrote: Hi Francois, [...] I will write a brief post about it and add the source code as well. I could do it later… or maybe someone else already did it. Max +1 ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Root Node
Yep. Just think in graph index :) Michael Am 20.02.2011 um 22:26 schrieb Mark Nijhof: Ah right, so I could connect via a relationship my type nodes to this reference node (atm I was using an index to get to them). -Mark On 20. feb. 2011, at 22:24, Michael Hunger michael.hun...@neotechnology.com wrote: One purpose of the reference not is that you don't have to rely on indexing for getting to certain nodes. If you connect your nodes to the reference node in a way that puts them in certain categories you can always get to them via traversal. Connections to the reference node are also used for visualization (e.g. for Neoclipse) HTH Michael From the docs of the method: Node getReferenceNode() Returns the reference node, which is a starting point in the node space. Usually, a client attaches relationships to this node that leads into various parts of the node space. For more information about common node space organizational patterns, see the design guide at http://wiki.neo4j.org/content/Design_Guide. Specifically: http://wiki.neo4j.org/content/Design_Guide#Subreferences Am 20.02.2011 um 21:19 schrieb Mark Nijhof: Hi, Silly question perhaps, but what is the purpose of the root node? Why would I want to get it? -Mark -- Mark Nijhof m: 0047 95 00 99 37 e: mark.nij...@cre8ivethought.com b: cre8ivethought.com/blog/index Walking on water and developing software from a specification are easy if both are frozen. -- Edward V Berard ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Social Networks And Graph Databases
While I like what I have seen so far of neo4j and plan to make use of it, I still have questions regarding its scalability credentials. At the moment I'm using riak and cassandra because they bring different things to the table but I know I can easily expand just by adding extra an extra box as I grow. Adding an extra box gives me sharding and extra capacity out of the box. With both of these they dont have a single point of failure. With neo4j in order to get sharding and extra capacity, it seems you have to make use of an additional set of infrastructure (zookeeper) and something like hdfs and even then you still seem to have the whole 'master' single point of failure thing. I suspect also that there would be still a point beyond which it could not grow. If you take it to the extreme case, could neo4j handle say Facebook scale ? If there was a graph db that gave me the ease of scaling qualities of say riak or cassandra but the graph access semantics of neo4j (and was at the start anyway, open source hehe ) then I'd be a happy bunny. From what I've been able to research on the web so far, it loks to be a bit of a complex problem to solve. JT. On Sun, Feb 20, 2011 at 1:29 PM, Jim Webber j...@neotechnology.com wrote: Hi Fatih, Most social networks currently support relatively shallow graphs - friend-of-a-friend and follow for instance. In those situations, it's an OK solution to have information in your stored documents/values/columns that tells indicates that shallow relation. At runtime, the application software that binds to the database creates the graph by following these logical clues. Since the graphs are shallow, it can work but it bakes in a very specific graph topology into your database and application layer which implies tight coupling. FlockDB from Twitter I think exemplifies this - a very specific use case for shallow graphs that suits Twitter really well. A graph database takes a different approach: it stores graphs of any depth in a way that doesn't compromise flexibility or performance, nor does it imply a tight coupling. For example, I might start off an e-commerce application with just people and relationships to items they have bought. Then over time I can add functionality to perform recommendations by looking for specific patterns in a graph. E.g. people who we think are young fathers (they buy nappies and they buy beer) often buy games consoles - it's now easy to look for that pattern in the graph to see possible customers who fall into the young father category and who haven't yet bought a games console and recommend that they buy one. This is am emergent property of graphs. Store all the relations you like in Neo4j and perhaps later on you'll be able to do some graph analysis to extract useful business information that you can't even think of today. If you go down the KV store path for this, you will design your graph far too early and lose the ability to do arbitrary business intelligence on your data. That's why graphs are cool - they allow you to defer such decisions to a more responsible moment. Jim ___ 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] Social Networks And Graph Databases
Hi JT, The default way of scaling Neo4j is to use the an HA cluster and route requests (via some domain-specific strategy) to specific instances to ensure that caches stay warm (that is cache sharding). So scaling for Neo4j is a function of having enough RAM to comfortably hold the working data set, and if necessary creating rules to logically partition interactions with that data set so that warm caches are normal. I've written this up, and as soon as I can add diagrams I'll post it to the Neo4j blog later this week. Jim ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Social Networks And Graph Databases
Ok cool, I look forward to reading it :) One thing, when you say route requests to specific instances .. does that imply that node relationships can't span instances ? e.g. say if node 1 and was connected (at depth 1 or deeper) to a node that was stored in another instance would the neo4j path/traversal api work across the split ? On Sun, Feb 20, 2011 at 11:48 PM, Jim Webber j...@neotechnology.com wrote: Hi JT, The default way of scaling Neo4j is to use the an HA cluster and route requests (via some domain-specific strategy) to specific instances to ensure that caches stay warm (that is cache sharding). So scaling for Neo4j is a function of having enough RAM to comfortably hold the working data set, and if necessary creating rules to logically partition interactions with that data set so that warm caches are normal. I've written this up, and as soon as I can add diagrams I'll post it to the Neo4j blog later this week. Jim ___ 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] Social Networks And Graph Databases
Hello JT, One thing, when you say route requests to specific instances .. does that imply that node relationships can't span instances ? Yes that's right. What I'm suggesting here is that each instance is a full replica that works on a subset of requests which are likely to keep the caches warm. So if you can split your requests (e.g all customers beginning with A go to instance 1 ... all customers beginning with Z go to instance 26), they will benefit from having warm caches for reading, while the HA infrastructure deals with updates across instances transactionally. Jim ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Online backup works in full but not incremental
Tobias, Here s the stack trace and part of the wrapper.log: run: Mon Feb 21 10:28:59 CST 2011: Client connected to 192.168.1.101:6362 Mon Feb 21 10:29:00 CST 2011: Opened a new channel to /192.168.1.101:6362 21-Feb-2011 10:29:20 itags.Sync.SyncData main SEVERE: null org.neo4j.com.ComException: org.neo4j.com.ComException: org.jboss.netty.handler.queue.BlockingReadTimeoutException at org.neo4j.com.Client.sendRequest(Client.java:183) at org.neo4j.com.backup.BackupClient.incrementalBackup(BackupClient.java:48) at org.neo4j.com.backup.OnlineBackup.incremental(OnlineBackup.java:115) at org.neo4j.com.backup.OnlineBackup.incremental(OnlineBackup.java:105) at itags.Sync.SyncData.RunningOnlineBackup(SyncData.java:57) at itags.Sync.SyncData.main(SyncData.java:247) Caused by: org.neo4j.com.ComException: org.jboss.netty.handler.queue.BlockingReadTimeoutException at org.neo4j.com.DechunkingChannelBuffer.readNext(DechunkingChannelBuffer.java:61) at org.neo4j.com.Client$2.readNext(Client.java:155) at org.neo4j.com.DechunkingChannelBuffer.readNextChunk(DechunkingChannelBuffer.java:79) at org.neo4j.com.DechunkingChannelBuffer.init(DechunkingChannelBuffer.java:50) at org.neo4j.com.Client$2.init(Client.java:151) at org.neo4j.com.Client.sendRequest(Client.java:150) ... 5 more Caused by: org.jboss.netty.handler.queue.BlockingReadTimeoutException at org.jboss.netty.handler.queue.BlockingReadHandler.readEvent(BlockingReadHandler.java:236) at org.jboss.netty.handler.queue.BlockingReadHandler.read(BlockingReadHandler.java:167) at org.neo4j.com.DechunkingChannelBuffer.readNext(DechunkingChannelBuffer.java:57) ... 10 more Do I miss any configuration? cheers, Brendan Date: Mon, 21 Feb 2011 01:11:19 +0800 From: Brendan ccp...@gmail.com Subject: [Neo4j] Online backup works in full but not incremental To: user@lists.neo4j.org user@lists.neo4j.org Message-ID: e837cb14-01f5-444b-ab96-6df17c41e...@gmail.com Content-Type: text/plain; charset=us-ascii Hi, After I install the neo4j on ubuntu server I'm able to backup the full database, even repeatedly but it crashed on incremental. I also fixed the problem with webadmin page loading but I found 2 issues: 1 the timeline graph can not be loaded on ie 8. 2 I experienced stack overflow on the webadmin page during the full online backup running. Also unresponsive in Save changes command issued from webadmin. I then tried webadmin from chrome and I saw the timeline graph but the add relationship panel loaded but not functional, can't enter the node I'd URL. Which browser is most compatible with webadmin? Your comment is highly appreciated! Brendan Sent from my iPad Date: Sun, 20 Feb 2011 19:07:02 +0100 From: Tobias Ivarsson tobias.ivars...@neotechnology.com Subject: Re: [Neo4j] Online backup works in full but not incremental To: Neo4j user discussions user@lists.neo4j.org Message-ID: AANLkTi=8uothpl9ptabewos_naqiz78pvusmnwvdo...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 On Sun, Feb 20, 2011 at 6:11 PM, Brendan ccp...@gmail.com wrote: Hi, After I install the neo4j on ubuntu server I'm able to backup the full database, even repeatedly but it crashed on incremental. Could you please provide a stacktrace, and other kinds of error output from this crash. Thank you, -- 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] Shortest Path Query with property filters
Thanks all for your help. I forgot to post my performance results like i was asked :) so here are some typical examples of them. I've run many tests, with different overlaying architectures, and different amounts of data on each node/edge, these are the performance stats for the latest build. (not all of them, jsut some that fit the trend, otherwise the list would be really long!) Path length | Mean time (ms) 2 | 25.6667 8 | 52.71428571 10 | 87.21875 12 | 109.9815951 14 | 163.9545455 I hope this helps you, it seems fairly typical of our data sets. Note: this runs about twice as fast as this if not more on an SSD :) Shae -- View this message in context: http://neo4j-user-list.438527.n3.nabble.com/Shortest-Path-Query-with-property-filters-tp2402322p2542823.html Sent from the Neo4J User List mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] Lucene fulltext index batch inserter Lock obtain problem
Hi guys, I'm trying to use a LuceneFulltextIndexBatchInserter to index all my data as I import it, so I can search on properties other than just an ID, but it fairly quickly (~5 seconds) comes back with an org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: NativeFSLock.write.lock exception. When searching I found a bug report that looked like this from late 2008 that said it was fixed, so maybe i'm doing something wrong, is this a fairly common error? I'm thinking that maybe my problem lies in the fact i'm indexing based on properties that may not exist on all nodes. eg. My graph is made of entities such as people and cars, a person has a first and last name, but does not have a registration number, and for a car it would be the reverse. Then using a regular FulltextIndex (not a batch one) it seems to run fine, but after a while i get a gc overhead limit exceeded error :( Any ideas? Shae -- View this message in context: http://neo4j-user-list.438527.n3.nabble.com/Neo4j-Lucene-fulltext-index-batch-inserter-Lock-obtain-problem-tp2542866p2542866.html Sent from the Neo4J User List mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] Neovigator Weekend Project
Guys, So I ran into the Ask Ken project ( http://askken.heroku.com/ ) by Michael Aufreiter yesterdat, and though it was pretty awesome... so I ported it to using Neo4j. Check it out: http://neovigator.heroku.com/ On github at https://github.com/maxdemarzi/neovigator Regards, Max ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Neo4j rest server indexing
Thx Max, I’ll appreciate if you provide the post link, it would be nice. - Regards, Francois Kassis. -- View this message in context: http://neo4j-user-list.438527.n3.nabble.com/Neo4j-rest-server-indexing-tp2526084p2543028.html Sent from the Neo4J User List mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] (no subject)
Matthieu Ardon ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Neovigator Weekend Project
Nice stuff! On Mon, Feb 21, 2011 at 6:18 AM, Max De Marzi Jr. maxdema...@gmail.comwrote: Guys, So I ran into the Ask Ken project ( http://askken.heroku.com/ ) by Michael Aufreiter yesterdat, and though it was pretty awesome... so I ported it to using Neo4j. Check it out: http://neovigator.heroku.com/ On github at https://github.com/maxdemarzi/neovigator Regards, Max ___ 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] Testing Neo4j Applications - Wiki page
Hi! I'm just sorting out packaging issues at the moment, an updated Neoclipse version should be out within a few days. Sorry for the inconvenience. /anders On 02/18/2011 06:13 PM, Nat Pryce wrote: One comment: the page recommends using Neoclipse to examine the graph after test failures but the current release of Neoclipse is not compatible with the current release of Neo4J. --Nat On 18 February 2011 10:00, Michael Hunger michael.hun...@neotechnology.com wrote: I started a wiki page on testing, if you have anything to add there, please feel to do so. If you have any questions please reply to the mail or put them in the wiki page to be answered. http://wiki.neo4j.org/content/Testing_with_Neo4j Cheers Michael ___ 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