开发者

Does GAE works only with BigTable (or also other database)?

I want to do a quite simple application on GAE with SPRING ROO.

I do not understand the difference between Hibernate and JPA (persistance ?) but 开发者_如何学CI would like to know what is recommended for my ('secure') app that will works on GAE...

In other terms, do you recomend me to use BIGTABLE + HIBERNATE + JPA (is it a best practice) ?

Tkx,


You won't be able to use Hibernate on GAE. Hibernate is only usable on top of a relational database. If you want to use JPA, then use the implementation available on GAE, and based on DataNucleus. See http://code.google.com/intl/fr/appengine/docs/java/datastore/jpa/overview.html for details.

Note that everything possible with JPA won't be possible on GAE, due to limitations of the GAE datastore.


GAE works only with BigTable (aka datastore, see Datastore Overview). It offers variety of APIs: from "native" low-level API to "native" high-level ones (JDO and JPA). Third-party APIs that lie somewhat in between are Objectify, Twig, etc. I recommend giving them very close look. On top of that you have specialized APIs such as Blobstore API.

In case of Hibernate and JPA they are both APIs you may use with majority of relational databases, but Hibernate is also an implementation - JPA is not. JPA needs an implementation and Hibernate is one of more common ones. When you use GAE you can completely forget about Hibernate (it's not available). Also forget about majority of JPA features as not supported due to non-relational nature of datastore.

GAE JPA uses older version DataNucleus implementation. This quote is from DataNucleus community page:

Google App Engine (TM) platform provides Java persistence (JDO or JPA) to its BigTable datastore using a datanucleus-appengine plugin. This plugin was developed by Google and is their responsibility. It currently only works with version 1.1 of DataNucleus and doesn't seem to be actively developed.

Would be a tip to look at third-party APIs...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜