persistent connection api [was Re: [PHP4BETA] how does the ZTS work / where are the mutexes?]
| From: | Sasiha Schumann | Date: | Tue, 17 Aug 1999 13:13:29 +0000 |
| Subject: | persistent connection api [was Re: [PHP4BETA] how does the ZTS work / where are the mutexes?] | ||
| References: | 1 2 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-3482@lists.php.net to get a copy of this message | ||
> hmm, module writes should than consider to create their own "private"
> "global" persistent list - so we can do connection-pooling. i got most of
> that stuff already in place for oci8 (lucky me;-) - question is: do we
> want to create an API for things like this? - i think it would be a nice
> idea.
Another suggestion for another API: Most modules handling
persistent connections contain almost the same code for handling
these resources. The API could be as simple as
long acquire_resource(char *modname, char *key, void *(*create)(char *key));
Checks whether a resource with that specific `key' has already
been created in the namespace `modname.'
If it does not exist, it calls the create function and passes
the key. The `void *' result of that is stored in a
persistent list.
The function returns the list id of the stored entry.
--
Regards,
Sascha Schumann
Consultant