The triumph of the lamp

It is human to feel satisfaction when one’s predictions come true. To predict the success of LAMP in 1998 wasn’t that difficult, but neither was it a no-brainer.At the time, the acronym had just been coined by the German c’t magazine and it wasn’t widely known in the corporate world. LAMP stands for Linux-Apache-MySQL-PHP, a set of open-source software that powers web servers with dynamic content. Occasionally, the ‘P’ in LAMP is switched for Perl or Python, although PHP is now by far the most popular scripting language.

carbidelamp.jpgI remember having suggested a LAMP architecture for the implementation of a geo information system and extranet for a large government organisation in 1998. This project was on a tight budget, so I proposed to invest the resources into software development rather than into hardware and licenses. LAMP seemed ideal for it. However, the committee was utterly surprised that the word “Microsoft” did not appear in the proposal and they did not seem to put too much trust into any of the letters of L-A-M-P.

Luckily, another of my then customers was more open to the suggestion. A mid-sized logistics company was looking for new way to do business on the web. Since the company wanted to run their own servers, the LAMP stack offered a perfect solution to do this cost efficiently. It turned out to be foresighted decision. LAMP quickly gathered momentum on the Internet and soon became one of the mainstream web development platforms.

One has to keep in mind that the four pieces of software that make up LAMP have not been designed as a unified platform. On the contrary, they have different histories, and they were not specifically developed to work together. This is what distinguishes them from their competitor platforms ASP/.NET and Java/J2EE.

Let’s briefly go back to the year 1998. It was the time of the browser war and the boom. The Internet then consisted of about 5 million websites, which is less than one tenth of today (2005). Linux was at kernel version 2.8.x, Apache was at 1.3.0 and the Apache Software Foundation was not yet founded; MySQL was at version 3.21, and Andi Gutmans and Zeev Suraski just released the crucial PHP3 release.

Linux and Apache were already strong at the time. Linux was fairly mature OS with a userbase of 7.5 million in 1998. Torvalds had just trademarked the Linux name and the corporate world started to take notice. The Apache web server -originally developed as an extension of NCSA httpd server- already commanded 50% market share. MySQL and PHP, on the other hand, were new kids on the block. PHP had a userbase of only several ten thousand users and MySQL was widely considered a toy database.

The combination of these products, however, did one thing extremely well: powering dynamic websites. Plus they were free. Anyone who wanted to run a web server could use them without paying a single cent for license fees. Although MySQL and PHP had several limitations at the time, it did not really matter for the purpose of serving web pages. MySQL delivered impressive performance and PHP 3 was “cleaner” and easier to program than Perl. Thus the LAMP stack offered a killer platform for web applications.

Today, the quartet is more successful than ever. Apache powers 70% of all web servers. MySQL is the most widely used database on the Internet. It has matured into a full-featured RDBMS with transactions, replication, clustering, and (as of 5.0) stored procedures, views and triggers. PHP is now installed on 20% of all Internet sites. It fully supports the OOP paradigm and it has grown an extremely large function library that makes programmers feel like boys in a candy store.

What is behind the success of LAMP? In the case of Linux and Apache this is fairly easy to tell. They are both free and they offer excellent performance. You can easily pack 50 to 100 low traffic web sites onto a commodity PC. This makes Linux + Apache very popular with hosting companies who take advantage of the low cost of ownership. Furthermore, it allows service providers to customize the server’s configuration and administration model and apply it to an arbitrary number of cheap boxes which translates to arbitrary scalability. Hosting companies love it.

The case is slightly different with MySQL and PHP, because their growth is driven mainly by developers rather than by hosting companies. From the start, MySQL was geared towards web applications, which means its main strength is concurrent reads. Besides, it is easy to use and administer. PHP has become the scripting language of choice because its learning curve is almost zero, which means that programmers can be productive with PHP from day one. In addition, PHP is integrated very well with Apache from a very early time. It uses resources efficiently and avoids the CGI model and its known security problems.

All of the LAMP components originated around 1995 or before, which means that all of them recently passed their 10th birthday. LAMP can now be considered a mature architecture. The case of LAMP proves that using an open source platform is not like buying a pig in a poke. It proves that open source gets the job done, and -in the case of web servers- that it does the job better than anything else.

Terabyte hard disks on the horizon

The first computer I bought almost exactly 20 years ago had a disk capacity of 720 kB. It was provided by a so-called high-density floppy drive. Somewhat later I added a 40 MB hard disk in 5.25” installation size, which was absolutely lavish for a home computer. Today (mid 2006) the largest commercially available hard disk has a capacity of 750 MB which is roughly one million times that of a 720 kB floppy, or twenty thousand times larger than my first hard disk. The current street price for a 750 GB hard disk is at $400 USD.

This development shows that the 1024 MB hard disk is around the corner and we will soon have to get used to another SI unit called terabyte. In fact, the SI quantity “tera” is misused here, since it refers to the decimal power 10^12, or one trillion, whereas the number of bytes on a terabyte hard disk is actually the power of two 2^40, which amounts to 1,099,511,627,776 bytes.

The IEC has devised the cute sounding name tebibyte for this number in conjunction with gibibyte, mebibyte, and kibibyte for the lower binary quantities. The IEC denomination turned out to be not very popular, however. Have you ever heard anyone speaking of a gibibyte hard disk?

The etymology of the SI quantity specifiers is likewise interesting. They all go back to the Greek language. “Kilo” originates from the Greek khilioi meaning thousand, “mega” comes from the Greek megas which means great or mighty; “giga” or Greek gigas meant giant, and finally tera is the Greek word for monster, which is probably an apt description for a hard disk that large.

Before the monster disk becomes available, there are some technical challenges to master, in particular the challenge of the superparamagnetic effect. The industry’s answer is currently perpendicular recording which aligns bits vertically to the disk surface.

An even newer technology -currently in research state- is heat-assisted-magnetic-recording (HAMR), where a laser beam or a similar energy source heats the disk surface while recording bits. This reduces the required strength of the magnetic field and magnetisation can thus be achieved at a higher density.

There is a problem, though. The disk’s lubricant unfortunately evaporates at these temperatures, which is why the industry is now researching self-lubricating disks that use embedded nano tubes to store replacement lubricant. This technology would allow multi-terabyte hard disks to become a reality. This is probably just a few years away from us.

Freebie of the month: Picasa

This week’s free software is not exactly a newcomer. The digital image management software Picasa was purchased by Google two years ago from its original manufacturer. Since then it is offered by Google at no charge: I stumbled upon Picasa when I was looking for an easy-to-use image manipulation software for my parents who have recently bought a new digital camera. Easy-to-use was the keyword, and it seems to me that software cannot get much easier than Picasa. Granted, the image manipulation features are not very powerful, nothing compared to Photoshop, Gimp, or Paintshop, but they provide all the essential hobby photographer functions, such as contrast, colour, crop, straighten, crop, and red-eye adjustment, as well as a number of filters including sharpen, B&W conversion, saturation, tint, etc. The real power of Picasa, however, lies in its image management features.

The software makes it extremely easy to create and manage large image libraries. You can easily find images, copy and send single images, and keep track of new additions. The user interface is polished and innovative; it has a definite Mac feeling. The full-screen slide-show and time-line viewing functions are great. Perhaps the best thing about Picasa are its one-button features. By clicking a single button, you can export a selection of images to a web page, send images as an email attachment (Picasa resizes them automatically), print images or order prints, create a photo collage, or create a gift CD. In addition, Picasa provides functions for exporting photos to an online blog at Google’s service, or adding photos to the Picasa Web Album, likewise a Google service, which allows you to create and share photo albums.