Demystifying The Code

Working with Azure Table Storage from PHP

Introduction

Windows Azure Table Storage is a non-relational structured storage system in the cloud that offers massive scalability, durability and high availability.  The service is exposed with a RESTful API.  As such, it is easily consumable from a variety of platforms, including PHP.  In this post, I will illustrate how to consume Azure Table Storage via the RESTful API.  It is important to note that on July 31, 2009 we will reach Milestone 2 on the PHP SDK for Windows Azure.  Milestone 2 focuses on support for Azure Table Storage.  Accordingly, in all of the code you see in this blog post and the accompanying screencasts (Part I and Part II) illustrate accessing Azure Table Storage the “hard way”.  Much of the work I had to do by hand in the accompanying example here will be taken care of for you by the SDK.  That said, let’s dig in…

[ Read More → ]

Hosting a PHP Application in Windows Azure

Introduction

At MIX ‘09 we (Microsoft) announced support for FastCGI in Windows Azure.  FastCGI allows us to host applications like PHP both safely and performantly (warning – performantly is not a real word).  In this post, I will begin with a very brief overview of what Windows Azure is and why you might consider hosting your PHP apps on Windows Azure.  I will then provide you with a couple of resources that you can use to easily publish your PHP application to Windows Azure, including a link to a screencast I created that illustrates just how to publish a PHP application to Windows Azure.

[ Read More → ]

PHP and IIS: Running PHP under Fast CGI and Url Rewriting

Introduction

You can run PHP (as well as other CGI apps) on IIS7 with high performance and reliability thanks to FastCGI.  CGI is a protocol that defines how web servers launch an executable resulting from a request, pass it arguments and return the dynamic response.  You have been able to host CGI applications in IIS in the past, however there have been challenges prior to FastCGI.  As it turns out, the challenge is that there are certain modules (in PHP, for instance) that are not thread safe.  For that reason, IIS traditionally spun up a new process for each request.  This provided the reliability necessary in the face of non-thread-safe modules.  However, the performance suffered due to the cost of spinning up all of these processes.  Enter FastCGI.  It guarantees that each process will handle 1 request at a time (providing the reliability), but it allows for process reuse by maintaining a pool of processes.

[ Read More → ]

Demystifying The Code