Smart new drivers for Net_Server

From: Date: Mon, 24 Nov 2003 07:46:59 +0000
Subject: Smart new drivers for Net_Server
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-23821@lists.php.net to get a copy of this message
Hi, I developed a new driver module for Net_Server, the purpose is to implement a multi process behaviour like Apache one; it's implementes as a base driver that extends Net_Server (Multiprocess.php) and includes a user-defined Multi Process Module. At this moment I developed only one MPM, MPM-prefork. It act as the Apache one (http://httpd.apache.org/docs-2.0/mod/prefork.html): it forks a number of initial processes then sits back into a separate process, and regularly checks the process usage. When all process - 1 are busy, before the next client will add to the queue, it forks a new process. In this design the MPM process holds all server processes informations, and so it's responsible for stopping the server too; I also implemented a remote socket-based console that can be used in conjunction with Net_Server_Multiprocess to perform run-time operation against the server (for example list running processes, have a snapshot of listener's usage like apache server-status, stopping the server by sending a remote commad to MPM process). All this stuff make use of the PHP_Fork class as I proposed to Pear Community Vote a few weeks ago. I think that we should not renounce to exciting chanches that multi process applications offers; for business reasons my everyday work is with J2EE and I think that a PHP-CLI application with 10 processes running is still lighter & best working & less-resource-intensive than a Java one with 10 poor Threads running... I'm actually cleaning up sources and refactoring some things, when finished this job I'll post you a link to PHPs. Thanks, Luca

« previous php.pear.dev (#23821) next »