On Thursday, October 10, 2002, at 01:59 PM, Jeff Bauer wrote:
Actors: User, User-session, Facility
1. Each Facility would be handled by a single long running process (LRP). Currently we handle each User-session in an LRP, which actually simplifies session management somewhat, but makes other things at the application level more complicated.
One way to handle this would be to have Apache do a ProxyPass in a VirtualHost directive to Twisted instances running on different ports. I do this where I work, and it works very well. A better way to do it is with twisted.web.vhost.NameVirtualHost. I have not used this, but it occurs to me I should, because looking at the code it really is very simple. However, since you also have the requirement that each Facility be it's own LRP, you may also need to learn about twisted.web.distrib if you go this route. I will defer to someone who knows more about vhost and distrib on this one. <snip -- someone who knows more about distrib and authentication please reply>
4. I presently drop a Cookie in the User's browser representing the ID of the User-Session. From reading Itamar's posting (Dec 17 2001), I gather that I should consider sessions rather than cookies.
Sessions are implemented behind the scenes as a cookie. Since it is very simple to request a session from the request object (request.getSession()), and it handles the cookies for you, I recommend doing that. Hope this helps a little! Donovan