There is something nice about Google’s App Engine. Deployment to the GA cloud is done through a desktop application, the database schema is mutable and the environment scales to meet any load. The developer deploys the app without the mess of custom built scripts and server administration. The only downside to Google’s product is the choice of programming language. At Spafax, we use PHP almost exclusively for web development. To switch to either Python or Java would be impractical and expensive.
The database model is not expected to grow past 10 models. There would not be a need for complex queries. There is, however, a need for performance as any web-based service naturally suffers from latency of the network.
Out of the needs grew the following check list:
- Push of a button deployment: we are not a big team
- NoSQL-style DB for persistent data storage: there will be few joins
- File hosting: serving static content is a plus
- Custom domains: this is a must
- Supports PHP development: our team is uses primarily PHP
- Production ready: no services in Beta
- Easy enough for a junior developer: setting up a local environment should be fast and easy
Following is a list of solutions I found that meet at least some of the features above. Each solution is evaluated based on available documentation, not on experience.
AppFog is the most mature PHP cloud host. Their free server includes 2GB of memory and 512MB of storage. Prices quickly escalate to $100/month for 4GB of memory and go up from there.
AppFog includes a versatile command line tool. With the command `af`, a programmer can deploy, start and stop an app. She may also check the crash logs, boot additional servers and much more. A full list of features is available at the support section of their site.
Unlike Google’s App Engine, AppFog does not come with a proprietary framework. This is both a blessing and a curse. Though you can use any PHP library or Framework, I was looking for a service with tight integration between the code and the storage mechanism. Otherwise, the ease of development is reduced by having to install a local MySQL instance.
A huge setback is the database MySQL and PostgreSQL are there, so is MongoDB. Though MongoDB is a schema-less solution, recent blog posts have pointed some of its immaturity. The other two database solutions can be made almost schema-less with RedBean, but it would still require configuring a local instance of MySQL.
More at AppFog.com.
Next up is Zend’s own PHP cloud. Though it is promising, given the Zend name, the service is in beta and does not consider itself a product environment. Instead, Zend expects you to develop and test on their cloud, then move the code to a production-ready environment.
More at PHPCloud.com
At first glance, Orchestra seems like another virtual host provider. It enables easy project initialization and publishing via Git. The free application provides a MySQL database but no storage.
Orchestra is probably the closest to our needs. However, once again, the MySQL database solution is a setback as configuring a MySQL instance for every developer seems like a hassle.
More at Orchestra.io
Microsoft’s Azure service is an unexpected entry in the cloud PHP provider list. Their service offers the standards MS stack of development tool and support for some open source technologies. Specifically, Azure includes PHP with an API to their unstructured storage mechanism called Azure Storage.
Azure offers publishing via Git.
Unfortunately, the Azure Storage emulation environment is limited to Windows 2008 servers and as we are a Mac-only shop, this limits our ability to develop on that platform.
More at windowsazure.com
AppEngine with Quercus
The final contestant is AppEngine. It does not support PHP natively but with the help of Quercus, PHP can be interpreted by the JVM. This way, PHP has access to the full Java library provided by AppEngine.
Though this solution is very appealing, going through another programming language takes something away from the ease of building PHP applications.
More on Quercus
Though many services now offer easy deployment of PHP applications and dynamic scaling, most fail to make the distribution process invisible. Setting up a local sever and MySQL (or MongoDB) instance is still necessary, so is maintaining MySQL migration scripts. You can sidestep assist with most of the problems using tools such as MAMP or RedBean but, ultimately, no environment will satisfy all of our needs the way AppEngine could in Python.
In a future post, I will discuss the decision I took and the tools I used.