Pluggable WebServer
Comment on PWS here
The Pluggable WebServer (PWS) is a web server and toolkit for flexibly creating CGI scripts. I designed and implemented it to help me create different kinds of collaborative tools (e.g. Virtual Other-Than-Communities). PWS builds on the work of Georg Gollmann (gollmann@edvz.tuwien.ac.at) (at http://ftp.tuwien.ac.at/~go/Squeak/webServer.html) and is strongly influenced by Tim Jones' (tim@thregecy.com) WebTalk.
PWS is "pluggable" in three ways:
- Decoupled URL Parsing and CGI Execution: The core of PWS is Georg's WebServer -- that is, the networking components and the parsing of the HTTP header. However, the interpretation of the URL (e.g., in Georg's WebServer, the URL is interpreted as an object and message; in Tim's WebTalk, the URL is a class name; and in most servers, the URL is a file reference) is decoupled from PWS. Instead, a separate ServerAction is handed the PWS request, and the ServerAction can determine how to interpret the URL and what to do to return (e.g., pass on a file, execute a CGI script and return the result, etc.). A PWS contains a table of ServerActions, so a single server can interpret URLs in several different ways.
- Pluggable Server Actions: There are two ServerActions provided that are "pluggable" in the traditional sense: The instances hold the blocks to be executed for URL interpretation and as instance variables. PluggableServerAction takes a processBlock and a returnBlock for processing any forms input and then computing a return HTML page, respectively. A SinglePlugServerAction just takes a processBlock and requires the processing block to get the response back to the request.
- Embedded HTML: EmbeddedServerAction serves files, but wherever it encounters <? ?> tags, it evaluates the embedded string as Smalltalk and replaces the tag with the result. The actual interpretation and replacement occurs in the HTMLformatter class, which can be used as-is in Georg's or Tim's servers, too.
Overall, what this buys you is:
- Design your URLs to have whatever information you want encoded however you want
- Build your problem domain classes with minimal concern for CGI or HTML issues.
- The interface and navigation issues are separated into the HTML pages, not embedded within CGI scripts that generate them.
- Finally, some CGI applications can be completely embedded in a single HTML page.
If you would like to be kept informed via email of future updates, please drop me a line at guzdial@cc.gatech.edu.
The pieces are:
Documentation is available here
Squeak|CREATE Site
Home Page for How To Squeak
Last modified at 11/17/97; 2:47:19 PM
Other Links of Interest
College of Computing | EduTech Institute | GVU Center
Mark Guzdial | CS 2390 Spring '97 Home Page | STABLE