[plt-scheme] URL rewrite/dispatch in PLT Web server

From: Sridhar Ratna (sridhar.ratna at gmail.com)
Date: Sat Mar 24 09:39:18 EDT 2007


I have been poking around the PLT web server and continuation based
web programming for a while (after reading the recent 2007 paper on
plt-web-server by Shriram Krishnamurthi). I believe not all of web can
be programmed using continuations. There is a need for standard URL
dispatch mechanism too (which goes through unique code entry points).

Assuming we use servlets, a weblog permalink will look like this,

"/2006/02/foo-bar.html" becomes the PATH_INFO component of the request url.

There is clearly no way to think in terms of continuations (as there
is no end-user specific interaction) here. Correct me if I am wrong.

>From what I know, there is no dispatch mechanism in PLT other than me
inspecting the PATH_INFO variable and dispatching to code entry points
accordingly. This is pretty much similar to the standard CGI model.
Can I do better than that?

Also, does PLT web server support a way to rewrite urls (back and
forth)? For example, the above url can instead be
http://example.com/2006/02/foo-bar.html and k-urls like
http://example.com/servlets;4*2*25232234/post can become

Any help would be much appreciated. I am craving to write (web2.0
style) web apps in PLT scheme.


Posted on the users mailing list.