On Sun, Jan 11, 2004 at 07:40:16PM -0800, Josh Chamas wrote:
SessionSerialize only serializes access to the $Session object, so you would want to have at least as many MaxClients as there are possible concurrent web clients you want to support.
Oh, so if I do "$Session->{count}++;" in my script, for example, then all other scripts are blocked while that line is executing, but otherwise they can execute concurrently?
Only scripts executing with the same $Session object ( referenced by session-id ) would be blocked. When SessionSerialize is set, the $Session object is locked during script execution allowing for only one concurrent script executing at a time for the web client sending the session-id. Without SessionSerialize set, the command $Session->{count}++ only locks the $Session object for the duration of the read & write operations as applicable. This would *not* be an atomic operation, and the only way to do this to ensure it atomic would be to:
$Session->Lock; $Session->{count}++; $Session->UnLock;
unless you had SessionSerialize set.
So, with SessionSerialize set, scripts can be executed concurrently assuming that all the web clients coming in have different session-ids which they should.
Ahh, I see. (If the httpd process is proxied by mod_accel or something similar which slurps the mod_perl output and spoonfeeds it to a slow client, then I assume the mod_perl httpd's MaxClients could be 1 when Script_OnStart calls $Application->Lock?)
Yes, but even then, to get maximum capacity, I would probably have 2 MaxClients, since part of the request stage is handled outside the Apache::ASP handler. But doing something like $Application->Lock is probably a bad idea generally, so I hope this is just a theoretical discussion :-)
Regards,
Josh ________________________________________________________________ Josh Chamas, Founder phone:925-552-0128 Chamas Enterprises Inc. http://www.chamas.com NodeWorks Link Checker http://www.nodeworks.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]