I'm building a reusable component object system in PHP where construction
of object trees, which needs to occur on every page, is very expensive. 

Running the subsequently built objects is very inexpensive. 

To make this system viable to use on high volume websites, I want to get
rid of the "construction of objects on every page" part which means I 
want the ability to make object instances long lived. (i.e. build the
object once and have it live for as long as the server lives similar to
the way you can make objects server-wide global in mod_perl).

Based on feedback I've gotten from the php-general list it looks like
this kind of thing hasn't been implemented yet for PHP. Correct?

If not, could anyone provide pointers where I could start taking a look at
PHP internals to develop such a beast? 

   Where I can find out:
        
        how are classes represented internally?
        how are objects represented?
                
        how can I establish classes/functions/variables/objects that have
        a server-wide global scope? What infrastructure needs to be kept
        around in order to keep these objects valid?
        
        can one have php interpreter instances share data? (i.e. might
        the best solution be to build "another" php interpreter instance
        that persists and have an interface to pass references in and
        out of it?)

Any other suggestions would be greatly appreciated. From what I've been
able to gather having a long-lived object cache in the serverr would
make PHP much more viable for high load situations.

On a related question, is there a way to pre-load class definitions when
the server starts so that class definition files don't have to be
re-parsed on a page by page basis?

thanks,

-- Yermo
 
---------------------------------------------------------------------
DTLink Software                                       [EMAIL PROTECTED]
Software Development and Consulting        http://services.dtlink.com
---------------------------------------------------------------------



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to