Home
The LAMP Report
Steve Strickland, March 2007

LAMP

LAMP is the open source web platform consisting of Linux, Apache, MySQL, and PHP/Perl. The combination of these technologies is used primarily to define a web server infrastructure and to define a programming environment for developing software.

The selection of LAMP for our core technology suite was not made arbitrarily. It was made based on a number of criteria that I will attempt to explain in this report. The explanation is necessarily complex and I hope I can describe an essentially technical analysis in a non-technical way. The LAMP selection is a crucial issue. I have seen firms stumble badly by making poor choices in technology and I've fallen flat on my face a few times by investing my time and money in dead-ends.

I wish to develop a small, tight core of in-house tech skills common to the industry that can be relied on to do the job, no matter what circumstances may arise in the future. I do not want to be tied to any employee, vendor, machine, software, web host or any e-commerce package. I don't want the system to be dependent upon me or any other single person. I want total flexibility and redundancy top to bottom without the need to learn anything new. LAMP provides this.

LAMP gives us maximum security for an online system. Currently there is no more secure web server package than LAMP.

LAMP is popular and very well known. This is important because of the need to hire managers and employees who can jump right in and do the job. LAMP gives us a large, experienced labor pool to draw on, including outside contractors and vendors.

LAMP is the most robust and reliable web server package. No other system performs more reliably.

LAMP uses Open Source code. Nothing is hidden from us and we can do whatever we want to alter the code ourselves under the various licenses.

LAMP has a favorable Total Cost of Ownership (TCO). This is a financial estimate designed to assess direct and indirect costs related to the purchase of any capital investment, such as (but not limited to) computer software or hardware. A TCO assessment ideally offers a final statement reflecting not only the cost of purchase but all aspects in the further use and maintenance of the equipment, device, or system considered. This includes the costs of training support personnel and the users of the system, costs associated with failure or outage (planned and unplanned), diminished performance incidents (i.e. if users are kept waiting), costs of security breaches (in loss of reputation and recovery costs), costs of disaster preparedness and recovery, floor space, electricity, development expenses, testing infrastructure and expenses, quality assurance, incremental growth, decommissioning, and more. Therefore TCO is sometimes referred to as total cost of operation. When incorporated in any financial benefit analysis (e.g., ROI, IRR, EVA, ROIT, RJE) TCO provides a cost basis for determining the economic value of that investment. There are several professional TCO analyses available online.

Linux

Linux is a Unix-like computer operating system. In the early 90s, the Linux kernel developers and other enthusiasts began working on Linux, and from the late 90s onward it gained the support of corporations such as IBM, Sun Microsystems, Hewlett-Packard, Novell, and Microsoft.

Linux is a prominent example of free software and of open source development. Its underlying source code is available for anyone to use, modify, and redistribute freely, and in some instances the entire operating system consists of free/open source software.

The Five Freedoms of LAMP

1. Interoperability
Linux aims for interoperability with other operating systems, and by extension the software that runs under Linux aims for interoperability with other Linux and non-Linux software. The reasons for this are two-fold. First, from a free software perspective, interoperability allows users free choice of software and data formats while not restricting them as a result of that choice.

2. Non-Monopoly Reliance
Linux is an operating system underdog competing with mainstream operating systems, and it cannot rely on a monopoly advantage; in order for Linux to be a convenient operating system for users that is commercially viable, it must interact well with non-Linux computers.

3. Open Formats A priority is placed on open formats, public specifications for data that are freely available and free to implement, with the goal being to remove dependences on single pieces of software. These contrast with closed formats, which are either poorly documented or not documented at all, and for which there exists no agreement between competing vendors. When standards exist for network communication protocols, data formats, and APIs, they contribute to the robustness and adoption of Linux. In some cases, free software projects are the reference implementation of these protocols, examples being the Apache HTTP Server, and the X.org implementation of the X Window System.

4. Standards Compliance Examples of standard conformance include Mozilla Firefox which adheres strictly to World Wide Web Consortium recommendations, Jabber which formed the basis for the XMPP standard recognized by the Internet Engineering Task Force in the domain of instant messaging, and office productivity suites such as OpenOffice.org and KOffice which brought to light the recent OpenDocument standard. Linux systems also adhere to POSIX, SUS, ISO, and ANSI standards where possible.

5. Hardware Independence Linux is a portable operating system, one that runs on a wide variety of hardware. It runs on a more diverse range of systems than any other operating system. One of the original goals of the GNU system was portability, and while the Linux kernel was originally designed only for Intel 80386 microprocessors, it now supports dozens of computer architectures. Linux runs on computers from the hand-held ARM-based iPAQ to the mainframe IBM System z9, in devices ranging from supercomputers to mobile phones, and has a foothold in the personal computer and business desktop markets. Specialized distributions exist for less mainstream architectures. The ELKS kernel fork can run on Intel 8086 or Intel 80286 16-bit microprocessors, while the µClinux kernel may run on systems without a memory management unit including the Apple iPod. The kernel also runs on architectures that were only ever intended to use a manufacturer-created operating system, such as the iMac and PowerBook, Palm PDAs, GameCube, Xbox and even the Sony Playstation.

Market Share

Many quantitative studies of open source software focus on topics including market share and reliability, with many studies specifically examining Linux. The Linux market is rapidly growing and the revenue of servers, desktops, and packaged software running Linux is expected to exceed $35.7 billion by 2008. The actual installed user base may be higher than indicated by this figure, as most Linux distributions and applications are freely available and redistributable. Desktop adoption is weaker than server adoption, with diverse calculations generally figuring between 0.3% and 3% as a function of the sample set and calculation methods used. According to the market research company IDC, 25% of servers and 2.8% of desktop computers ran Linux as of 2004.

In 2006 Netcraft stated in an internet research report that Linux/Apache is by far the leading Web server with nearly 63 percent of the global market. Microsoft is a distant second at 25 percent. Source - Computerworld.

Historically, Linux has mainly been used as a web server operating system, and has risen to prominence in that area; Netcraft reported in September 2006 that eight of the ten most reliable internet hosting companies run Linux on their web servers. This is due to its stability and long uptimes, and the fact that desktop software with a graphical user interface is often unneeded. Linux is the cornerstone of the LAMP server-software combination which has achieved popularity among developers, and which is one of the more common platforms for website hosting.

Apache

The Apache HTTP Server is a web server for Unix-like systems, Microsoft Windows, Novell NetWare and other operating systems. Apache is notable for playing a key role in the initial growth of the World Wide Web.

When first released, Apache was the only viable open source alternative to the Netscape Communications Corporation web server (currently known as Sun Java System Web Server). It has since evolved to rival other Unix-based web servers in terms of functionality and performance. Since April 1996 Apache has been the most popular HTTP server on the World Wide Web; as of February 2007 Apache served 58% of all websites.

Apache is primarily used to serve both static content and dynamic Web pages on the World Wide Web. Many web applications are designed expecting the environment and features that Apache provides. Apache is the web server component of the popular LAMP web server application stack, alongside Linux, MySQL, and the PHP/Perl/Python programming languages.

Microsoft Internet Information Services (IIS) is the main competitor to Apache, trailed by Sun Microsystems' Sun Java System Web Server and a host of other applications such as Zeus Web Server.

MySQL

MySQL is popular for web applications and acts as the database component of the LAMP, MAMP, and WAMP platforms (Linux/Mac/Windows-Apache-MySQL-PHP/Perl/Python), and for open-source bug tracking tools like Bugzilla. Its popularity as a web application is closely tied to the popularity of PHP, which is often combined with MySQL and nicknamed the Dynamic Duo. It is easy to find many references that combine the two in websites and books (PHP and MySQL for Dummies, PHP and MySQL Bible, Beginning PHP and MySQL, etc.). PHP and MySQL are also essential components for running the popular WordPress blogging platform. Wikipedia runs on PHP and a MySQL database.

There are APIs available that allow applications written in numerous programming languages to access MySQL databases, including: C, C++, C#, D, Borland Delphi, Eiffel, Smalltalk, Java, Lisp, Perl, PHP, Python, Ruby, REALbasic, FreeBasic, and Tcl; each of these uses a specific API. An ODBC interface called MyODBC allows additional programming languages that support the ODBC interface to communicate with a MySQL database, such as ASP or Coldfusion. MySQL is mostly implemented in ANSI C.

MySQL works on many different platforms-including AIX, BSDi, FreeBSD, HP-UX, GNU/Linux, Mac OS X, NetBSD, Novell NetWare, OpenBSD, OS/2 Warp, QNX, SGI IRIX, Solaris, SunOS, SCO OpenServer, SCO UnixWare, Tru64, Windows 95, Windows 98, Windows ME, Windows NT, Windows 2000, Windows XP and Windows Vista. A port of MySQL to OpenVMS is also available.

2006 - MySQL now has 44% of the web server market and is growing very rapidly. Reasons - proprietary database servers are almost twice as likely to have suffered a security breach in the last year compared to MySQL databases. Another major factor in MySQL's success has been its close association with Linux, the Apache web server, and the Perl/Phython/PHP scripting language. Source - Evans Data Corp (market research report).

MySQL is not only the world's most popular open source database, it's also the fastest growing database in the industry. With more than 10 million active installations and over 50,000 downloads per day, MySQL continues to be the choice for a broad range of developers, database administrators and IT managers who want a high performance database that is reliable and easy to use.

PHP

Originally designed to create dynamic web pages, PHP's principal focus is server-side scripting. While running the PHP parser with a web server and web browser, the PHP model can be compared to other server-side scripting languages such as Microsoft's ASP.NET system, Sun Microsystems' JavaServer Pages, mod_perl and the Ruby on Rails framework. They all provide dynamic content to the client from a web server.

The LAMP architecture has become popular in the Web industry as a way of deploying inexpensive, reliable, scalable, secure web applications. PHP is commonly used as the P in this bundle alongside Linux, Apache and MySQL. PHP can be used with a large number of relational database management systems, runs on all of the most popular web servers and is available for many different operating systems. This flexibility means that PHP has a wide installation base across the Internet; over 18 million Internet domains are currently hosted on servers with PHP installed.

There are some valid technical criticisms of PHP that must be addressed. I won't go into them here except to mention that they are well documented and details are available on the internet for dealing with them.

PHP is a server-side scripting language. This means it is not dependent upon the user's browser. PHP does pretty much what JavaScript does except JavaScript is a client-side scripting language that does depend on each user's browser and is therefore less reliable and less predictable than PHP.

PERL

Perl is a general-purpose programming language originally developed for text manipulation and is now used for a wide range of tasks including system administration, web development, network programming, GUI development, and more. The language is intended to be practical (easy to use, efficient, complete) rather than beautiful (tiny, elegant, minimal). Its major features include support for multiple programming styles (procedural, object-oriented, and functional), automatic memory management, built-in support for text processing, and a large collection of third-party modules.

Perl has many and varied applications, compounded by the availability of many standard and third-party modules. Perl has been used since the early days of the Web to write server scripts. It is known as one of "the three Ps" (Perl, Python, PHP), the most popular dynamic languages for writing Web applications (which now includes Ruby). It is also an integral component of the popular LAMP solution stack for web development. Many high-traffic websites, such as Amazon.com and Ticketmaster.com use Perl extensively.

Perl is often used as a glue language, tying together systems and interfaces that were not designed to interoperate, and for "data munging", ie. converting or processing large amounts of data for tasks like creating reports. In fact, these strengths are intimately linked. The combination makes Perl a popular all-purpose tool for system administrators, particularly as short programs can be entered and run on a single command line.

Perl is widely favored by many for database applications. Its text handling facilities are good for generating SQL queries; arrays, hashes and automatic memory management make it easy to collect and process the returned data.

Perl does not run as fast as compiled scripts and applications. In the real world this places a limit on its practical use. However, it is the most secure and most well understood server-side scripting language.

I don't anticipate developing in-house Perl expertise to any significant degree because all of our LAMP web hosts provide expert Perl scripting. We won't be coding it much in any case, just for a few server tasks.

Python

Python is an object-oriented high-level programming language designed around a philosophy which emphasizes the importance of programmer effort over computer effort. Python is often characterised as minimalist, although this only applies to the core language's syntax and semantics; the standard library provides the language with a large number of additional libraries and extensions.

Python is rejected as the P component of LAMP because it is a difficult language to master and is not particularly popular.

Ruby

Ruby is a reflective, dynamic, object-oriented programming language. It combines syntax inspired by Perl with Smalltalk-like object-oriented features, and also shares some features with Python, Lisp, Dylan and CLU. Its main implementation is free software. The language's creator said that Ruby is designed for programmer productivity and fun, following the principles of good user interface design. Ruby also follows the principle of least surprise (POLS), meaning that the language behaves in such a way as to minimize confusion for experienced users.The primary design goal was to make a language that programmers enjoyed using, by minimizing programmer work and possible confusion.

Ruby has potential for becoming the P in LAMP. Ruby has only been out for two years but it is experiencing phenomenal growth, although PERL and PHP command massive, overwhelming leads in market share at this time. As such it bears watching in the future. It's most popular implementation is known as Ruby On Rails.


Web Server Market Share, all domains 1995-2007


Total Web Domains 1995-2007


MySQL Market Share - 1990-2006


Total Active Web Servers 2000-2007