The internal query engine (which is currently under planning) will be able to access only those fields that require evaluation. It's probably wise to expose such interface in the public API through dynamic proxies, but I consider it a long term feature. Anyway, thanks for sharing your experience with us.
Avishay. ________________________________ From: Raul Raja Martinez <raulr...@gmail.com> To: Neo user discussions <user@lists.neo4j.org> Sent: Mon, January 4, 2010 1:14:54 AM Subject: Re: [Neo] Neo in a cluster? I understand. When I started working on our annotation based project I was doing the approach of loading all properties in the bean but found that by doing so if you use the beans inside ReturnEvaluator it has to marshall all properties on each iteration when you want to compare something like "if (person.getName().equals(otherPerson.getName())). In a ORM approach where you use a relational db this makes sense since the data resides in the db and you have to bring it to memory but when doing this with neo the data may already be in memory and it is getting duplicated in all the instances of the bean on a per thread basis. Marshaling this way makes the traversal slow and when we took that approach we had to back out of it. Also by using an api that simple queries for a single type like "Give me the people with name equal to something" is really like using a regular relational database since is not taking advantage of the power of traversing the graph. We use Java dynamic proxies to implement the annotated interfaces and load only the properties used in the traversal comparison or in any other place where a property is called. By doing so the traversing operation is as fast as using the low level node access and the returned objects properties are only initialized when the getter is invoked by delegating to the node. The reason why I'm telling you all of this is that because we already went that path and didn't work for us in case you can benefit from the experience. 2010/1/3 Avishay Orpaz <avish...@yahoo.com> > I load all properties eagerly. In order to load properties lazily, one > needs either to use proxies or bytecode manipulation. Each technique has its > own strenghts and weaknesses, and I'm using neither. Hopefully, one day I'll > integrate my framework with neo-weave, a combination that will give this > functionality. > > Avishay > > > > > ________________________________ > From: Raul Raja Martinez <raulr...@gmail.com> > To: Neo user discussions <user@lists.neo4j.org> > Sent: Sun, January 3, 2010 2:09:36 AM > Subject: Re: [Neo] Neo in a cluster? > > In your framework, do all properties of a pojo get loaded when you load the > pojo by calling getProperty on the nodes? Looking fwd to learn more about > it. > > On Jan 2, 2010 3:43 PM, "Avishay Orpaz" <avish...@yahoo.com> wrote: > > Wow... it's becoming crowded out there. I'm also designing an > annotation-based persistence framework for neo4j. Hopefully, it will become > public (open source, of course) in a few days. Generally it follows the > same > lines as jo4neo (a projects I learned about just recently). There are, > however, some noticable differences: > 1. Transactions are left out of the framework, and their management is left > to the user > 2. Relationships can also be mapped to POJOs > 3. Embedded objects are not stored in serialized binary form. They can be > annotated and stored as key-value pairs, just like the main object. > > There is more, but I'll like to hear about other features that can be > interesting in such a framework. > > Avishay > > > > > ________________________________ > From: Raul Raja Martinez <raulr...@gmail.com> > To: Neo user discussions <user@lists.neo4j.org> > Sent: Sat, January 2, 2010 2:09:09 AM > > Subject: Re: [Neo] Neo in a cluster? > > Hi Peter, Yes we looked at jo4neo and found it very interesting and it > probably suits most people u... > _______________________________________________ > 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 > -- 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