Re: [Neo4j] May I know the cache mechanism of Neo4j?

2011-09-16 Thread Peter Neubauer
Yuanlong,
is http://docs.neo4j.org/chunked/snapshot/configuration-caches.html
giving you information or do you need more?

Cheers,

/peter neubauer

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org               - Your high performance graph database.
http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Thu, Sep 15, 2011 at 5:47 AM, iamyuanlong yuanlong1...@gmail.com wrote:
 Hello everyone,
    Anybody can tell me more about the cache mechanism of Neo4j?
 When use this code get both fans of two user. The result will be auto cache?
 or Not?



 --
 View this message in context: 
 http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-May-I-know-the-cache-mechanism-of-Neo4j-tp3337895p3337895.html
 Sent from the Neo4j Community Discussions mailing list archive at Nabble.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] neo4j+playframework

2011-09-16 Thread Henry Cleland
Thank you very much. Can't wait to get to work to try it. Will let you  
know what happens.

Regards, Hnocleland's iPhone

On Sep 16, 2011, at 0:18, McKinley mckinley1...@gmail.com wrote:

 You need the Neo4j proper in your Play lib directory. Here is a Maven
 pom.xml file that will take care of that for you.

 **BE CAREFUL** mvn clean will delete all the jars in your lib  
 folder. Remove
 the clean section if you don't want that.

 https://gist.github.com/a3a5106efdaaade10496

 Run 'mvn initialize' from your Play app directory to copy all jar to  
 lib.
 Run 'mvn clean' to delete them. If you change Neo4j versions you  
 will want
 to run a clean and then initialize.

 Cheers,

 McKinley


 On Thu, Sep 15, 2011 at 5:10 PM, henry cleland  
 hnoclel...@gmail.com wrote:

 Hi peter,
 I am tryn to use jo4neo with playframework
 firstly, im unable  to resolve it as a dependency directly from  
 maven,

 secondly, with my manually downloaded lib from
 http://jo4neo.googlecode.com/svn/trunk/repo/thewebsemantic/jo4neo/0.4.1/
 and noe4j from maven, when i try to run my application is it the  
 error i
 get:

 Internal Server Error (500) for request GET /Rendezvous/index

 Oops: NoClassDefFoundError
 An unexpected error occured caused by exception NoClassDefFoundError:
 org/neo4j/index/IndexService

 play.exceptions.UnexpectedException: Unexpected Error
 at play.mvc.ActionInvoker.invoke(ActionInvoker.java:255)
 at Invocation.HTTP Request(Play!)
 Caused by: java.lang.NoClassDefFoundError: org/neo4j/index/ 
 IndexService
 at jo4neo.impl.ObjectGraphImpl.init(ObjectGraphImpl.java:29)
 at jo4neo.impl.ObjectGraphProvider.create(ObjectGraphProvider.java: 
 10)
 at jo4neo.ObjectGraphFactory.get(ObjectGraphFactory.java:36)
 at controllers.Rendezvous.clinit(Rendezvous.java:28)
 at sun.misc.Unsafe.ensureClassInitialized(Native Method)
 at play.utils.Java.parameterNames(Java.java:193)
 at play.mvc.ActionInvoker.getActionMethodArgs(ActionInvoker.java:607)
 at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java: 
 475)
 at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java: 
 470)
 at play.mvc.ActionInvoker.invoke(ActionInvoker.java:158)
 ... 1 more
 Caused by: java.lang.ClassNotFoundException:  
 org.neo4j.index.IndexService
 at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
 ... 11 more


 On Thu, Sep 15, 2011 at 9:15 PM, Peter Neubauer 
 peter.neuba...@neotechnology.com wrote:

 Henry,
 Anything you can share about jo4neo problems with missing files? I  
 have
 commit access to the repo...

 /peter

 Sent from my phone.
 On Sep 15, 2011 9:52 PM, henry cleland hnoclel...@gmail.com  
 wrote:
 oh great!!!,
 I'll be earnestly looking out for the example. I did hit the wall  
 with
 my
 jo4noe. There is a required file that is not in the package.
 and this has been both intellectually stimulating and frustrating.
 I do appreciate your advice on manually mapping the classes to  
 graph
 models
 and i want to try that once again hoping that this time i will be
 successful.
 I really am looking forward to the example so i know how to  
 approach my
 design.

 On Thu, Sep 15, 2011 at 7:27 PM, McKinley mckinley1...@gmail.com
 wrote:

 I would be happy to share a Neo4j Play framework app with you.  
 I'll
 isolate
 a small example and post it. jo4neo looks interesting, but it is  
 not
 too
 hard to manually map a few classes to a simple graph model and the
 experience will be beneficial. The graph model is of a different  
 and
 finer
 grain than class based OOP and you shouldn't miss the chance for  
 that
 to
 stimulate new ideas.

 Unfortunately I have too many work deadlines right now, but this
 weekend
 I
 will post the Play plugin and a sample app. However, I'm always  
 happy
 to
 be
 distracted with Neo4j and Play questions so feel free to ask as  
 you
 dive
 in
 :)

 Cheers,

 McKinley

 On Thu, Sep 15, 2011 at 9:20 AM, henry cleland hnoclel...@gmail.com 
 
 wrote:

 hiya,
 thanx for your response.
 wrapping the models into java classes is a bit challenging for me
 cos
 i
 cant get my head around how the persistence layer will handle  
 that.
 After
 the post i did a search for a mapper and found jo4neo, and im
 currently
 tryn
 to use that.
 Having challenges with how tho make the model persist.

 I would be very grateful again if you could give me a small  
 sample
 model
 implementation for neo such that the controller can persist it.
 My guess is i need my User Object and Interface to wrap the  
 object
 into
 a
 node or vice versa but how to store, lookup and retrieve it is my
 challenge.

 I do strongly wish you reconsider and release your model  
 earlier. or
 at
 the
 least i 

Re: [Neo4j] Radix tree

2011-09-16 Thread Peter Neubauer
Yes, great work Davide!

I think we need to start enabling documentation for the graph
collections as it is evolving pretty rapidly!

Cheers,

/peter neubauer

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org               - Your high performance graph database.
http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Thu, Sep 15, 2011 at 1:48 PM, Niels Hoogeveen
pd_aficion...@hotmail.com wrote:

 Thanks to the good work of Davide, graph-collections now contains an 
 implementation of Radix-tree. See: http://en.wikipedia.org/wiki/Radix_tree
 This particular datastructure can be used to store nodes sorted by a String 
 value, very handy when you want to create associative arrays in Neo4j.
 Niels
 ___
 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] Radix tree

2011-09-16 Thread Niels Hoogeveen

Peter,
I agree, we need to work on documentation once the dust has settled around the 
changes Bryce has been working on.
Niels

 From: peter.neuba...@neotechnology.com
 Date: Fri, 16 Sep 2011 13:59:07 +0200
 To: user@lists.neo4j.org
 Subject: Re: [Neo4j] Radix tree
 
 Yes, great work Davide!
 
 I think we need to start enabling documentation for the graph
 collections as it is evolving pretty rapidly!
 
 Cheers,
 
 /peter neubauer
 
 GTalk:  neubauer.peter
 Skype   peter.neubauer
 Phone   +46 704 106975
 LinkedIn   http://www.linkedin.com/in/neubauer
 Twitter  http://twitter.com/peterneubauer
 
 http://www.neo4j.org   - Your high performance graph database.
 http://startupbootcamp.org/- Öresund - Innovation happens HERE.
 http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
 
 
 
 On Thu, Sep 15, 2011 at 1:48 PM, Niels Hoogeveen
 pd_aficion...@hotmail.com wrote:
 
  Thanks to the good work of Davide, graph-collections now contains an 
  implementation of Radix-tree. See: http://en.wikipedia.org/wiki/Radix_tree
  This particular datastructure can be used to store nodes sorted by a String 
  value, very handy when you want to create associative arrays in Neo4j.
  Niels
  ___
  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 graph collections introduction of NodeCollection interface

2011-09-16 Thread Peter Neubauer
Also,
since you can do node.getGraphDatabase(), I think we don't need to
pass in the graphdb instance in
new SortedTree( graphDb(), graphDb().createNode(), new IdComparator(),
true, RelTypes.INDEXED_RELATIONSHIP.name() );
?

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 Fri, Sep 16, 2011 at 7:37 AM, Bryce bryc...@gmail.com wrote:
 Hi,

 I had mentioned in a previous thread that I was working on introducing a
 NodeCollection interface to remove the dependency from IndexedRelationship
 to SortedTree.  I have an initial cut of this up now in my github repo:
 https://github.com/brycenz/graph-collections

 It would be great to get community feedback on this as I think that having a
 well designed and common NodeCollection interface would help for multiple
 use cases, e.g. sortedTreeNodeCollection.addAll(linkedListNodeCollection)
 doing exactly what you think it would.

 IndexedRelationship now takes a node to index relationships from, a
 relationship type, and a direction, as well as a NodeCollection at creation
 time.  As in the unit tests this then leads to:

 Node indexedNode = graphDb().createNode();
 SortedTree st = new SortedTree( graphDb(), graphDb().createNode(), new
 IdComparator(), true, RelTypes.INDEXED_RELATIONSHIP.name() );

 IndexedRelationship ir = new IndexedRelationship( indexedNode,
 RelTypes.INDEXED_RELATIONSHIP, Direction.OUTGOING, st );

 To create the IndexedRelationship.  To later add nodes to the relationship
 you need to create an instance of IndexedRelationship without the
 NodeCollection:

 IndexedRelationship ir = new IndexedRelationship( indexedNode,
 RelTypes.INDEXED_RELATIONSHIP, Direction.OUTGOING );


 What this means from a NodeCollection implementation point of view is that
 firstly it needs to use the NodeCollection.RelationshipType.VALUE
 relationship to connect from its internal data structure to the nodes being
 added to the collection, and it needs to be able to recreate itself from a
 base node that is passed into a constructor (that only takes the base node).
  A node collection also needs to store its class name on the base node for
 later construction purposes, as well as any other data required to recreate
 the NodeCollection instance (in the case of SortedTree this is the
 comparator class, the tree name, and whether it is a unique index.

 Niels, you may want to have a good look over SortedTree, I have made a few
 changes to it, mainly around introduction of a base node, and changing of
 the end value relationships.  This could be cleaned up better, but I wanted
 to start with minimal changes.

 Both IndexedRelationship and IndexedRelationshipExpander have no
 dependencies on SortedTree now, and should work with any properly
 implemented NodeCollection.  I will be putting together a paged linked list
 NodeCollection next to try this.

 Some future thoughts for NodeCollection, addition of as many of the
 java.util.Collection methods (e.g. addAll, removeAll, retainAll, contains,
 containsAll) as well as an abstract base NodeCollection to help provide
 non-optimised support for these methods.

 Cheers
 Bryce
 ___
 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 graph collections introduction of NodeCollection interface

2011-09-16 Thread Niels Hoogeveen

Bryce's point makes perfect sense. The argument graphDb().createNode() gives 
the constructor an instance of Node, which contains a reference to the 
database, so there is no real need to additionally supply the database instance.
Of course his example would have been less confusing if he'd written:

Node indexedNode = graphDb().createNode(); 
SortedTree st = new SortedTree( graphDb(), indexedNode, new IdComparator(), 
true, RelTypes.INDEXED_RELATIONSHIP.name() );

 From: peter.neuba...@neotechnology.com
 Date: Fri, 16 Sep 2011 15:22:27 +0200
 To: user@lists.neo4j.org
 Subject: Re: [Neo4j] Neo4j graph collections introduction of NodeCollection   
 interface
 
 Also,
 since you can do node.getGraphDatabase(), I think we don't need to
 pass in the graphdb instance in
 new SortedTree( graphDb(), graphDb().createNode(), new IdComparator(),
 true, RelTypes.INDEXED_RELATIONSHIP.name() );
 ?
 
 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 Fri, Sep 16, 2011 at 7:37 AM, Bryce bryc...@gmail.com wrote:
  Hi,
 
  I had mentioned in a previous thread that I was working on introducing a
  NodeCollection interface to remove the dependency from IndexedRelationship
  to SortedTree.  I have an initial cut of this up now in my github repo:
  https://github.com/brycenz/graph-collections
 
  It would be great to get community feedback on this as I think that having a
  well designed and common NodeCollection interface would help for multiple
  use cases, e.g. sortedTreeNodeCollection.addAll(linkedListNodeCollection)
  doing exactly what you think it would.
 
  IndexedRelationship now takes a node to index relationships from, a
  relationship type, and a direction, as well as a NodeCollection at creation
  time.  As in the unit tests this then leads to:
 
  Node indexedNode = graphDb().createNode();
  SortedTree st = new SortedTree( graphDb(), graphDb().createNode(), new
  IdComparator(), true, RelTypes.INDEXED_RELATIONSHIP.name() );
 
  IndexedRelationship ir = new IndexedRelationship( indexedNode,
  RelTypes.INDEXED_RELATIONSHIP, Direction.OUTGOING, st );
 
  To create the IndexedRelationship.  To later add nodes to the relationship
  you need to create an instance of IndexedRelationship without the
  NodeCollection:
 
  IndexedRelationship ir = new IndexedRelationship( indexedNode,
  RelTypes.INDEXED_RELATIONSHIP, Direction.OUTGOING );
 
 
  What this means from a NodeCollection implementation point of view is that
  firstly it needs to use the NodeCollection.RelationshipType.VALUE
  relationship to connect from its internal data structure to the nodes being
  added to the collection, and it needs to be able to recreate itself from a
  base node that is passed into a constructor (that only takes the base node).
   A node collection also needs to store its class name on the base node for
  later construction purposes, as well as any other data required to recreate
  the NodeCollection instance (in the case of SortedTree this is the
  comparator class, the tree name, and whether it is a unique index.
 
  Niels, you may want to have a good look over SortedTree, I have made a few
  changes to it, mainly around introduction of a base node, and changing of
  the end value relationships.  This could be cleaned up better, but I wanted
  to start with minimal changes.
 
  Both IndexedRelationship and IndexedRelationshipExpander have no
  dependencies on SortedTree now, and should work with any properly
  implemented NodeCollection.  I will be putting together a paged linked list
  NodeCollection next to try this.
 
  Some future thoughts for NodeCollection, addition of as many of the
  java.util.Collection methods (e.g. addAll, removeAll, retainAll, contains,
  containsAll) as well as an abstract base NodeCollection to help provide
  non-optimised support for these methods.
 
  Cheers
  Bryce
  ___
  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 graph collections introduction of NodeCollection interface

2011-09-16 Thread Niels Hoogeveen

Hi Bryce,
I really like what you are trying to achieve here. 
One question:
Instead of having NodeCollection, why not have GraphCollectionT extends 
PropertyContainer. That way we can have collections of both Relationships and 
Nodes.
Niels

 Date: Fri, 16 Sep 2011 17:37:29 +1200
 From: bryc...@gmail.com
 To: user@lists.neo4j.org
 Subject: [Neo4j] Neo4j graph collections introduction of NodeCollection   
 interface
 
 Hi,
 
 I had mentioned in a previous thread that I was working on introducing a
 NodeCollection interface to remove the dependency from IndexedRelationship
 to SortedTree.  I have an initial cut of this up now in my github repo:
 https://github.com/brycenz/graph-collections
 
 It would be great to get community feedback on this as I think that having a
 well designed and common NodeCollection interface would help for multiple
 use cases, e.g. sortedTreeNodeCollection.addAll(linkedListNodeCollection)
 doing exactly what you think it would.
 
 IndexedRelationship now takes a node to index relationships from, a
 relationship type, and a direction, as well as a NodeCollection at creation
 time.  As in the unit tests this then leads to:
 
 Node indexedNode = graphDb().createNode();
 SortedTree st = new SortedTree( graphDb(), graphDb().createNode(), new
 IdComparator(), true, RelTypes.INDEXED_RELATIONSHIP.name() );
 
 IndexedRelationship ir = new IndexedRelationship( indexedNode,
 RelTypes.INDEXED_RELATIONSHIP, Direction.OUTGOING, st );
 
 To create the IndexedRelationship.  To later add nodes to the relationship
 you need to create an instance of IndexedRelationship without the
 NodeCollection:
 
 IndexedRelationship ir = new IndexedRelationship( indexedNode,
 RelTypes.INDEXED_RELATIONSHIP, Direction.OUTGOING );
 
 
 What this means from a NodeCollection implementation point of view is that
 firstly it needs to use the NodeCollection.RelationshipType.VALUE
 relationship to connect from its internal data structure to the nodes being
 added to the collection, and it needs to be able to recreate itself from a
 base node that is passed into a constructor (that only takes the base node).
  A node collection also needs to store its class name on the base node for
 later construction purposes, as well as any other data required to recreate
 the NodeCollection instance (in the case of SortedTree this is the
 comparator class, the tree name, and whether it is a unique index.
 
 Niels, you may want to have a good look over SortedTree, I have made a few
 changes to it, mainly around introduction of a base node, and changing of
 the end value relationships.  This could be cleaned up better, but I wanted
 to start with minimal changes.
 
 Both IndexedRelationship and IndexedRelationshipExpander have no
 dependencies on SortedTree now, and should work with any properly
 implemented NodeCollection.  I will be putting together a paged linked list
 NodeCollection next to try this.
 
 Some future thoughts for NodeCollection, addition of as many of the
 java.util.Collection methods (e.g. addAll, removeAll, retainAll, contains,
 containsAll) as well as an abstract base NodeCollection to help provide
 non-optimised support for these methods.
 
 Cheers
 Bryce
 ___
 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] Multi-master server architecture

2011-09-16 Thread Peter Neubauer
Kynao,
Neo4j HA is right now a multiple slaves - single write master
architecture that will have a write guarantee on 2 nodes if you write
to a slave - the slave itself and the master.

While this is good and stable for failover and read-heavy production
scenarios, in the next version of Neo4j (2.x) we are looking at
actually sharding the graph more dynamically than a Dynamo ring,
especially runtime, on different machines, so we kind of hop over the
stage of having configurable guarantees in a dynamo replication
cluster in order to reach the dynamic graph sharding stage faster.

HTH?

Cheers,

/peter neubauer

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org               - Your high performance graph database.
http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Wed, Sep 14, 2011 at 11:08 AM, Kynao cloudbe...@gmail.com wrote:
 Hi,

 I'm interested by the Multi-master feature like explained here
 http://www.assembla.com/spaces/orientdb/wiki/Multi-master_server_architecture.
 i'm also interested to discuss this proposition...

 What do you think ?
 What re you remarks ?

 --
 View this message in context: 
 http://neo4j-community-discussions.438527.n3.nabble.com/Multi-master-server-architecture-tp3335268p3335268.html
 Sent from the Neo4j Community Discussions mailing list archive at Nabble.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


[Neo4j] sdg: @Indexed for relationships?

2011-09-16 Thread Gonfi den Tschal
I'm struggling with the speed of iterating relations. It's where neo4j
is said to shine, so I must be doing something wrong.

What can I do to speed up the process of looping relationships related
to an object?
There are too many bottlenecks (warm-up phase), plus my data is too
large to fit all into ram.

Is @Indexed meant to be used on @RelatedTo and @RelatedToVia
collections also? Or do I have to create
relationship indexes manually? And then how would sdg use them, or
would I have to fall back to basic neo4j api?

Any pointer to wiki/manual?
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Rebuilding Lucene index

2011-09-16 Thread Rama Manusama
Hi all,

Sorry for a noobish question, my knowledge in Java is limited so reading the
source is kinda difficult for me (I use neo4j.rb ruby binding v1.2.2 and
neo4j 1.4)

I ran into index corruption due to non-clean shutdown (through kill -9) and
could not start the database anymore. Looking to discussions like
http://www.mail-archive.com/user@lists.neo4j.org/msg06100.html, I decided to
delete the index folder and it was solved. However I still need to rebuild
the index and have no clue on how to do this, have looked on the docs and
cannot really find either. Could anybody please help?

I also posted my question here
http://stackoverflow.com/questions/7440244/how-to-rebuild-neo4j-lucene-index-neo4j-rb,but
neo4j activities seem to be low in stackoverflow

Thanks all, appreciate your help!,

Rama
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Rebuilding Lucene index

2011-09-16 Thread Peter Neubauer
Mmh,
so what did you do to get the index corrupted? Are you running
neo4j.rb? In there, I am not sure that the Lucene index is integrated
into the transactional system like in Neo4j java, so maybe Andreas can
shed some light?

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 Fri, Sep 16, 2011 at 7:14 PM, Rama Manusama rama.manus...@gmail.com wrote:
 Hi all,

 Sorry for a noobish question, my knowledge in Java is limited so reading the
 source is kinda difficult for me (I use neo4j.rb ruby binding v1.2.2 and
 neo4j 1.4)

 I ran into index corruption due to non-clean shutdown (through kill -9) and
 could not start the database anymore. Looking to discussions like
 http://www.mail-archive.com/user@lists.neo4j.org/msg06100.html, I decided to
 delete the index folder and it was solved. However I still need to rebuild
 the index and have no clue on how to do this, have looked on the docs and
 cannot really find either. Could anybody please help?

 I also posted my question here
 http://stackoverflow.com/questions/7440244/how-to-rebuild-neo4j-lucene-index-neo4j-rb,but
 neo4j activities seem to be low in stackoverflow

 Thanks all, appreciate your help!,

 Rama
 ___
 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] Multi-master server architecture

2011-09-16 Thread Alexandre Emeriau
Thanks Peter for your answer. While my thinking were different from dynamo
too and i'm still searching where part of my explanation are too incomplete
or fails, good news about orientation taken in release 2.x, it will be very
interesting to know how it works.

Yes, your answer helps :)
Regards
On Fri, Sep 16, 2011 at 5:09 PM, Peter Neubauer 
peter.neuba...@neotechnology.com wrote:

 Kynao,
 Neo4j HA is right now a multiple slaves - single write master
 architecture that will have a write guarantee on 2 nodes if you write
 to a slave - the slave itself and the master.

 While this is good and stable for failover and read-heavy production
 scenarios, in the next version of Neo4j (2.x) we are looking at
 actually sharding the graph more dynamically than a Dynamo ring,
 especially runtime, on different machines, so we kind of hop over the
 stage of having configurable guarantees in a dynamo replication
 cluster in order to reach the dynamic graph sharding stage faster.

 HTH?

 Cheers,

 /peter neubauer

 GTalk:  neubauer.peter
 Skype   peter.neubauer
 Phone   +46 704 106975
 LinkedIn   http://www.linkedin.com/in/neubauer
 Twitter  http://twitter.com/peterneubauer

 http://www.neo4j.org   - Your high performance graph database.
 http://startupbootcamp.org/- Öresund - Innovation happens HERE.
 http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



 On Wed, Sep 14, 2011 at 11:08 AM, Kynao cloudbe...@gmail.com wrote:
  Hi,
 
  I'm interested by the Multi-master feature like explained here
 
 http://www.assembla.com/spaces/orientdb/wiki/Multi-master_server_architecture
 .
  i'm also interested to discuss this proposition...
 
  What do you think ?
  What re you remarks ?
 
  --
  View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/Multi-master-server-architecture-tp3335268p3335268.html
  Sent from the Neo4j Community Discussions mailing list archive at
 Nabble.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

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Rebuilding Lucene index

2011-09-16 Thread Rama Manusama
Thanks Peter, Andreas,

Yes I am running neo4j.rb with the newest version, and torquebox 1.1.1 as
server

I had a non-clean shutdown through ' kill -9 ' due to a Mechanize web
request process that took forever (strangely did not follow the timeout
config due to some reason). I should not use kill -9 anymore I guess

I also enclose messages.log if it would be useful/interesting for you to see


Perhaps Andreas could help with how index rebuilding works here? Thanks
alot!

Cheers,

Rama



On Fri, Sep 16, 2011 at 7:18 PM, Peter Neubauer 
peter.neuba...@neotechnology.com wrote:

 Mmh,
 so what did you do to get the index corrupted? Are you running
 neo4j.rb? In there, I am not sure that the Lucene index is integrated
 into the transactional system like in Neo4j java, so maybe Andreas can
 shed some light?

 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 Fri, Sep 16, 2011 at 7:14 PM, Rama Manusama rama.manus...@gmail.com
 wrote:
  Hi all,
 
  Sorry for a noobish question, my knowledge in Java is limited so reading
 the
  source is kinda difficult for me (I use neo4j.rb ruby binding v1.2.2 and
  neo4j 1.4)
 
  I ran into index corruption due to non-clean shutdown (through kill -9)
 and
  could not start the database anymore. Looking to discussions like
  http://www.mail-archive.com/user@lists.neo4j.org/msg06100.html, I
 decided to
  delete the index folder and it was solved. However I still need to
 rebuild
  the index and have no clue on how to do this, have looked on the docs and
  cannot really find either. Could anybody please help?
 
  I also posted my question here
 
 http://stackoverflow.com/questions/7440244/how-to-rebuild-neo4j-lucene-index-neo4j-rb,but
  neo4j activities seem to be low in stackoverflow
 
  Thanks all, appreciate your help!,
 
  Rama
  ___
  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




-- 
Rama John Gabriel Manusama
rama.manus...@gmail.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] sdg: @Indexed for relationships?

2011-09-16 Thread Michael Hunger
Hey Gonfi,

can you explain exactly what it is you're trying to achieve ?

* datamodel
* # of nodes and rels
* # of rels per node (per type)
* classes, and the specific access/traversal code that poses the problems

That will help us to determine the possible causes for slowdowns as well as 
solutions.

You can use @Indexed inside of Relationship-Entities. Then they will be added 
to relationship-indexes which might speed up supernode iteration.

Neo4j shines at traversing relations, not necessarily in handling supernodes 
(i.e. nodes with  10k rels) at least not with cold caches when they have to be 
retrieved from disk.

We've planned those heavy relationship issues to be worked on.


Cheers

Michael

Am 16.09.2011 um 17:32 schrieb Gonfi den Tschal:

 I'm struggling with the speed of iterating relations. It's where neo4j
 is said to shine, so I must be doing something wrong.
 
 What can I do to speed up the process of looping relationships related
 to an object?
 There are too many bottlenecks (warm-up phase), plus my data is too
 large to fit all into ram.
 
 Is @Indexed meant to be used on @RelatedTo and @RelatedToVia
 collections also? Or do I have to create
 relationship indexes manually? And then how would sdg use them, or
 would I have to fall back to basic neo4j api?
 
 Any pointer to wiki/manual?
 ___
 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 graph collections introduction of NodeCollection interface

2011-09-16 Thread Bryce
Hi Niels,

I had wondered about having a collection interface that covered both nodes
and relationships.  There were a couple of reasons I didn't go with that
right now, though well worthwhile discussing it and going with a
GraphCollection super interface if it fits properly.

Firstly I wanted to get something out there so people could have a look,
and having something that matched what IndexedRelationship currently
required was easiest first step.  Biggest thing specific in there to that
functionality is the addNode method returning a relationship.

The other issue was more wondering how a relationship collection would work.
 Say I have a relationship collection, and I have a relationship R1 between
node A and B, how am I going to represent that relationship withing some
graph based data structure that makes sense.  There could be a node X that
is part of the relationship collection data structure (e.g. tree) and that
node could have an attribute that has the relationship id on it, but that
doesn't seem like it would be very performant.  There could be a
relationship between X and A that also gave the relationship type of R1, so
you could find the relationship based on that, but there isn't
any guarantee of the relationship type being unique.  What it would need to
properly model it is the ability to have a relationship between X and R1,
i.e. a relationship from a node to a relationship.

If instead of being able to add any given relationship to the relationship
collection you instead restrict it to being relationships matching a certain
criteria from a given node then it is practically the same thing as a
relationship expander.

Or if you instead have a way through the relationship collection to create
relationships from a given node to a set of other arbitrary nodes, with the
relationship collection having a fixed relationship type and direction, then
that is practically the current IndexedRelationship.

I guess a way it could work is similar to IndexedRelationship, basically
more general case of that class, where you have a method on the relationship
collection createRelationship(startNode, endNode, relationshipType,
direction) that was then stored in an internal data structure to create a
pseudo relationship between the start and end, and then being able to
iterate over this set of relationships.  Not sure exactly what the use case
of that would be.  Maybe of more interest could be the same situation where
the relationship type and direction are fixed, then you may have a friend
of set of relationships that you create between arbitrary nodes and then
iterate over all of those.

I can't personally think of a good way of adding a set of arbitrary
relationships into a collection stored in a graph data structure.

Thoughts?

Cheers
Bryce

P.S. Peter, I had thought to remove the passing in of the graph database and
instead just getting it from the node, or only passing in the graph database
and creating the node internally.

On Sat, Sep 17, 2011 at 2:19 AM, Niels Hoogeveen
pd_aficion...@hotmail.comwrote:


 Hi Bryce,
 I really like what you are trying to achieve here.
 One question:
 Instead of having NodeCollection, why not have GraphCollectionT extends
 PropertyContainer. That way we can have collections of both Relationships
 and Nodes.
 Niels

  Date: Fri, 16 Sep 2011 17:37:29 +1200
  From: bryc...@gmail.com
  To: user@lists.neo4j.org
  Subject: [Neo4j] Neo4j graph collections introduction of NodeCollection
 interface
 
  Hi,
 
  I had mentioned in a previous thread that I was working on introducing a
  NodeCollection interface to remove the dependency from
 IndexedRelationship
  to SortedTree.  I have an initial cut of this up now in my github repo:
  https://github.com/brycenz/graph-collections
 
  It would be great to get community feedback on this as I think that
 having a
  well designed and common NodeCollection interface would help for multiple
  use cases, e.g. sortedTreeNodeCollection.addAll(linkedListNodeCollection)
  doing exactly what you think it would.
 
  IndexedRelationship now takes a node to index relationships from, a
  relationship type, and a direction, as well as a NodeCollection at
 creation
  time.  As in the unit tests this then leads to:
 
  Node indexedNode = graphDb().createNode();
  SortedTree st = new SortedTree( graphDb(), graphDb().createNode(), new
  IdComparator(), true, RelTypes.INDEXED_RELATIONSHIP.name() );
 
  IndexedRelationship ir = new IndexedRelationship( indexedNode,
  RelTypes.INDEXED_RELATIONSHIP, Direction.OUTGOING, st );
 
  To create the IndexedRelationship.  To later add nodes to the
 relationship
  you need to create an instance of IndexedRelationship without the
  NodeCollection:
 
  IndexedRelationship ir = new IndexedRelationship( indexedNode,
  RelTypes.INDEXED_RELATIONSHIP, Direction.OUTGOING );
 
 
  What this means from a NodeCollection implementation point of view is
 that
  firstly it needs to use the NodeCollection.RelationshipType.VALUE