user3375163
user3375163

Reputation: 21

Android App Engine with Cloud SQL or Datastore

I am new here and new to programming mobile applications for Android.

I am trying to build an app that has its user's log in info, and some other info stored in the cloud. The data will not be shared between client apps, but I need it to be available for a main computer to access it, if necessary.

I was wondering which service will be simpler to implement and use in this case: Cloud SQL or the Datastore API? I read this thread (Deploying database on google cloud storage in Android application) and it was very helpful, but regarding my problem specifically, which service would be better?

My first though was that cloud SQL would be a better fit (but please tell me if I am wrong). So I searched a little bit more about the service (https://developers.google.com/appengine/docs/java/cloud-sql/) and found the following sentence "An App Engine application must be in the same region (either EU or US) as a Google Cloud SQL instance to be authorized to access that Google Cloud SQL instance.". I think I don't fully understand how I can choose my App Engine Application region, but I am in South America, would that be a problem? I know that probably by default the cloud SQL will be in US... This thread is related to this topic: Using Google Cloud SQL with App Engine

Thank you very much for the help!

Upvotes: 2

Views: 524

Answers (1)

rdodev
rdodev

Reputation: 3192

I don't think it really matters wheather you choose cloud sql or data store for simple user metadata management. Just bear in mind that app engine data store is no-SQL (think Cassandra) and CloudSQL is more or less managed MySQL service.

If you need to access the data from completely outside your app, CloudSQL would make more sense since all you need is access to the CloudSQL instance. If you do not need to access from outside the app (and you don't need your db to be ACID), then app engine datastore is advisable since it makes models and data handling more straight forward.

As for regions, if you start an app and you are a premiere customer ($$$$) you can choose to deploy the app in EU or US. If you're not a premiere customer, your app, by default, will be deployed in US servers. So, if you do decide to go the CloudSQL route, spin your instances in the US region, which is the default anyway.

Upvotes: 4

Related Questions