DB API on Google Cloud (App Engine etc.)?
Posted: Tue Sep 30, 2014 10:42 am
I'm building a couple of PHP projects hosted on Google's Cloud products, specifically App Engine, Cloud Storage and Cloud SQL. I'm looking at getting Scienta's Database API (which I understand is what TeraWURFL became?) up and running on this, if at all possible. Anyone know whether this will work and any tips etc?
The main difference is that App Engine doesn't allow local file writes, but rather uses a file bucket on Cloud Storage to provide the equivalent. The only difference from a code point of view (AFAIK) is a very slight difference to the local file path (i.e. having "gs://bucket-name/[file or folder name]"). More info if it's of interest: https://gae-php-tips.appspot.com/2014/0 ... -concepts/
Cloud SQL is similar in having a minor change to the host path, instead of an IP, you use ":/cloudsql/[Cloud SQL instance ID]", the rest seems to be the same as a regular SQL installation.
Actually, given that the DB API supports Mongo, I wonder if it could instead use Google's Cloud Datastore NoSQL DB? (I would prefer this). https://cloud.google.com/datastore/
There's also a shared memcache pool (you can also pay for a dedicated pool) - does the DB API use memcache at all?
If no one's attempted using DB API on Google Cloud yet, are there any particular files/places in the code I should be looking to modify, or would changes be needed throughout?
Thanks for any suggestions/info.
Alex Kerr
The main difference is that App Engine doesn't allow local file writes, but rather uses a file bucket on Cloud Storage to provide the equivalent. The only difference from a code point of view (AFAIK) is a very slight difference to the local file path (i.e. having "gs://bucket-name/[file or folder name]"). More info if it's of interest: https://gae-php-tips.appspot.com/2014/0 ... -concepts/
Cloud SQL is similar in having a minor change to the host path, instead of an IP, you use ":/cloudsql/[Cloud SQL instance ID]", the rest seems to be the same as a regular SQL installation.
Actually, given that the DB API supports Mongo, I wonder if it could instead use Google's Cloud Datastore NoSQL DB? (I would prefer this). https://cloud.google.com/datastore/
There's also a shared memcache pool (you can also pay for a dedicated pool) - does the DB API use memcache at all?
If no one's attempted using DB API on Google Cloud yet, are there any particular files/places in the code I should be looking to modify, or would changes be needed throughout?
Thanks for any suggestions/info.
Alex Kerr