|
Posted by Jerry Stuckle on 08/24/05 16:08
thehuby wrote:
>>>and what if this
>>>PHP application had thousands of concurrent users? Would you have to
>>>iterate though all the *session* files to find the one with that object
>>>open? Yes, you would.
>
>
> There are instances where this is actually used quite frequently in web
> services - such as a wrapper class for db execution. Limiting the
> number of concurrent uses of a db connection object by initiating X
> number fo connection objects, then leasing them out to users or objects
> that require them.
>
> In java/jsp/j2ee these would be objects with application scope (alive
> as long as the applicaiton is running, instead of sesssion based or
> page based).
>
> I can't say exactly why you need to do this, but I've never seen a
> similar thing in PHP (not syaing it doesn't exist but I am not an
> authority on cutting edge PHP, or even PHP OO tbh).
>
> Just my two cents.
>
> Rick
> www.e-connected.com
>
There's a good reason why you haven't seen it in PHP. It can't be done at the
page level - at least not easily. For instance - what would you do if there are
no pages being processed? There would be no objects to manage the connection pool.
A Java application could roughly be equated to a PHP page - the code starts when
the page execution begins and is all cleaned up when the page execution ends.
And once the Java app ends, everything there is cleaned up, also.
What you would probably need would be an Apache extension to manage the pool
then code to that extension.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|