Tuesday, November 15, 2011

Experimenting with Google Cloud SQL

I received a beta invite today and had some time to read the documentation and start experimenting with it tonight.

First, the best thing about Google Cloud SQL: when you create an instance you can specify more than one AppEngine application instances that can use it. This should give developers a lot of flexibility for coordinating multiple deployed applications that are in an application family. I think that this is a big deal!

Another interesting thing is that you are allowed some access to the database from outside the AppEngine infrastructure. You are limited to 5 external queries per second but that does offer some coordination with other applications hosted on other platforms or host providers.

Their cloud SQL service is free during beta. It will be interesting to see what the cost will be for different SQL instance types.

It was very simple getting the example Java app built and deployed. I created a separate SQL instance (these are separate from other deployed AppEngine application instances), made a new IntelliJ AppEngine project, pasted in the example code, and it all worked.

Perception of quality is often influenced by price. Since developers now have to pay more for using AppEngine, I find myself looking more at AppEngine as a premium service, which it is. Despite my dislike for MySQL (I use PostgreSQL when given a choice), Google's hosted and managed MySQL cloud data service looks good and provides developers with more options. Their SQL service is synchronously replicated between data centers automatically for you.

It has been a few years now since I had to either set up a physical server or a leased raw server for any deployments. I like that! Thank you Platform as a Service (PaaS) providers like Heroku (built on AWS) and AppEngine - they are the future. I still do a lot of work on "plain AWS" but that is still much more agile than provisioning my own servers.

4 comments:

Saqib Ali said...

Mark,

I have been experimenting with the Cloud SQL as well for the last few weeks. It is major step in the right direction. App Engine lacked a RDBMS, and now Google is filling that gap.

However, for my RDBMS driven apps, I still can't use App Engine, because I can't connect to the Cloud SQL instance from outside of the app engine. Ability to feed data from outside is key to my application. I can probably write a REST service on the app engine to accept and store the data in Cloud SQL, but that would be extra work, and sometimes impossible because the third party apps that are feeding data into my app may not support REST at all.

Hopefully Google will allow external connections in the near future. Until then, Amazon RDS is the way to go for me.

Saqib

Mark Watson, author and consultant said...

Hello Saqib,

After reading your comment, I installed the SQL command line tool: https://code.google.com/apis/sql/docs/commandline.html

This does give me a command line interface to execute interactive SQL queries from my laptop at home. It took a few minutes to get the "Authorization Code" set up for external access.

The command line tool is a JAR containing compiled class files, but no source code. Perhaps Google will release the source code.

There must be a workaround, or even a clean way to get remote access from, for example, a Java application running on an external server (or our laptops).

-Mark

Saqib Ali said...

Mark,

I have tried the command line interface as well, and I agree. It should be possible to Google Cloud SQL from outside of the App Engine. Google should either open source that JAR or make it into a service/library that other apps can utilize.

Personally I would prefer REST SQL APIs for the Cloud SQL, similar to what Google provides for Fusion Tables.

Saqib

Alaa Ellethey said...

there are a simple solution for this issue by using eclipse with Google plugin install, you can use the Data Source Explorer with Google SQL Driver, you can connect to your cloud instance and edit what ever you need