Mark
Mark

Reputation: 7625

GAE - different data storage access options - Which one to use?

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

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

Upvotes: 1

Views: 259

Answers (2)

Peter Knego
Peter Knego

Reputation: 80330

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

Upvotes: 3

JB Nizet
JB Nizet

Reputation: 691685

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).

Upvotes: 0

Related Questions