Re: debugging and serving web pages at the same time in lisp (specifically clisp)

Richard Newman <[email protected]> Thu, 5 Oct 2006 11:08:41 +0100
Newsgroups gmane.lisp.web
Message-ID <[email protected]>
> 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.

You should still be able to (trace) your functions and Araneida's  =

(e.g., handle-request-response). You could also wrap h-r-r, or modify  =

your methods, to preserve or print the request object, which will  =

allow you to replay a request.

> 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.
>
> 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've done it =97 just play around with your methods and functions while  =

serving pages. If you have appropriate conditionals (e.g., you only  =

generate the in-development page for your username) you can even do  =

this while serving pages to users. Risky, sure, but it works.

-R