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.