Re: keeping descriptors in persistent connections

From: Date: Thu, 28 Jun 2001 09:18:11 +0000
Subject: Re: keeping descriptors in persistent connections
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-58298@lists.php.net to get a copy of this message
Hello Joao, On Wed, 27 Jun 2001, Joao Conceicao wrote: > Hi, > I'm having a problem making a module that uses persistent connections. > It's possible to reuse the same descriptors (file descriptors) in two > diferent pages? How? It's not really possible with PHP to do this. Of course there are persistent connections to databases, but these are per Apache child, which will be recycled after a number of requests. And you can never be sure if the next page request is handled by the same Apache child. With database connections this is not really a problem, as the connections will be opened per Apache child (and so you'll end up with the same number of conncetions to the database, as there are Apache child processes). This was one of the reasons that SRM was developed. SRM is a deamon program which can be used from PHP to manage data structures (such as Filedescriptors) which won't be destroyed when an Apache child dies (because they are used from the deamon). SRM was built in such a way that modules (like a fileaccessing module) can be easily added. The API is a little easier then PHP even. For more information about SRM or how to write such modules, see http://www.vl-srm.net/ or feel free to contact me. regards, Derick Rethans --------------------------------------------------------------------- PHP: Scripting the Web - www.php.net - derick@php.net SRM: Site Resource Manager - www.vl-srm.net ---------------------------------------------------------------------

« previous php.dev (#58298) next »