Same infamous question - JDO or JPA - want to hear from people who used both!

37 views
Skip to first unread message

Harishankar Nagarajan

unread,
Dec 3, 2010, 12:18:12 PM12/3/10
to Google App Engine
yes, this is there all over internet and like any other appengine
newbie am in same dilemma but now i want to hear recommendation from
those who have used/tried both and hence their experiences

also i know that Google doesn't play favorites and

Max Ross has said in his blog...

I'll give you the same answer I give whenever I'm asked this
question:
If you're not already familiar with JDO or JPA, use JDO because
our documentation is better. If you're more familiar with JDO than
JPA, use JDO. If you're more familiar with JPA than JDO, use JPA. If
you're equally familiar with both then you probably have a preference,
so use the one you prefer.

Personally i have worked in a pet project using JPA + Hibernate, so am
inclined towards JPA as am bit familiar.

BUT am starting a new app in appengine so want to be sure that am in
right path. I know that in appengine some features are missing in impl
from both JPA/JDO, due to datastore constraints, but i do not want to
face a situation in future when i hear that life would have been easy
when i have chosen JDO for AppEngine!

Am also ready to spend time learning JDO if its really worth it. So
guys, please share your experiences! As always thank much in advance..
Ask me more if needed..

Hari

Jeff Schwartz

unread,
Dec 3, 2010, 12:51:32 PM12/3/10
to google-a...@googlegroups.com
Neither. Go with Objectify.

Jeff


--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.




--
Jeff Schwartz

Jeff Schnitzer

unread,
Dec 3, 2010, 2:31:13 PM12/3/10
to google-a...@googlegroups.com
One warning about JPA: Unless something has changed in the last year,
the datanucleus JPA interface doesn't provide a detach() method. This
means you cannot (ever) serialize your entities (say, into memcache).
This is a bit of a mess because JPA doesn't presume bytecode
manipulation (Hibernate & friends do dirty change detection by
comparing against a cached copy of the fields) but datanucleus uses
their JDO implementation (including bytecode manipulation) to
implement JPA. Thus JDO has a detach() method but JPA does not.

Of course, the "mid-level APIs" like Objectify/Twig/SimpleDS/Slim3
which do not use bytecode manipulation do not have this issue.

Jeff

Remigius

unread,
Dec 3, 2010, 3:44:46 PM12/3/10
to Google App Engine
LL API, Slim3 or Objectify - depending on your needs. If your data is
rather static (i.e. no variation in attributes of entities of the same
kind), you may well stick with annotated classes - meaning Slim3 or
Objectify - otherwise (i.e. attributes may vary and/or you maintain
your own metadata), you might be better off with the LL API (an Entity
is basically just a collection of name-value pairs, aka a Map, that
has a key). Dunno Twig and SimpleDS - but similar considerations
surely apply also to those. IMHO JDO and JPA, having grown up in the
backyard of relational databases, may not be well suited for the big
table.

Cheers, R.

David Watson

unread,
Dec 4, 2010, 11:18:53 AM12/4/10
to Google App Engine
Agreed 100%. It's a great library, very simple and easy to use. It's
similar to the Python API, but in my opinion even better because it's
obvious what's going on, whereas the Python API has "magic" like auto-
fetching of ReferenceProperties, which can cause really terrible
performance if you don't realize what it's doing.
> > google-appengi...@googlegroups.com<google-appengine%2Bunsubscrib e...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine?hl=en.
>
> --
> *Jeff Schwartz*

Jeff Schwartz

unread,
Dec 4, 2010, 11:38:14 AM12/4/10
to google-a...@googlegroups.com
I've used Objectify in 2 applications now and it has been a very positive experience, living up to my expectations of what a library of that nature should do. What's more, it keeps getting better and better. I give it 2 thumbs up and a snap!

Jeff

To unsubscribe from this group, send email to google-appengi...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.




--
Jeff Schwartz

Harishankar Nagarajan

unread,
Dec 4, 2010, 12:12:28 PM12/4/10
to Google App Engine
Thanks all for sharing your opinions/experiences.

I read a lot of positive reviews about these third party libraries, in
particular, Objectify, but we feel kinda safe to be based on a
standard.

But are there any major show stoppers or something that makes to
struggle a lot to accomplish sth
while using JPA in particular, which made you to move to third party
libraries?
(noted the point about detach() method mentioned earlier, thanks)

Thanks again for sharing,
Hari

On Dec 4, 9:38 pm, Jeff Schwartz <jefftschwa...@gmail.com> wrote:
> I've used Objectify in 2 applications now and it has been a very positive
> experience, living up to my expectations of what a library of that nature
> should do. What's more, it keeps getting better and better. I give it 2
> thumbs up and a snap!
>
> Jeff
>
> > > > google-appengi...@googlegroups.com<google-appengine%2Bunsu...@googlegroups.com><google-appengine%2Bunsubscrib
> > e...@googlegroups.com>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/google-appengine?hl=en.
>
> > > --
> > > *Jeff Schwartz*
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine" group.
> > To post to this group, send email to google-a...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengi...@googlegroups.com<google-appengine%2Bunsu...@googlegroups.com>

Jeff Schwartz

unread,
Dec 4, 2010, 12:30:57 PM12/4/10
to google-a...@googlegroups.com
JDO and JPA are not standards when it comes to the Data Store. You need to rid yourself of thinking in terms of SQL. Repeat after me 100 times: The Data Store is NOT SQL... The Data Store is NOT SQL. LOL.

Ok, with that confusion out of the way, Google doesn't care 1 iota if you use their low level native api, jdo/jpa or a 3rd party library so why should you chose jdo/jpa which is so far removed from the data store model conceptually that is makes no sense?

jdo/jpa are sql persistence technologies not suitable to the hashmap like qualities of the datastore. The further you remove yourself from sql solutions the better off you will be.

By the way, using Objectify you can disable the datanucleus builder in eclipse and thats is a good thing as per Martha Stewart ;)

Jeff


To unsubscribe from this group, send email to google-appengi...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.




--
Jeff Schwartz

tfannon

unread,
Dec 4, 2010, 4:26:13 PM12/4/10
to Google App Engine
I'd agree wrt/ JDO/JPA.

We came into our first app trying to use the JDO/JPA. In addition to
being clunky, I also noticed that the Data Nucleus guys were not all
that thrilled with Google's implementation of it. If you google
around you will see what I am talking about.

I tried Objectify and Twig, liked both, but liked the Objectify
support and community they have built around it. I think you'd be
better off with one of those.

-TF
> > > > > > google-appengi...@googlegroups.com<google-appengine%2Bunsubscrib e...@googlegroups.com>
> > <google-appengine%2Bunsu...@googlegroups.com<google-appengine%252Bunsub scr...@googlegroups.com>
> > ><google-appengine%2Bunsubscrib
> > > > e...@googlegroups.com>
> > > > > > .
> > > > > > For more options, visit this group at
> > > > > >http://groups.google.com/group/google-appengine?hl=en.
>
> > > > > --
> > > > > *Jeff Schwartz*
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "Google App Engine" group.
> > > > To post to this group, send email to google-a...@googlegroups.com
> > .
> > > > To unsubscribe from this group, send email to
> > > > google-appengi...@googlegroups.com<google-appengine%2Bunsubscrib e...@googlegroups.com>
> > <google-appengine%2Bunsu...@googlegroups.com<google-appengine%252Bunsub scr...@googlegroups.com>
>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/google-appengine?hl=en.
>
> > > --
> > > *Jeff Schwartz*
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine" group.
> > To post to this group, send email to google-a...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengi...@googlegroups.com<google-appengine%2Bunsubscrib e...@googlegroups.com>

Ikai Lan (Google)

unread,
Dec 6, 2010, 3:29:12 PM12/6/10
to google-a...@googlegroups.com
For what it is worth, going forward, we hope to work more closely with
framework/library developers in addition to supporting JDO/JPA. We're
still keen on updating JDO/JPA, but many of the third party developers
may beat us to features that we release in the low-level API. For
instance, AsyncDatastore is something we officially released in 1.4.0,
but Twig has had this for some time now, and I've worked a bit with
John Patterson to have the library do the operations the *right* way,
not sure if that's released yet. Async writes aren't available in
JDO/JPA yet.

If you haven't yet looked at Slim3, they have a fairly large community
in Japan. It's less a persistence layer and more a full stack
framework. I really like how they baked in testing in the code
generators.

--
Ikai Lan
Developer Programs Engineer, Google App Engine
Blogger: http://googleappengine.blogspot.com
Reddit: http://www.reddit.com/r/appengine
Twitter: http://twitter.com/app_engine

> To unsubscribe from this group, send email to google-appengi...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages