Reply to Re: PHP 5 & OO

Your name:

Reply:


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
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация