Re: Server-Wide Persistent objects in PHP?
| From: | Edin Kadribasic | Date: | Wed, 05 Dec 2001 10:50:01 +0000 |
| Subject: | Re: Server-Wide Persistent objects in PHP? | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-72563@lists.php.net to get a copy of this message | ||
On Wed, 5 Dec 2001, Stig S. Bakken wrote:
> Importing objects into the current Zend/PHP instance and then updating
> them at request shutdown introduces a lot of tricky synchronization
> problems, I think it's very difficult to implement reliably with Zend as
> well.
>
> IMHO a better solution would be using a remote object access mechanism.
> There are several choices available today, such as Corba, SOAP or
> XML-RPC (check out php4/pear/PEAR/Remote.php for an example
> implementation using XML-RPC). According to Derick, SRM can do this
> today, which would probably be a lot faster than both Corba and the
> XML-based protocols.
The trouble with remote object access mechanisms is that most of them are
really slow. I had great success with serializing objects and arrays into
shared memory. All of that was done in PHP using sysvshm extension. Maybe
some system support for that could make it even easier and hopefully
even faster.
The approach is not perfect. Your objects become readable to every
user on the same webserver, so it would probably be impractical for ISPs
to enable it.
Edin