Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pros and cons of db and ndb in google app engine

I have seen a little of this in stack overflow but I am wondering if there is any reason to use the DB entity model and what the specific pros and cons of using on or the other are.

I have read the ndb is a little faster and that it helps with caching. They have a good bit of info in the docs but don't really straight out say that ndb is better. At least I haven't found that yet.

like image 857
clifgray Avatar asked Oct 12 '12 04:10

clifgray


People also ask

What is NDB in App Engine?

App Engine NDB enables Python 2 apps to store and query data in Firestore in Datastore mode (Datastore) databases. Cloud NDB enables Python 2 and Python 3 apps to store and query data in the same databases and uses Datastore as the product that manages those databases.

What is NDB Datastore?

The Google Datastore NDB Client Library allows App Engine Python apps to connect to Datastore. The NDB client library builds on the older DB Datastore library adding the following data store features: The StructuredProperty class, which allows entities to have nested structure.

What is the architecture of Google App Engine?

An App Engine app is made up of a single application resource that consists of one or more services. Each service can be configured to use different runtimes and to operate with different performance settings. Within each service, you deploy versions of that service.


1 Answers

As far as I can tell ndb is an evolution of db, kept seperate to maintain compatability.

Have a look at the cheat sheet, it details the main differences

https://docs.google.com/document/d/1AefylbadN456_Z7BZOpZEXDq8cR8LYu7QgI7bt5V0Iw/mobilebasic

But it does not mention the other features such as computed properties.

If you are starting a new project I see no reason not to use ndb and every reason to.

EDIT: Alt link for document: https://docs.google.com/document/d/1AefylbadN456_Z7BZOpZEXDq8cR8LYu7QgI7bt5V0Iw/edit#

like image 172
Paul Collingwood Avatar answered Oct 14 '22 05:10

Paul Collingwood