TNL.net moves off Windows

Over the past year, it has seemed like TNL.net had gone quiet. Few updates were made to the site and fewer newsletters were being published. Behind the scene, however, I was busy rebuilding the site from the ground up. The new TNL.net was relaunched in late January 2003, about a month behind the schedule I had originally set. In this newsletter, I will explain why I relaunched it and how I went about it.

The Genesis

Since 1995, TNL.net was running on Microsoft Windows. Initially, the site was running on Windows NT, using Microsoft IIS to serve pages on the web. Prior to that, TNL.net had been running on a shared Linux box but none of the administration of that server was in my control. When it moved to its own environment, I looked at a number of options that would allow me to spend time developing the site, not necessarily administering the box. In late 2000, the site was upgraded to Windows 2000 and continued to run on this until recently. So why did I decided to change things?

Unhappy with Microsoft

The world in 1995 was very different from today’s world. In those days, administration of unix system required a set of specialized skills and administrators had to design their own programs to automate a lot of work. Over the years, more products started coming out of the open source community that would simplify the way one manages a Linux box.

Step 1: Moving Up, Moving Out

In parallel, Microsoft started going further and further upstream in search of new revenues for windows. Having successfully conquered the desktop, they first set their sight on small business. With the introduction of Windows 2000, they started upping the price of internet servers, requiring a separate set of licenses for the internet services as an add-on to the operating system costs.

As TNL.net grew more and more popular, it became quickly apparent that the small MS-Access database that was powering the server needed to be upgraded.

Step 2: Patch, Patch, Patch

After buying a license to SQL server, I learned that I had to start worrying about another set of patches on a weekly basis. As new security patches were released weekly for windows 2000, IIS, SQL server, I found myself spending more time doing basic administration of the box and less and less time doing development on it. With a limited time resource, this became a first point of concern and pushed me an area where I started questionning whether I wanted to stick with the platform for the long term.

Step 3: Price Hike

After careful study of the windows roadmap, it became apparent that Microsoft was no longer interested in small and medium size sites and was getting more and more targetted towards the enterprise. The introduction of .net was clearly aimed at the enterprise market. The subsequent announcement of changes to their licensing structure showed that they would drastically increase prices and force you into an upgrade cycle, whether you liked it or not. Microsoft was essentially telling me that if I wanted to play long term, I would not only be forced to pay more but also be forced into buying software on a subscription basis, whether I liked it or not. This would not do. I was already an eager Microsoft user and, having paid for all my licenses, had already laid out a substantial amount of cash into staying with Microsoft.

Step 4: Locked up

To look at a change in platform because of a new pricing model was an important step but was it really what I wanted? I decided to approach a few people I knew in the community and within Microsoft to see what the general view was. Maybe I was over-reacting.

Service Pack 3 showed me that I was not. With it, Microsoft essentially was telling me “open your box to us and we will take care of everything”. Everything, that is, that Microsoft deemed OK. Which essentially meant that I would let Microsoft decide what could and couldn’t be on my box. For purely historical purpose (as I expect this story, like all the others on TNL.net, to stay on the web for many years to come, you have to realize that all this is happening against the backdrop of Microsoft being investigated for antitrust violation)

Step 5: Looking to the other side

One of the things that allowed the Internet to grow as quickly as it did over the past decades is the fact that most people are willing to share. However, in the windows world, the logic is that what you create is for your own and you charge for it. This left me in the odd position of being one of the very few open-source windows developers in the world. If I had a cool piece of ASP written, you just had to ask and I would send you the code.

Meanwhile, the open source community was producing products that were growing more stable by the day and at a fraction of the costs offered by Microsoft. Most of the products were running on Linux, using Apache as their web server. By 2001-2002, they had grown mature enough to being considered enterprise grade.

Checking out the alternative

Once I decided that I would move to an open source platform, I had to investigate the alternative. The question became what operating system, what web server, whether to use another application server, what language to use for developing my back-end, whether to use a database (and if so, which one).

Choosing the Operating System

Should I go with Linux or BSD or something else? If I went with Linux, which distribution should I follow. In the end, I decided to settle on Linux because of the wide level of support if had not only on the open source market but also in the commercial one. With backers like IBM, Oracle, and even (begrudgingly) Sun Microsystems, I feel that Linux is here to stay and will continue to grow not only as a hobbyist OS but also, increasingly, as one of the foundation tools for web businesses of the future.

However, looking at the different Linux distribution was a much more complicated matter. I wanted something that would require little day to day administration and could be easily and quickly patched. At the same time, I had to ensure that the operating system would run on the new TNL.net box, a dual 1.3Ghz Pentium configuration with a SCSIRAID array. Unfortunately, I learned one of the tough lessons of the Linux world very quickly: Hardware drivers in the Linux world do not always get upgraded at the same speed as the rest of the Operating System does. In the case of my box, I discovered that, while there is a new kernel patch coming out every few weeks, it is impossible to keep a machine up to the latest kernel if you have a proprietary set of RAID drivers. This is a shame on the part of the driver makers who could either produce source code for the drivers and let the community update them or keep up with the demand. Attempting to do a kernel upgrade proved to be a fruitless effort as my options were either upgrade and lose the RAID array configuration or wait until the vendor releases new RAID drivers.

In the end, I decided to pick up RedHat Linux 7.3 because my RAID vendor supported it and because it offered superior auto-updating features through the RedHat Network. Some members of the open source community will groan as RedHat is often seen as the Microsoft of the Linux World but I feel that it is currently the easiest point of entry for an ex-Microsoft user like myself.

Only one choice on webserver: Apache

Having made the decision as to what Operating System to use, I turned my attention to the web server. This decision was a much easier one to take as the web server from the Apache Foundation as become the de-facto standard for anyone who is serious about delivering web content on an open source platform. I did not go very far in my research on alternative web servers. The only decision point on the web server end was whether to use Apache 1.3 or Apache 2.0. Influencing this decision was the module architecture that Apache offers. Unfortunately, at the current time, Apache 2.0 is too new to have as extensive a set of modules as Apache 1.3. As a result, I decided to act conservatively and use the 1.3 version.

Backend: What to use?

Coming from the Microsoft world, I have had extensive experience with ASP and could have kept using it thanks to a helpful module developed to run the Microsoft technology on Linux. However, I had already made the decision that I would rewrite substantial parts of my code so I decided to completely abandon ASP as part of the migration.

My choices were therefore perl, PHP, Java, and Python. Each of the languages was equally good for what I wanted to do.

Perl, which I have used for years (the original TNL.net was running in Perl as Microsoft had not put out any offering at the time) would have been my first choice if I had wanted to do a quick and dirty migration. However, Perl had gotten old and was not designed per say as a web scripting language.

Python looked very interesting but the syntax seemed a little too arcane for my taste.

Java looked interesting but, having made the decision to leave the Microsoft platform because I did not want to become beholden to a single company, would I end up making the same mistake by going the Java route and become increasingly beholden to Sun Microsystems. That particular fear kept me from going the Java route.

PHP seemed to have managed the proper balance between extensability and ease of use. It seemed like a new language developed specifically for web use and I had not played with it. The big question on my mind, though, was whether it could support large amounts of traffic.

At the time of the migration, TNL.net was already received upwards of 3 million page views a month and growing slowly towards 4 million. As if someone had read my mind, Michael Radwin made a presentation highlighting how Yahoo had come to the decision of using PHP. Reading their analysis of the different languages, I felt that someone else had gone through the same thought process I did. While they did not include Python (why, I do not know). However, their conclusions were that PHP was solid enough to run large portions of the Yahoo site. If that was the case, there was now no doubt in my mind as to which scripting language I would use.

Choosing a Database Package

Once I chose PHP as my development language of choice, the next step was in assessing which database I should use. After carefuly consideration, I decided to use the mySQL package largely because of its tight integration with PHP. Furthermore, investigation showed that this is a relatively standard configuration known as LAMP and is being used by a number of people all over the net. More powerful options are offered by other open source database packages like PostGresSQL but I came to realize that for most things, MySQL is the best package for me because many of the features offered by other package are on the list of things I do not plan to use at any time in the foreseeable future (12 months).

Conclusion

Having moved to an open source package was much easier than I had initally expected. With a complete rewrite of the back-end TNL.net code, I was able to clean things up and make sure that the site was optimized to support the traffic it’s been getting to date and still have some room to breathe in terms of supporting more traffic. In the process, I made a decision to get rid of some old things like the DMOZ implementation I had and introduce new ones like the TNL.net weblog, which now provides some content on a more regular basis (at least 5 times a week). I have already seen some dividend in my joining the open source community, as some of the code implemented by other people served as a blueprint for the new TNL.net. All and all, count me on the list of people who have made the switch from windows to Linux. I don’t think I will look back any time soon.