[hunchentoot-devel] Running multiple web application

Robert Synnott rsynnott at gmail.com
Fri Apr 13 01:47:24 UTC 2007


On 4/12/07, Andrei Stebakov <lispercat at gmail.com> wrote:
> So I need to keep track of all servers that I start and for each one return
> it's dispatch-table something like this?:
> (defvar *server1* (start-server :port 3001....)
> (defvar *server2* (start-server :port 3002....)
> (setq *meta-dispatcher* (lambda (server)
>                             (declare (ignore server))
>                             (if (eql server *server1*) *dispatch-table1*
> *dispatch-table2*)))
>

This is more or less exactly the approach I've been taking. The
advantage, of course, is largely in memory usage, the disadvantage is
in the trouble involved in keeping track of it all. You can, if you
like, put different sites in different packages, then just do
site1:*dispatch-table*, site2:*dispatch-table* etc. in the above, the
advantage being that you can then easily develop and test each site in
its own package.
Rob



More information about the Tbnl-devel mailing list