DB API on Google Cloud (App Engine etc.)?

The API formerly known as Tera-WURFL
alexkerr
Posts: 2
Joined: Tue Sep 30, 2014 10:11 am

DB API on Google Cloud (App Engine etc.)?

Postby alexkerr » 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

Elliotfehr

Re: DB API on Google Cloud (App Engine etc.)?

Postby Elliotfehr » Tue Sep 30, 2014 6:17 pm

Alex,

I am not too familiar with Google App Engine myself, but am discussing with the engineering team to let you know what will be possible.

I will let you know as soon as I have an update.

Thank you,

Elliot

alexkerr
Posts: 2
Joined: Tue Sep 30, 2014 10:11 am

Re: DB API on Google Cloud (App Engine etc.)?

Postby alexkerr » Wed Oct 01, 2014 11:01 am

Thanks Elliot, much appreciated.

Alex

Elliotfehr

Re: DB API on Google Cloud (App Engine etc.)?

Postby Elliotfehr » Mon Oct 06, 2014 4:11 pm

Alex,

This should definitely be possible with a few configurations. You should be able to connect to your NoSQL database as well as your memcache pool by passing your host and credentials in TeraWurflConfig.php.

Since the application will not have the ability to write to file, I would recommend raising the log level to `LOG_ERR`, which will reduce how often the application writes to the log. If you would like to write the log to your Cloud Storage, you will need to modify the file location in TeraWurfl.php to write to your Cloud Storage instance.


Elliot


Who is online

Users browsing this forum: No registered users and 2 guests