Greetings Qi4j and Neo4J friends! Last night (Swedish time) I published bindings for using Neo4J as an EntityStore in Qi4j.
So for those of you in the Qi4j community wanting to give Neo4J a spin, and for those of you in the Neo4J community who are interested in Qi4j, don't hesitate in giving these bindings a spin. At the moment the test cases are the best documentation on how to use the bindings. By time, as I receive questions and comments from you guys I can put together better documentation that describe what a general developer needs to know to get started. The intent is that using Neo4J in Qi4j should be pretty much the same as using any other EntityStore, and that documentation therefore is pretty much a general Qi4j issue. Three things are specific for the Neo4J bindings though: 1. Set up. To initiate the Neo4J bindings you will need to set up Qi4J to use the Neo4J services, these are at the moment: module.addServices( NeoEntityStoreService.class, NeoCoreService.class, DirectEntityStateFactory.class, IndirectEntityStateFactory.class, NeoIdentityService.class ); This might change somewhat as development progresses. I have been thinking of adding a utility method somewhere to do the appropriate setup, regardless to how the internal implementation changes. 2. Configuration. There are three configuration-parameters for the Neo4J bindings: * Where on disk to store the Node space. * What kind of Indexing system to use (Lucene or a tree based index built in the node space). * Which TransactionManager to use with Neo4J. At the moment only the first of these can be specified, by setting java.lang.System.setProperty("neo.nodestore.path", path); This will be changed to use the standard Qi4j configuration methods in a near future, then you will also be able to configure the other two parameters. The ability to set the TransactionManager also depends on a coming change in the Neo4J core. Not specifying transaction manager will use Neo4Js internal TransactionManager, this is an option that works now, and will continue to work in the future. 3. Transaction management. How to use transactions with these bindings is demonstrated in the test code. The effect of transactions is described under "The state of these bindings" in this e-mail. And in the future you will of course be able to use any JTA compatible TransactionManager. The state of these bindings is: * There is a working implementation that modifies the node space directly, this implementation requires an open transaction (with the transaction manager associated with Neo) while operating on the Entities. * There is an implementation under development that copies the state of the node space to an intermediate representation while operating that manages transactions internally. This implementation is better suited for long running operations, but more restricted by available memory in the runtime system. This implementation will be committed within a few days. The two implementations will be able to coexist, and implementation will be chosen based on whether there is an open transaction or not. * Also coming soon is the ability to reference entities stored in another EntityStore. I expect to be adding these features during next week, and after that committing a few cleanup updates before going into maintenance mode. Happy hacking! -- Tobias Ivarsson <[EMAIL PROTECTED]> Hacker, Neo Technology www.neotechnology.com Cellphone: +46 706 534857 _______________________________________________ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user