Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Persistence of POJOs to Neo4j using JDO/JPA
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
datanucleus  
View profile  
 More options Jul 29 2012, 2:43 pm
From: datanucleus <andy_jeffer...@yahoo.com>
Date: Sun, 29 Jul 2012 11:43:46 -0700 (PDT)
Local: Sun, Jul 29 2012 2:43 pm
Subject: Persistence of POJOs to Neo4j using JDO/JPA

Hi,
FYI, DataNucleus JDO/JPA now has a prototype plugin for persisting normal
Java objects to Neo4J; it already supported persistence to RDBMS, ODBMS,
XML, JSON, Excel, ODF, MongoDB, HBase, AppEngine, VMForce, Cassandra, LDAP
and others so supporting some of the nice graph databases like Neo4J makes
a lot of sense.

To use this support you mark your model classes with JDO or JPA metadata
(annotations or XML) in the normal way you would for RDBMS (or any other
datastore), and write your JDO or JPA persistence code in the normal way.
The only difference is that the data is persisted into Neo4j transparently.
I've not had time to write up a tutorial yet, but the model and persistence
code would be identical to persisting to any other datastore, just that in
the definition of the datastore "URL" it would be something like
datanucleus.ConnectionURL=neo4j:{my_datastore_location}

This plugin is not yet released, as such, but is available as a nightly
build for anyone wishing to give it a try.
http://www.datanucleus.org/plugins/store.neo4j.html

What it currently supports :

   - Each object of a class becomes a Node.
   - Supports datastore identity, application identity, and nondurable
   identity
   - Supports versioned objects
   - Fields of all primitive and primitive wrappers can be persisted
   - Fields of many other standard Java types can be persisted (Date, URL,
   URI, Locale, Currency, JodaTime, javax.time, plus many more).
   - 1-1, 1-N, M-N, N-1 relations are persisted as Relationships (doesn't
   support Maps currently)
   - JDOQL/JPQL queries can be performed, and the operators &&, ||, ==, !=,
   >, >=, <, <= are processed using Cypher, with any remaining syntax handled
   in-memory currently.

What is likely to be added (hopefully soon)

   - Processing of more JDOQL/JPQL syntaxis in Cypher to minimise any
   in-memory processing
   - Embedded fields (and querying of embedded fields)
   - Check for duplicate object identity
   - Support for using the (Neo4j-assigned) node "id" as a global unique
   object id

Feedback is welcome; go to
http://www.datanucleus.org/servlet/forum/listrecentthreads

Would it be possible to get a link to it put on the Neo4j website or docs
in a convenient place?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Hunger  
View profile  
 More options Jul 29 2012, 4:34 pm
From: Michael Hunger <michael.hun...@neotechnology.com>
Date: Sun, 29 Jul 2012 22:34:32 +0200
Local: Sun, Jul 29 2012 4:34 pm
Subject: Re: [Neo4j] Persistence of POJOs to Neo4j using JDO/JPA

Andy,

that's great news thanks a lot. What about starting by just blogging the content of this email? We could then re-blog/promote it.
Or if you don't have the time we can also blog it on blog.neo4j.org

Thanks a lot for all your work, seems that quite an effort went into the plugin.

Do you have a sample application that you could imagine for showing off the power and ease of the approach?

We can definitely put a link to it onto the resources section of neo4j.org

Cheers

Michael

Am 29.07.2012 um 20:43 schrieb datanucleus:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
datanucleus  
View profile  
 More options Jul 30 2012, 2:08 am
From: datanucleus <andy_jeffer...@yahoo.com>
Date: Sun, 29 Jul 2012 23:08:12 -0700 (PDT)
Local: Mon, Jul 30 2012 2:08 am
Subject: Re: [Neo4j] Persistence of POJOs to Neo4j using JDO/JPA

Thanks Michael. I added a post on the DataNucleus blog,
http://datanucleus.blogspot.co.uk/2012/07/persistence-to-neo4j-graph-...

Since we already had quite a few datastore plugins (allowing copy across of
some features), this one actually took 2-3 days to get to its current
point.

As for a sample application I'm intending on making it run on our standard
JDO and JPA tutorial samples (as shown for MongoDB here for JDO
http://www.datanucleus.org/products/accessplatform/jdo/guides/tutoria... and
for JPA
http://www.datanucleus.org/products/accessplatform/jpa/guides/tutoria... ),
but I just need to add support for a (numeric) value generator with Neo4j
(since those tutorials use one). In the meantime, any JPA or JDO simple
application ought to be fine. I'll post back when it provides all features
for those tutorials.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Neubauer  
View profile  
 More options Jul 30 2012, 4:37 pm
From: Peter Neubauer <peter.neuba...@neotechnology.com>
Date: Mon, 30 Jul 2012 22:37:33 +0200
Local: Mon, Jul 30 2012 4:37 pm
Subject: Re: [Neo4j] Persistence of POJOs to Neo4j using JDO/JPA
Very cool Andy,
thank you for that cool piece of contribution! How production ready do
you think this is - would you recommend it to users yet?

Cheers,

/peter neubauer

G:  neubauer.peter
S:  peter.neubauer
P:  +46 704 106975
L:   http://www.linkedin.com/in/neubauer
T:   @peterneubauer

Wanna learn something new? Come to @graphconnect.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
datanucleus  
View profile  
 More options Jul 31 2012, 4:21 am
From: datanucleus <andy_jeffer...@yahoo.com>
Date: Tue, 31 Jul 2012 01:21:58 -0700 (PDT)
Local: Tues, Jul 31 2012 4:21 am
Subject: Re: [Neo4j] Persistence of POJOs to Neo4j using JDO/JPA

Thx Peter,

I've just released v3.1.0-m1 (1st milestone for use with DataNucleus v3.1)
of the "datanucleus-neo4j" plugin. It includes all features I mentioned
before, plus support for embedded and nested embedded fields and the
querying of those fields, support for use of Neo4j node id as a global
object identity, a check for duplicated identity on persist, support for
JDOQL/JPQL ordering in Cypher, and a few other things.

It ought to be in the Maven central repo tomorrow (1st Aug), and in the
meantime can be found in the DataNucleus Maven repo at
http://www.datanucleus.org/downloads/maven2/
under group "org.datanucleus"

The tutorials I promised are also now online at
JDO :
http://www.datanucleus.org/products/accessplatform_3_1/jdo/guides/tut...
JPA :
http://www.datanucleus.org/products/accessplatform_3_1/jpa/guides/tut...
so please report any typos/errors.

As for whether it is "production ready", well everyone has their own
definition of that :-) but it passes all of my tests for the above
functionality so I'd definitely recommend people to try persistence using
it, and view Nodes/Relationships in the datastore to gain some
confidence/understanding of what it is doing. Obviously the DataNucleus
persistence engine + JDO/JPA API implementations are tested over many years
so not likely a problem from that side. If some query syntax is not yet
implemented to use Cypher it will currently evaluate the query in-memory
(hence not efficient) - see the log when running the query. Raise any
issues at http://www.datanucleus.org/servlet/jira/browse/NUCNEOFORJ


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »