PHP Will Soon Be Native on the System i5
April 3, 2006 Timothy Prickett Morgan
Decades of computing has not in any way diminished the number of different programming languages in the world, which is a bit astonishing when you stop to think about it. There is always a new type of job that comes along, and more times than not, a new programming language evolves to do that job. So it is with the PHP language, which is arguably one of the most popular languages in use out there on the Web. And very soon, as we told you last year, you will be able to get it for your System i5.
And, for free. Yeah, free. But, you are going to have to wait a little bit longer than you might like to get native PHP on the System i5 platform.
This week at LinuxWorld, IBM, the owner of the System i5 hardware platform and the i5/OS software platform, and Zend Technologies, will preview a native implementation of the Zend Core platform for running PHP and the Zend Studio development environment for creating PHP applications, one that understands the iSeries and knows how to talk to DB2/400 and the Integrated File System. The techies in the IBM Rochester labs have been pondering how they might support PHP natively on the iSeries (now the System i) platform for more than a year. IBM and Zend announced a partnership in February 2005, which sought to integrate the commercialized PHP engine, which is called Zend Core, with IBM’s Cloudscape open source database as a development environment that spanned IBM’s server lines. But Cloudscape is not a deployment database except for perhaps some embedded applications, and for commercial applications, you really need an industrial-strength database like IBM’s DB2 8 or DB2/400 or Oracle‘s 9i or 10g. The Zend Core for IBM product, which IBM and Zend committed to bring to market last year, also has hooks into DB2, and that is why many of us suspected that IBM would eventually get around to bringing PHP to the iSeries.
(For a history of PHP and how it is different from and similar to other languages, see PHP is Almost Certainly Coming to the iSeries from the April 4, 2005, issue of this newsletter.)
“PHP has rapidly become the most heavily used scripting environment,” says Gerstel. And he ain’t kidding. In 1997, PHP 3 was created, and this was arguably the first usable implementation of PHP. In 1999, there were about 1 million domains using PHP, and by 2000, that number exploded to 5 million domains. By 2002, search engine and online store operator Yahoo standardized on PHP for parts of its site applications, and that was a watershed event that helped push PHP onto 10 million domains. When PHP 5 was launched in 2004, that number grew by 50 percent again to hit 15 million domains, and with the delivery of commercial-grade PHP 5 in the Zend Core platform, PHP has been able to maintain its growth to hit 22 million domains, or about half of the public Internet, but its growth has hit a plateau, as you can see from this chart on the open source PHP project’s Web site. There are about 78 million registered Internet domains in the world, and about 37 million active domains that actually have a Web server pushing out pages. PHP’s presence on the Internet, even if it only holds steady, is nothing short of remarkable.
Ever since IBM embedded the PASE AIX runtime environment inside OS/400 and offered support for Linux and then AIX on the iSeries server inside logical partitions, customers have been able to add a PHP engine to their iSeries boxes. But being able to run open source PHP is not the same thing as having commercial-grade support for something that your business is betting on, and it is certainly not the kind of integration that OS/400 shops have come to expect. Zend has built a business providing commercial-grade tools for PHP.
IBM and Zend are working to bring four different products to market that related to PHP. The first is Zend Core for i5/OS, which is the hardened version of the open source PHP runtime environment that has been tweaked to install to specific platforms like Linux, Unix, or i5/OS. Zend Core also includes the hooks into various database features, and for Zend Core for i5/OS, this will include native access to DB2/400 as well as to data queues and data areas inside i5/OS. According to Andi Gutmans, the vice president of technology and a co-founder of Zend (he is the “nd” in Zend), IBM is working on bridges that link PHP to RPG and COBOL applications; the functionality for linking to DB2/400 databases and talking to the Apache variant of the Web server deployed on the System i5 server is already done. This work for link to RPG and COBOL applications is what is pushing the delivery of Zend Core for i5/OS to June 2006.
The second piece of the Zend stack that is coming to the System i5 is called Zend Studio. Zend Studio 5, which uses the latest PHP 5 language, is the integrated development environment that started shipping in December 2005. According to Gerstel, Zend now has 25,000 developers using the Zend Studio tool, and the company very much wants to add programmers at OS/400 shops to these ranks. Zend Studio for i5/OS will be available in June as well.
The interesting thing about this is that IBM and Zend will be distributing it for free to all customers who buy System i5 machines. “Everyone will get a free entitlement to the runtime and Zend Studio,” says Mike Smith, chief software architect for the System i product line. “We want everyone to know that the System i is the best platform to run PHP.”
Not all Zend software will be free on the System i line, of course, because Zend has to make money somehow. There are two other pieces of software that Zend is porting to the System i. The first is Zend Platform, the production PHP runtime environment that includes clustering and performance tweaks to make PHP applications more peppy and more resilient. Zend Platform is expected on i5/OS by the end of the year, according to Gutmans. And so is Zend SafeGuard, which is a program that obfuscates the open source PHP code in a commercial environment so no one can see the PHP as it is being rendered in a working application.
You’ll get a kick out of this: Zend SafeGuard has an encoder that compiles PHP down into an intermediate binary file and then an optimizer that allows the PHP engine to run these files. The idea is to prevent reverse engineering of PHP code for applications that companies do not want to make open source. (While PHP is an open source project, there is nothing in the PHP license that says applications you create using PHP have to be open source.) The optimizer also allows software vendors and in-house shops to tie PHP applications to specific servers, to a certain number of concurrent users, to a certain length of runtime, or a particular subset of a network. All of these features are useful not only for software licensing, but for software as a service (SaaS) products. The kick I said you would get out of SafeGuard is this: On the OS/400 platform, RPG and COBOL are also rendered in an intermediate code form as well as completely binary form, and that intermediate form is the abstracted code that has allowed RPG and COBOL to be moved from different underlying IBM midrange hardware over the past three decades. When you move your RPG applications from one machine to another, if the hardware is radically different, this intermediate RPG code is compiled by the system the first time it runs so it matches the specific hardware you have. If you move to another hardware platform in three years, i5/OS keeps this intermediate code around, where you can’t even mess with it, and moves it over and does the same thing again. This is genius. To the outside world, it just looks like the old RPG application is running on the new platform. PHP is an interpreted language–at least for now–but if it becomes a compiled language in the future, which it might if single-threaded server performance hits a wall, then this intermediate code might be the thing that keeps PHP portable even though it is compiled.
Zend has not set pricing for Zend Platform for i5/OS or Zend SafeGuard for i5/OS. On Linux boxes, Zend Platform costs $1,400 per processor per year for a subscription model and $2,880 for a perpetual license. Zend Core for IBM, which has tweaks for IBM’s servers running Linux, costs $295 per year for up to ten servers. Zend SafeGuard comes only as a subscription that costs $960 per year; programmers can encode and run as many applications as they want, and after the subscription expires, PHP applications will still run but the system will not allow any new encoding of new applications.
One last thing. This is a multi-year agreement between IBM and Zend, and it is the first technology in a long time that IBM has brought to market that is hot and new as well as native to OS/400 or i5/OS. While having Linux or AIX support on the iSeries was great, what IBM needs is to make i5/OS more relevant to new and existing customers and less dependent on the green-screen software tax. This is a step in the right direction to do that. However, putting PHP support up there alongside Java as an equal (of sorts) to RPG and COBOL on the OS/400 platforms has its problems. For one thing, the network of tool providers who make a living in the OS/400 ecosystem might not be welcoming Zend with such open arms.
We will be talking to them about that very topic in a future story.