Re: Advice on mod_lisp-based web application.
- From: Tim X <timx@xxxxxxxxxxxxxxx>
- Date: Thu, 26 Apr 2007 18:53:54 +1000
Blaine <Blaine.M.Nelson@xxxxxxxxx> writes:
Tim, Alex, thanks for the advice. Problems vanishing does sound
nice.
I have much state in global variables, and Alex's recommendation is to
migrate those to session variables. Could you say a little more about
these, about their implementation? I'm imagining some sort of
structure that includes, along with the variable value, a session id.
This structure, while more complex than the prior global variable is
still global. Am I thinking about this correctly?
Thanks again. I really appreciate it.
Yep, you seem to be on the right track. How you implement it is really
dependent on what you need to track, but essentially some sort of structure
with some sort of 'session key'. A hash, as suggested by Alex is often a good
choice. It still has to be global because you need to be able to retrieve it
during a latter request (you could store it in a database if complex/large
enough to justify the overhead). Essentially, any value which is specific to a
user's session needs to be in this structure and used by subsequent requests.
Tim
--
tcross (at) rapttech dot com dot au
.
- References:
- Advice on mod_lisp-based web application.
- From: Blaine
- Re: Advice on mod_lisp-based web application.
- From: Tim X
- Re: Advice on mod_lisp-based web application.
- From: Blaine
- Advice on mod_lisp-based web application.
- Prev by Date: Re: Why doesn't Lisp automatically differentiate functions and macros?
- Next by Date: Re: Agents service?
- Previous by thread: Re: Advice on mod_lisp-based web application.
- Next by thread: Re: Advice on mod_lisp-based web application.
- Index(es):
Relevant Pages
|