Modal (Continuation-based) Web Server Framework example
Sunday, April 4, 2004
Chris Double has posted a 4-part example of a "Modal" (continuation-based) web server framework using Chicken Scheme in order to demonstrate how continuation-based web server frameworks work:
- Part 1 provides an introduction that describes how to use the framework and discusses the implementation.
- Part 2 has some additional detail.
- Part 3 covers how to convert programs for the web.
- Part 4 extends the framework, adding a callback system and fixing an important bug.
This might be the first time you've heard the term "Modal Web Server Framework" used to describe what has previously been referred to as a "Continuation-based Web Server Framework". Chris and Avi Bryant decided to start using the "Modal" wording due to the awkwardness of using "Continuation-based" in descriptions of these types of frameworks. Patrick Logan prefers the "continuation-based" terminology (and lists some good reasons for keeping the older terminology). However, one of the benefits of "Modal" over "Continuation-based" (and Patrich points this out as well) is that not all Web Server Frameworks that use this approach actually use continuations. For example, UnCommon Web is a Common Lisp web appication framework that is "modal" but doesn't natively use continuations (it uses a CPS transformer). Paul Graham's Viaweb is another similar example. I sorta agree with Chris and Avi's rationale for the name change, but it remains to be seen whether their new terminology catches on.
Incidentally, it is neat to create a blog entry on 04/04/04, eh! Or maybe simple minds just enjoy simple pleasures ;-)
Update: 2004-12-28: Chris Double wrote a "Part 4", so I've added that to this posting.

