Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

sqldatasource dal, wwwxxxenden, convert raid5 to raid 10 mdadm, apache force chunked, nrao wwwxxx, xxxxxdup, procmail change subject header, wwwXxx not20, Wwwxxx.doks sas, linux raid resync after reboot

Links

XODOX
Impressum

#1: Persisting objects over application lifetime (without serialization)

Posted on 2008-04-13 16:25:21 by Nils Magnus

Hello, is it possible when using PHP5 as an Apache module (with or
without third party products/modules) to persist objects for the
lifetime of the application?

I'm not talking about serializing objects when a request is processed,
then unserializing them in the beginning of the next request - but
rather thread-safe objects that can simultaneously be used by several
requests.

I have been suggested making a PHP script that runs stand-alone,
listening on TCP/IP for local requests from the Apache web scripts.
While this absolutely is a feasible solution, I was hoping the same
could be accomplished without the use of having a stand-alone script
(which basically means another server process to watch and monitor).



Regards,
Nils Magnus

Report this message

#2: Re: Persisting objects over application lifetime (without serialization)

Posted on 2008-04-13 18:07:23 by Jerry Stuckle

Nils Magnus wrote:
> Hello, is it possible when using PHP5 as an Apache module (with or
> without third party products/modules) to persist objects for the
> lifetime of the application?
>
> I'm not talking about serializing objects when a request is processed,
> then unserializing them in the beginning of the next request - but
> rather thread-safe objects that can simultaneously be used by several
> requests.
>
> I have been suggested making a PHP script that runs stand-alone,
> listening on TCP/IP for local requests from the Apache web scripts.
> While this absolutely is a feasible solution, I was hoping the same
> could be accomplished without the use of having a stand-alone script
> (which basically means another server process to watch and monitor).
>
>
>
> Regards,
> Nils Magnus
>
>

Sorry, there isn't anything built in to do what you want. You should be
able to implement something in shared memory, however. You would have
to implement your own mechanism to make them thread safe.

Which gets to the real question - what are you trying to accomplish?
Maybe there are better ways.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Report this message