Lisplets - more info from Rich Hickey
Friday, October 1, 2004
There has been a lot of interest in my weblog posting about Lisplets and I think there is good reason for this. Lisplets provide a very light-weight mechanism that can be used to integrate Lisp into a Java servlet environment. I exchanged a couple of emails with Rich Hickey and he has provided some additional information and comments about Lisplets. Here are the points from his email (reproduced with permission):
"Thanks for the nice writeup. I think you're right in the end that the comparison is to mod_lisp, and would go further to say it also overlaps with the choice to use a Lisp web server like portable aserve, cl-http or Araneida.
I would like to point out that using a Java servlet container does not limit one to a Java web server - Tomcat, while an HTTP server itself, integrates with Apache and IIS, as do most of the others.
Some of the attributes of the Lisplet/Java servlet container approach are:As far as technical background, there isn't much to say. Lisplets was a week of research (in choosing Servlets), a week of reading (I didn't know the Servlets API or Tomcat), and a weekend of coding. I'm really excited about its potential, but I realize it requires a bit of exposure to Java servlets to fully appreciate (i.e. a tough sell to Lisp users who don't understand Java or why you would want to use it ;-). I hope people with an inkling of interest try installing Tomcat and Lisplets and give it a spin. I think it's an easy, flexible, powerful and free way to put an HTTP front-end on a Lisp app."
- The Servlets API is well specified and extremely portable, down to the config file formats etc. So you can take the Lisplets directory and drop it in a container running anywhere from localhost to big iron. In particular, Lisplets can run in environments where Lisp, or the Lisp you can afford, cannot.
- Session management, session state, application state, user authentication and roles are _huge_ things to get for free, and, because they are specified in a layered manner, there are many implementation options, from simple file-system based solutions to cluster-aware, database-backed and LDAP solutions. All will work with no change to Lisplets or your Lisp code.
- While the Lisplets API is very Lisp friendly, it also doesn't dictate much to the Lisp side (indeed, no Lisp side is provided). So you can use the HTML/XML generator of your choosing, build a dispatcher that makes sense for your application, etc. Lisplets work with any Lisp or Scheme that can use sockets.
- Finally, Lisplets allow Lisp to play well with others (i.e. those people that don't understand Lisp or why you would want to use it). I think the acceptance in an Apache/IIS shop will be at least as high as proxying to a Lisp web server (you can proxy to Tomcat if the admins don't want to integrate it with the web server), and much higher in a Java shop, where the interop features of servlets far exceed those of proxies. You can write to session state from Lisp and the Java guys will see it in JSP, share users and roles etc.

