[Lispweb] debugging and serving web pages at the same time in lisp (specifically clisp)

Ivan Toshkov ivan at toshkov.org
Thu Oct 5 03:12:14 CDT 2006


On 10/5/06, Yin-So Chen <yinso.chen at gmail.com> wrote:
> Hi lisp gurus-
>
> sorry if this (newbie) question has been asked before - I tried to search
> for the information on the web but can't (probably because it's hard to tell
> what the keyword is).  I am wondering if it is possible to debug and serve
> webpage at the same time in lisp (specifically clisp) and verify my
> underestanding.
>
> The reason I am wondering is that I've read Paul Graham's note on his
> experience in viaweb he was able to diagnose a problem while the customer is
> on the phone.  His statement implies that he was running a separate instance
> of the website (so not the same one as the customer's looking at), but he
> attempt to reproduce the problem and can fix it at the same time (all
> appearing without having to shutdown the production image).
>
> You can find the excerpt here:
> http://lib.store.yahoo.net/lib/paulgraham/bbnexcerpts.txt

IIRC, Paul Graham was running CLISP as CGI script.  That is, separate
process for each request.  This was OK, because only the store
creation/management application was written in Lisp, so you don't have
that much hits.  The stores themselves were C(?) programs.

>
> After playing a bit with araneida's example - it seem that with clisp this
> is not possible - because (host-serve-events) blocks repl.  I didn't try
> this on SBCL, but assuming it has multi-threads I can see it being a
> possibility.
>
> Another way I can think of is that he built an abstraction layer that allow
> him to work from repl to reproduce a problem discovered through a web server
> request, so he can work in session to fix the problem, but I can't see how
> he can update the running clisp image without having to kill the current web
> server session (assuming he has something that works similar to araneida)
> and reload code.

Again, from what I read, the Lisp application was separated in several
layers, and they were making changes mainly to the UI-level layer.
For the others they had to be much more careful in what they touch and
how.

>
> Please let me know if I am missing something obvious.  While I don't know if
> I agree with the practice of directly changing production code in real-time,
> the concept is intriguing, and certainly would be great to know how it's
> done.

I'm sure some googling in comp.lang.lisp will reveal a lot of examples.

>
> Oh - I am using clisp now as I am doing work on windows.  I might move to
> sbcl on linux but certainly would love to understand how it's done.

There is a still experimental version of SBCL for Windows.  You can
try it and report any problems to the developers.

Cheers,
Ivan


P.S.  I'd like to clarify, that I've only read about all this Viaweb
stuff.  I hadn't been there.  But I'm not sure I didn't imply it using
improper tenses in my not-so-good English.

>
> Thanks for any comments,
> yinso
>
>
> _______________________________________________
> lispweb mailing list
> lispweb at red-bean.com
> http://www.red-bean.com/mailman/listinfo/lispweb
>
>
>


-- 
"...Please don't assume Lisp is only useful for Animation and Graphics,
AI, Bioinformatics, B2B and E-Commerce, Data Mining, EDA/Semiconductor
applications, Expert Systems, Finance, Intelligent Agents, Knowledge
Management, Mechanical CAD, Modeling and Simulation, Natural Language,
Optimization, Research, Risk Analysis, Scheduling, Telecom, and Web
Authoring just because these are the only things they happened to
list."
  -- Kent Pitman



More information about the lispweb mailing list