Java Servlets: Back to the Future
By Lincoln D. Stein
Sun's Java Servlet API is the next great thing in Web development. It promises to eliminate the performance problems of CGI scripts, the portability problems of Web-server API's, the reliability problems of C programs, and herald in a world of shareable, component-based Web servers. Yet reading through the JavaSoft documentation, I was swept by a wave of nostalgia. How could that be?
Servlets, the small, dynamically loaded modules that servlet-enabled Web servers load and execute as needed, are nothing new. In 1993, Tony Sanders of BSDI introduced
Plexus, a Web-server toolkit that was written entirely in Perl. Because of its modular design, Webmasters could easily tune its behavior or add new functionality. By editing a configuration table, developers could also add new Perl modules to Plexus. When Plexus was called upon to serve a URL or MIME type handled by one of the modules, it would load the code, compile it, and execute it. Compiled modules remained in memory indefinitely, so subsequent invocations were fast.
Plexus flourished for a while, but was eventually swept aside by the high-performance servers written in C. Tony's Perl servlet API was superseded by the CGI protocol, which ironically enough, he was instrumental in designing. The main attraction of CGI is its language independence. You can write CGI scripts in C, Perl, BASIC, or even a shell scripting language.