Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

gnat (29)

gnat
  (email not shown publicly)

Journal of gnat (29)

Friday April 20, 2001
09:53 PM

Apache 2.0

[ #69 ]
I went to ApacheCon a couple of weeks ago, and had a blast. I have to admit that I'm a big social fiend. For all that I talk up the content at The Perl Conference, I get the most fun by far out of socializing with my fellow Perl geeks[1].

About the only ApachCon talk I paid attention to was Doug MacEachern on mod_perl 2.0. A lot of the cool stuff that mod_perl 2.0 can do is based on the cool stuff that Apache 2.0 can do, so when I got home I went back and read up on the Apache 2.0 feature list.

Wow! Once again the Apache team show that they're some of the soundest software designers in the world. I'll go through what I think are the coolest bits of Apache 2.0:

  • Apache Portable Runtime. The APR is all the platform-specific code in Apache 2.0. If you want to port Apache to a new platform, you implement the APR on that platform and then you know your job is done. A clean abstraction. Mmm! (It's not a sin for a Perl programmer to enjoy a clean abstraction--in fact, looking under the hood of Perl makes you appreciate clean abstractions even more. Absence makes the heart grow fonder, and all that :-) The APR means that Apache runs as well on Windows as it does on Unix.
  • The 1.x series Apache, which we all know and love, was based around the pre-forking model. Apache 1.x starts up a bunch of identical processes, each of which waits for an incoming connection and then deals with one client. Apache 2.x lets you plug and play multiprocessing models through a series of "MultiProcessing Modules" (MPMs). There's an MPM for 1.x behaviour, but there are also MPMs for fixed numbers of threads per process, as well as variable numbers. It basically lets you pick your comfort zone between threads (speed) and processes (reliability).
  • The biggest change noticable to mod_perl programmers will be that all Apache modules can now rewrite each others output. That is, the deep voodoo required to make the output of one handler become the input to another ("chaining") is no more. Instead, it's automatic, something you get for free. Now you can have a CGI handler's output processed by SSI, then by mod_perl to add a header and footer and navbar, and ....
  • But, most amazing of all, Apache is no longer "just" a web server. You can write modules that implement wire protocols. Obviously it ships with an HTTP module, but you can write FTP, SMTP, IIOP, whatever takes your fancy. And, of course, you can write these protocol modules in Perl.

Apache 2.0 isn't out yet, of course. It's in beta now, and will probably come out during the US summer (probably late summer, maybe even fall -- one of the upsides to being an open source project is that you don't have to live by artificial mangement-imposed deadlines). You can download previews and betas from the Apache website, and alphas of mod_perl 2.0 from Doug's s33kr1t site.

And no Nat journal would be complete without a plug for the Open Source Convention. We have a mod_perl track which will feature Doug talking about mod_perl 2.0, and an Apache track with 2.0 talks and tutorials.

--Nat