It used to be that the daydream of every programmer was to write the next great Unix shell or the next great text editor. Nowadays it seems to be writing the next great web framework.
But how well do they perform? Consider this little ditty, involving a benchmarking effort over several popular frameworks written in PHP (the same programming language as WordPress). After several rounds of tweaking and tuning, the benchmark author coaxes the fastest framework in his test to spit out 118 pages per second without going to the database.
Scroll up to the top for the important part, though: plain jane HTML files, served by the arguably rather top heavy Apache web server, get pumped out at a rate of 1,327 per second. I’ve never tested the Club Troppo server on this basis, but I expect it could easily serve 7-9,000 pages per second on the same terms. Yet I can bring our brutish monster to its knees with 200 simultaneous requests.
This suggests that a lot more needs to be done. Previously I have argued that the classic ‘LAMP stack’ is a tightly coupled monster riddled with duplications and unnecessary functionality. I reckon this example goes some of the way to demonstrating my point that the business of squirting bits and bytes at web browsers is actually very easy — it’s all the moving parts behind the web servers that are making life difficult.
Next stop: the virtual server.
I am starting to think that virtual servers are the wave of the future, with implications that a lot of people haven’t realised yet. The economics point in that direction: the price of hardware continues to plummet, while the cost of administrating a traditional shared hosting arrangement continue to rise. But with a virtual server those costs are contained because the host has less to do in terms of preventing customers from interfering with each other’s quality of service. The trendlines will cross at some point and the virtual server will become cheaper than the shared host.
That’s if the trendlines haven’t already crossed. Dreamhost charge me $7.95 for my account with them; meanwhile I also have Ozblogistan on a virtual server that costs $20/month right now — and the hardware it lives on continues to get cheaper every day.
One of the things that has always held up the LAMP stack’s dominance is the wide installation of Linux, Apache, MySQL and PHP by shared hosts. But when the server is virtual, the host hasn’t defined an execution environment, it’s totally up to the client. This means that web applications can unshackle themselves from LAMP and adopt any architecture they wish, so long as it can be deployed as a virtual machine.
That’s the direction my own thinking has been taking in my quest to write the Great Australian Blog Engine — tentatively nicknamed ‘Project Wordpreth’. That I can eliminate any element I don’t need, and that I can totally specify the operating system elements and rely on them directly. It allows for a lot of simplifying assumptions — for example, I can better deal with the ‘double buffering problem‘.
It’s going to be an interesting couple of years if I’m right.