When you consider the cloud, you typically imagine a realm of deployed, production applications. Zend Developer Cloud (ZDC) adds a twist: ZDC creates a place in the cloud where PHP-based applications can be developed for the cloud. No more developing locally, then deploying into the cloud, ZDC pushes both into the ether.

If that were all it did, ZDC's utility would be questionable. However, it offers benefits that are not at first apparent, but warrant a closer look.

Zend Server and MySQL

Zend Developer Cloud is hosted on Amazon Web Services, but hides the underlying Amazon infrastructure. Register with ZDC, and you are given a "container", a sandbox that hosts the execution of the applications you are developing. You can think of it as a virtual system, to which is allocated memory, disk, networking, and CPU resources. Specifically, a container is permitted approximately 300MB of memory, 500MB of disk space and about 2TB per month of network bandwidth. The CPU allocation is specified in throughput consumed by database operations, about 200MBps.

Naturally, a ZDC container is also equipped with software services. This being Zend Technologies, it's no surprise the container includes a PHP runtime, an instance of Zend Server (the full-fledged enterprise edition), and an instance of MySQL Server. Actually, it is more accurate to say the container has access to a MySQL Server instance. The capacities that a container can command from the MySQL instance are limited. Although you can create as many MySQL tables as you wish, you are limited to a single schema. Currently MySQL is the only database option, but support for MongoDB and others is likely to follow.

Zend Server is a web application server augmented to support both the development and deployed execution of PHP applications. It is available in community and nonfree editions, both of which provide useful addons that include a general-purpose data cache, an execution optimiser that caches precompiled PHP byte code, a debugger and more.

The enterprise edition adds to these an event monitoring system that lets you log the details of out-and-out errors (such as database errors), as well as potentially dangerous conditions (such as unusually high memory usage, slow query execution and more), exceedingly useful in postmortem analysis. The enterprise edition also provides code tracing that can produce a profile of code execution paths. You can configure profiling to be triggered by specific events (for homing in on a particularly suspicious method) or enable profiling for the whole application. Developing your application in Zend Developer Cloud gives you all the advantages of a full-blown Zend Server installation.

These components are bonded together by what is referred to as the Zend Application Fabric. The Fabric is a PHP-friendly runtime environment that includes, in addition to the services already described, the Zend Framework as well as failover, load balancing and scaling capabilities that provide cloud-friendly elasticity with minimal management overhead. Here, however, you find there are differences between the Zend Application Fabric of the ZDC environment and the Zend Application Fabric in a deployment environment.

The Zend Application Fabric is already available through cloud providers that have partnered with Zend. These include RightScale, Amazon, IBM and Rackspace. In those deployment environments, the Fabric provides load balancing and scaling as described above. For example, you can configure your cloud application so that when your application's CPU or memory usage reaches 80 percent of a prescribed ceiling, another runtime instance is launched to shoulder some of the load.

Zend has defined a set of default parameters to control scaling behaviour. If your application's execution profile fits the default, you are relieved of having to tune any runtime controls. Nevertheless, if you know that your application's load may ramp up quickly and you want to launch new instances well before maximum capacity is approached, you have the option of adjusting the parameters away from their default values.

These capabilities are available now, but only in the deployed form of the Zend Application Fabric. Keep in mind: When working with the Zend Application Fabric of the ZDC, you're working with a runtime environment that, from your application's perspective, is functionally identical to the deployed version but behaviorally different. Your application will not be aware of any difference between the Fabric running in ZDC and the Fabric running on a deployed system, but the ZDC's Fabric does no scaling. The Zend Developer Cloud is strictly for development and testing.

Container management

 You control your container via three management consoles, all available from an administrative home page associated with the container. For administering your MySQL database tables, you can launch the browser-based phpMyAdmin application. Anyone who's done any work with PHP should be familiar with phpMyAdmin, so I'll say no more of it here other than it's as straightforward and serviceable a tool for managing a SQL database as you'll find.

Also on your admin home page is a link that launches the Zend Server management console, where you can set the events that your container's Zend Server instance will log, configure code tracing, view already captured event logs and code trace files, view a history of applications that have executed on the server, turn server features on or off (such as optimiser, debugger or caching), and much, much more. Management of a Zend Server is a complicated enough subject to warrant an article to itself (interested readers can find more at the Zend Product Documentation page).

Zend Developer Cloud

To code your PHP application, you can use Zend Studio, Eclipse PDT or any IDE you want, though life is easier with Zend Studio. For instance, Zend Studio allows you to set up a development project with phpcloud.com as the deployment target.

Your ZDC home page is a sort of management console all to itself. From there you can change your container's name, reset it (which deletes all applications from the container, returning it to the state just after its creation), alter passwords and add or remove applications. You can "push" your application into a ZDC container either via Git or SFTP (secure FTP). If you use Git, your home page provides a link to the Git server repository associated with your container.