Developing PHP on Microsoft Azure

As mentioned in a previous post I’ve been at EclipseCon (the annual conference for the Eclipse Open Source Development tool platform, where the Open Source community gathered to discuss how to build the tooling that will allow us to build and target applications directly at the cloud, without concern for the underlying infrastructure.

The key issue is interoperability – are we building applications for The cloud, or for A cloud? For application servers (or indeed .NET)  as discussed in our previous piece, the application level APIs need not significantly change, the set of services provided by the application server is transparently provided in the cloud. Applications written in languages such as PHP that hitherto had run in a web server directly against the operating system (rather than in a container) could be extended to access services inside the Application Server or the .NET framework.

However, since there is a broad consensus about the cloud architecture, interoperability for languages like PHP can be achieved through a fairly simple set of APIs that would allow applications to access scalable storage (as BLOB, REST or Queue), and to deploy/provision applications.

However, whilst there was a momentum around standards at this level in the Fall of 2009 (the simple cloud API and VMWare‘s vCloud), these initiatives seem to be stalled. Now, since the introduction of SQL into the mix of standard cloud services (SQL Azure and Amazon RDS), interoperability across the broad range of cloud APIs may be unattainable, because it would imply a resolution between MySQL and SQL Server which is simply impractical.

That said, you can at least run MySQL in Microsoft Azure, and then use PHP to access that. This means you can run widely-used software such as WordPress in Azure, so we could run The Virtualization Practice website in there.  We don’t.

In a strange twist of the Open Source community model, Microsoft is actually paying a small French/Chinese company called Soyatech to create the open source plugins to Eclipse to make PHP run on Azure, and this (rather than Visual Studio – where you can also buy PHP technology from a third-party, Jcx Software) appears to be the preferred IDE for PHP on Azure.

Like most of the tooling in this space it isn’t quite seamless: there’s a bit of command-line stuff  (that Eclipse kind-of hides away in a box somewhere).  This was actually created separately by a Belgian company called RealDolmen (again funded by Microsoft) and is available on Codeplex under a BSD license. It creates a few files that are uploaded to Azure, and contain enough config information to deploy your application, as well as all the PHP run-time libraries that Azure is expecting, and that you use to access Azure services for data persistence etc. (and optionally SQL Server). Then there is horizontal scalability in the mid-tier through load-balancing behind IIS, and there is even additional distributed caching from memcache to make the server perform better. For development you can use the Development Fabric on your local machine.

If you want to see the details on how to do it look here.

We have made a comment previously that Microsoft is playing a more open game than in previous market entrances, and by funding a third party, it has been able to contribute the pieces to Eclipse to allow you to deploy PHP applications quickly and easily to the cloud from inside the development environment.  There is also a cost/risk mitigation decision here. Tools sell run-times, but are increasingly hard to make money out of. Direct support for PHP in Visual Studio would sell very few extra Visual Studio licenses.  It might sell a few more Azure hours, likely not enough to pay for its development and maintenance, and so by funding a small partner development effort in SDKs and Eclipse plugins, Microsoft rounds out the Azure offering and leverages a mature development tool in Eclipse, without getting its hands dirty with Open Source software.

Posted in SDDC & Hybrid CloudTagged , , , , , ,