- pcgi and multi concurrent access
Hello, as far as i understand, only one process is created with pcgi. What if 2 clients send 2 queries simultaneously? Does one client wait until the other complete the request? how does it work? Thanks CLAIN Jephte Service Informatique CHSR ps: my apologies for my broken english, i'm a bit tired this morning.
Service Informatique CHSR wrote:
Hello,
as far as i understand, only one process is created with pcgi.
Right.
What if 2 clients send 2 queries simultaneously? Does one client wait until the other complete the request?
Yes.
how does it work?
Requests are currently serialized through Zope. This will be changing Real Soon Now. I suggest reading the ZServer architecture paper: http://www.zope.org/Documentation/Reference/ZServer Posted rather recently by Amos. -Michel
Thanks CLAIN Jephte Service Informatique CHSR
ps: my apologies for my broken english, i'm a bit tired this morning.
On 19 Jan 99, at 10:14, Michel Pelletier wrote:
Requests are currently serialized through Zope. This will be changing Real Soon Now. I suggest reading the ZServer architecture paper:
Does this mean that there's no advantage to trying the '-t' command line option for ZopeHTTPServer? Brad Clements, bkc@murkworks.com (315)268-1000 http://www.murkworks.com (315)268-9812 Fax netmeeting: ils://ils.murkworks.com ICQ: 14856937 We must come down from our heights, and leave our straight paths, for the byways and low places of life, if we would learn truths by strong contrasts; and in hovels, in forecastles, and among our own outcasts in foreign lands, see what has been wrought upon our fellow-creatures by accident, hardship, or vice. - Richard Henry Dana, Jr. 1836
Brad Clements wrote:
On 19 Jan 99, at 10:14, Michel Pelletier wrote:
Requests are currently serialized through Zope. This will be changing Real Soon Now. I suggest reading the ZServer architecture paper:
Does this mean that there's no advantage to trying the '-t' command line option for ZopeHTTPServer?
There is an advantage if you are running a thread safe ZPublisher application. Applications that use the current version of BoboPOS are not thread safe and should absolutely not be used with the -t switch. Jim -- Jim Fulton mailto:jim@digicool.com Technical Director (540) 371-6909 Python Powered! Digital Creations http://www.digicool.com http://www.python.org Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
Brad> Does this mean that there's no advantage to trying the '-t' Brad> command line option for ZopeHTTPServer? Jim> There is an advantage if you are running a thread safe ZPublisher Jim> application. Applications that use the current version of BoboPOS Jim> are not thread safe and should absolutely not be used with the -t Jim> switch. I run ZopeHTTPServer without -t and I could swear it still spins off threads to handle requests... Skip
On Tue, 19 Jan 1999, Brad Clements wrote:
On 19 Jan 99, at 10:14, Michel Pelletier wrote:
Requests are currently serialized through Zope. This will be changing Real Soon Now. I suggest reading the ZServer architecture paper:
Does this mean that there's no advantage to trying the '-t' command line option for ZopeHTTPServer? Not if you use Zope. If you use just ZPublisher this helps. Actually, I'm not sure if Zope as such does locking, so using -t might provoke havoc with your data.
Andreas -- Win95: n., A huge annoying boot virus that causes random spontaneous system crashes, usually just before saving a massive project. Easily cured by UNIX. See also MS-DOS, IBM-DOS, DR-DOS, Win 3.x, Win98.
Service Informatique CHSR wrote:
Hello,
as far as i understand, only one process is created with pcgi.
Actually, one application process is started. In addition, a thin pcgi wrapper process is started for each request.
What if 2 clients send 2 queries simultaneously?
Each client gets a separate (thin) PCGI wrapper process that collects input from the browser, forwards the input to the long running application, gets all of the output from the long-running application, and then sends it back to the browser.
Does one client wait until the other complete the request?
No. Requests can be processed simultanteously by the wrappers. Currently, the long-running application can process only one request at a time, so wrappers may have to queue up to get access to the application. Keep in mind, however, that most of the clock time for most requests is spent doing socket I/O with the client, and this I/O is done concurrently. In the future, the application itself will be able to handle multiple requests simultaneously. This will be especially emportant if there are requests that consume alot of application time, like indexing large databases. Jim -- Jim Fulton mailto:jim@digicool.com Technical Director (540) 371-6909 Python Powered! Digital Creations http://www.digicool.com http://www.python.org Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
participants (6)
-
Andreas Kostyrka -
Brad Clements -
Jim Fulton -
Michel Pelletier -
Service Informatique CHSR -
skip@calendar.com