First look: Zend's PHP developer cloud

Zend Developer Cloud woos PHP developers with enterprise-grade development features, snapshots for easy recovery and project sharing, and promises of single-click cloud deployment

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.

[ Also on InfoWorld: "Ruby clouds: Engine Yard vs. Heroku" and "4 Java clouds face off." | See if you can pass InfoWorld's programming IQ test, round 1 and programming IQ test, round 2. | Get software development news and insights from InfoWorld's Developer World newsletter. ]

At the time of this writing, the Zend Developer Cloud is still in beta. Interested developers can try it out at phpcloud.com. Access to ZDC -- during the beta phase -- is free. Anyone who takes advantage of this trial period will be able to keep a free account even after ZDC goes "live," which is anticipated sometime in early 2012. The live version will offer both free and paid-for accounts. Details of the differences between the two account types have yet to be officially specified, but the Zend engineers claim that anyone who has begun development work in the beta stage will lose none of that work when the system becomes publicly available.

Zend Developer Cloud: 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 (database). 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 add-ons that include a general-purpose data cache, an execution optimizer 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 (via Zend Server), 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% 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 behavior; 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.

Zend Developer Cloud: 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 optimizer, 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.)

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.

Before you create a PHP Web application from scratch and upload it to your container for testing, you might first explore Zend Developer Cloud's gallery of available PHP Web application templates, which could help jump-start your project. At the time of this writing, the gallery included eight templates, ranging from an empty PHP application to the well-known CMS platforms Joomla and Drupal, the blog platform WordPress, the Magneto eCommerce system, and the phpBB bulletin-board application. A single button-click will install the template into your container, saving you the time you'd spend downloading, unpacking, creating directory structures, and so on.

ZDC's snapshot capability is possibly its most powerful feature. Available from your ZDC admin page, the snapshot button lets you capture your container's current state. Snapshots are saved with an associated time stamp, as well as user-defined name and description.

The snapshot captures not only the file contents of your container -- that is, an image of your container's file system -- it also saves your container's configuration settings and database content. Consequently, the snapshot feature can be used as a backup or checkpoint tool. If you're about to make a substantial change to your application and you want to leave open the possibility to revert to an earlier version, take a snapshot. When the snapshot is completed, it appears on a list displayed on your ZDC home page. Next to each snapshot entry, you'll find a revert button. Click it, and your container's current content will be overwritten with that of the snapshot.

In addition, an URL is associated with every snapshot. If you need to share the work you've done with a cohort -- perhaps you need a friend to track a particularly difficult bug that's eluded you -- but don't want to put your development on hold while waiting for his or her assistance, you can send the URL to your friend and continue working while he or she executes the snapshot and diagnoses the problem. This, of course, requires that your friend also have an account with Zend Developer Cloud.

Finally, if you're doing development for a client and you've built several variations of a particular feature, you can take snapshots of each and email the links to your client, who can launch every version, compare the implementations, and provide feedback.

When you log into your Zend Developer Cloud account, you're taken to a management page. From there, you can access (among other things) the dashboard of the Zend Server instance associated with your container. Zend Server provides a wealth of configurable features, as well as excellent debugging and tracing capabilities.

Zend Developer Cloud: Compelling cloud development Security is always a concern when dealing with the cloud. That is no less the case here, though ZDC is a development system, not a deployment system. When you create a container, ZDC creates an SSH key pair, which you use to tunnel into your container for synchronizing your local copy of your application's source to the copy on the cloud. Nevertheless, there are plenty of news reports of compromised cloud services, and although we're certain the engineers at Zend have made every effort to protect ZDC, developer concern is not unwarranted.

As mentioned at the outset, ZDC is in beta, so pieces are missing. Some of the documentation is still under construction. For example, there is no information in the documentation concerning snapshots. How many can you take? Are they accounted against your disk storage quota? Do snapshots have lifetimes? More importantly, once you have your application working on ZDS, how do you move it to one of the Zend partners' sites? Not only is this information missing from the documentation, but deployment infrastructure is still under construction. We're told the Zend engineers are working on a simple one-button deployment from ZDC to a production system, and we hope it's available soon.

Much of what you can do in the Zend Developer Cloud is accomplished by assembling individual components yourself. ZDC's attraction is that it does much of that legwork for you. Add to that the enterprise-level instance of Zend Server and the ease with which you can take and share snapshots, and the Zend Developer Cloud is a compelling option for PHP developers.

  • Access to Zend Server's rich development features
  • Snapshot feature provides easy recovery and easy sharing of projects
  • Gallery provides easy installation of well-known PHP platforms
  • Documentation still under construction
  • Limited to one MySQL database (in the free version; might be different in paid version)
  • Simplified deployment scheme still to be worked out

This article, "First look: Zend's PHP developer cloud," was originally published at InfoWorld.com. Follow the latest developments in application development, PHP, and cloud computing at InfoWorld.com. For the latest developments in business technology news, follow InfoWorld.com on Twitter.

Read more about cloud computing in InfoWorld's Cloud Computing Channel.

This story, "First look: Zend's PHP developer cloud" was originally published by InfoWorld.

What’s wrong? The new clean desk test
Join the discussion
Be the first to comment on this article. Our Commenting Policies