PHP
Article

Google App Engine and a Plea for Phalcon

By Bruno Skvorc

Let’s find out about Google’s recent embrace of PHP in Google App Engine, what it means for the PHP community, and how it can be improved even further if they add support for the high performing PHP framework Phalcon.

What’s Google App Engine?

Google App Engine (GAE) is Google’s cloud computing Platform as a Service offering on which users deploy web applications that live in Google’s data centers. This means any application we deploy in the environment automatically inherits the stability, interoperability, and scalability of applications such as Gmail, Google+, and more.

While a full discussion of GAE is outside the scope of this article, suffice it to say that GAE is neither a private server nor a virtual private server – it’s a platform. As such, it has some limitations. You cannot simply install extensions in it, nor can you write to disk freely. You cannot alter resource limits on your own and you cannot install custom system tools. It isn’t your average Linux box; it’s a fully managed colossal environment for enterprise-level applications.

GAE has been steadily rising in popularity over the past few years, especially for deployment of Python 2 and JVM language (Java, Scala, Clojure) applications, but only recently at Google I/O was it announced that PHP support was added due to community interest.

GAE deployment is free up to a certain point. If your app exceeds the free usage quotas, you can request a paid upgrade. It’s a pay-as-you-use model which works best for large scale high-performance applications. As such, optimizing your application and reducing the number of requests is absolutely essential. Not only does it help performance, but it literally saves you money.

Transitioning to Google App Engine

GAE’s filesystem is read-only. The only way to write something to disk (such as file uploads, cache, custom logs, etc.) is to either use an external service like a read-write CDN or use a virtual filesystem like as gae-filestore (more information is available in the Google I/O video linked above and here) or Google Cloud Storage. Furthermore, there is no such thing as a local install of MySQL/MariaDB or PostgreSQL. Instead, you have the option of using Google Cloud SQL (which is similar to MySQL but with limitations