Friday, November 30, 2007

Pear Channel on GoogleCode

I recently devised a way to host a Pear Channel on GoogleCode.

What is Pear?

Pear stands for PHP Extension And Repository. It consists of well, you guest it, extensions and a repository for those. The beauty of Pear comes from its managed installation process: one can easily upgrade PHP Extensions using the services of Pear. For those not yet acquainted with PHP, you can consult the official PHP site.

Why GoogleCode?

The reasons I wanted to host a Pear Channel on GoogleCode where simple:

  • Low cost: GoogleCode Project hosting is free
  • Capacity: 100MB of storage per project
  • SVN access
  • Bandwidth

Challenge #1: Pear documentation

In general, the documentation related to the Pear Extensions themselves is good. What was lacking in this instance was the documentation on the REST interface. I had to reverse engineer the PHP code of Pear as well as well as tear apart the Pear’s WEB site REST repository.

Challenge #2: Pear bug

Pear is a marvelous tool to say the least but in the case at hand here, a bug slowed me down quite a bit. The Pear installation tool can’t process files of MIME type ‘text/plain’ when served with HTTP-compression Transfer-Encoding (see the standard). This is quite annoying as by default GoogleCode Apache servers do serve those files transfer-encoded using the ‘chunked’ method.

I have filed a bug report on this issue here.

The Quick Fix

The quick fix, whilst waiting for Pear v1.7.0, is to set the MIME-type of the text files required by the Pear REST interface to ‘application/gzip’. This effectively fools GoogleCode into believing that the said files are already compressed. This trick forces GoogleCode servers to send the text files without further transfer-encoding.

Presentation

I have also done a presentation on this subject: Pear Channel Presentation on GooglePresentation .

Downloadable Personal Computer

With the advent of virtualization technology such as VMware & Xen, we are nearing another revolution: the Downloadable Personal Computer.

Is the concept far fetched? Consider the following:

1- Virtualization technology makes it possible to run any operating system (OS) on any (decent) personal computer

2- Linux distributions such as Ubuntu and Fedora have now matured to the point where normal people can use these OS’s for every day tasks such as email, WEB browsing and media playing

3- Distribution: the packaging of the Downloadable Personal Computer can easily follow a model akin to JumpBox’s

The result

a) Joe Bloe walks (or surfs or course) to his favorite PC hardware store and buys a Customizable Personal Computer (i.e one on which you can have a Downloadable Personal Computer)

b) Joe Bloe surfs to his favorite Downloadable Personal Computer WEB site and customize his very own PC: he chooses his OS, browser, Music & Video player etc.

c) Joe Bloe downloads a copy of his customized PC

d) Joe Bloe installs his customized PC

Windows’ reign drawing closer to its end

What else does it take to free ourselves from Windows’ reign? Not much still: BIOS manufacturers have progressed to the point where the booting stage of a PC is much more controllable & customizable. The final step is to include a virtual machine player (such as VMware’s) on the motherboard and voilĂ  !