1

As far as I know, there are the following data access storage options:

  • JDO
  • JPA
  • Entities, Properties, and Keys

Which one are you using and why? I am new to all of these and do not know which one is best ... It would be nice, if someone could show me the stumbling blocks in all these options?

Until now I would prefer Enteties, but I don't know how to implement the data model efficient?

Thanks

Mark
  • 7,507
  • 12
  • 52
  • 88

2 Answers2

3

I avoid JDO and JPA because they give developers false feeling that Datastore is a relational database. People use JDO/JPA because they know them from the SQL world and as far as I have seen it can be non-optimal because Datastore in anything but a relational/SQL database.

You really should understand how Datastore works and use API that is native.

So, the only left options are low-level API (entities, properties, keys) or objectify.

  1. While low-level API gives you all Datastore capabilities, it forces you to use Entities instead your classes. So you end up writing a lot of boilerplate code that does copying between Entities and your objects.

  2. Objectify, was designed specifically for AppEngine Datastore and internally uses low-level API, so it has all the features and speed without any of the drawbacks. You should really give it a try.

Update:

There are alos other options similar to objectify (similar in a sense that they were made specifically for datastore): Twig and SimpleDS. See this for comparison: Looking for opinions on using Objectify-appengine instead of JDO in GAE-J

Community
  • 1
  • 1
Peter Knego
  • 79,991
  • 11
  • 123
  • 154
  • 2
    Just to state the obvious, there is nothing in the JDO API that is oriented around an RDBMS. If you think there is, I'd be interested in understanding which part of it you think is relational (yes, it provides the ability to also map to RDBMS, but you can ignore such as FKs when using non-relational datastores). – DataNucleus Mar 09 '11 at 19:31
  • I will have a look at Objectify tomorrow. Thanks. – Mark Mar 09 '11 at 19:32
0

There is only one storage option. GAE offers a JDO and a JPA API on top of the datastore, but it's just a different way of accessing the datastore (like Hibernate, JDO and JDBC are three different APIs that can be used to access a RDBMS).

JB Nizet
  • 678,734
  • 91
  • 1,224
  • 1,255
  • I am aware of this, I changed the title of the question. – Mark Mar 09 '11 at 19:28
  • 1
    One storage option isn't quite the whole truth, see this article http://blog.notdot.net/2010/11/Storage-options-on-App-Engine – crowne Mar 09 '11 at 19:40