2008/4/9, Andy Chambers achambers.home@googlemail.com:
How hard would it be to make sessions work independently of hunchentoot? I'd like (or rather Kenny would like) to make my openAIR stuff work with aserve. Aserve does have webactions but it seems to involve more than just sessions. They have a concept of "managed pages" which doesn't really fit with the way I've done things so far.
I made a half-hearted attempt at just copying sessions.lisp and specials.lisp into my own project but it seemed like if I was actually going to make it work, I'd end up with all the same dependencies as hunch anyway so what would be the point.
I'd recommend that you implement your own session management scheme based on cookies - It is not a hard thing to do and will propably be easier than to factor out the sessions specific parts of Hunchentoot into something that could be reused with Aserve. I don't know anything about your target audience, but if you don't try to support people who have switched off Cookies, handling sessions is rather easy.
I also remember thinking it might be nice to have some of the request accessors be methods instead of functions. Would that be expensive in terms of performance? It would mean I could code my project to hunch's interface and add defmethods to handle aserve requests differently.
Edi and I discussed that earlier on and it is on the list of things that we would like to have. The tradeoff is API simplicity. Currently, the the request argument is optional in all accessors, thus we can't easily make them be a generic function.
-Hans