Re: Persistant global objects: WAS: RE: [PHP-DEV] ZendEngine2 availability
| From: | Alan Knowles | Date: | Fri, 06 Sep 2002 02:26:47 +0000 |
| Subject: | Re: Persistant global objects: WAS: RE: [PHP-DEV] ZendEngine2 availability | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-87982@lists.php.net to get a copy of this message | ||
Sounds like a job for srm... http://www.vl-srm.net/
Obviously other options include SOAP servers.. etc.
or just using shm and storing a serialized object in there.
or use a ramdisk.....
Something like this is difficult since php normally is not run threaded (eg. apache/cgi...) at the moment, so there is no 'central memory store' that could be used easily with it. - Apache 2 with thread support (when it is ready?) may help..
I'm sure theres a few other ways.....
Regards
Alan
Tyson Lloyd Thwaites wrote:
Hi guys, thanks for your help, I was able to get a Z2 build up and running. Unfortunately it didn't appear to be quite stable enough for what I'm doing yet, but at least it is cmoing along nicely! One question while I'm here: I'm interested in persistant global objects, like ASP's Application objects. I am sure this has been talked out on the list before, but I did a quick search and couldn't find anything. Is this possible? Yesterday I wrote my first PHP test extension (Yay! I'm so happy - until now I've been terrified of it!) I was able to register a class in the zend engine (after to looking at the PECL stuff), but I was wondering whether I could register a live, running object somewhere so that all scripts could access it across requests? Would this maybe even require access to an external engine written in C? At the moment I have a static Application object in PHP that just writes serialized objects to disk. This is not quite the same as having the object staying in ram though. I have implemented a Factory class that creates data objects and caches them to prevent database hits, and this speeds the process up by about 400%. But there will be thousands and thousands of these objects, and I would love to store them in RAM. I know this sort of thing should really be written in Java, but I decided to stick with PHP for this project so there is no going back! Any comments, corrections, put-back-in-boxes, or thoughts on how to do this will be ecstatically (get it? static? never mind) received. Cheers Tyson Lloyd Thwaites Technical Lead I.T&e Limitedas to when the-----Original Message----- From: Rasmus Lerdorf [mailto:rasmus@php.net] Sent: Thursday, 5 September 2002 5:50 To: Zeev Suraski Cc: Tyson Lloyd Thwaites; dhardiker@staff.firstcreative.net; php-dev@lists.php.net Subject: RE: [PHP-DEV] ZendEngine2 availability Or just checkout php4-ze2 instead and you will get everything in one go named correctly. On Thu, 5 Sep 2002, Zeev Suraski wrote:Not sure why nobody stepped in and said it, but the Engine2 isquite aliveand kicking. You just have to work a bit in order to get afairly recentversion. Not so recent version: http://www.php.net/distributions/php-4.3.0-dev-zend2-alpha2.tar.gz http://www.php.net/distributions/php-4.3.0-dev-zend2-win32-alpha2.zip Getting a recent version - check out the latest version of PHP,erase (orrename) the Zend/ directory inside it, and then check-out theZendEngine2module from cvs.php.net:/repository. You would have to rename that new check-out to 'Zend' so that PHP uses it. Once that's done - build, and you'd have a ZE2-powered version. It's pretty much betaquality at this stage.Zeev At 02:29 05/09/2002, Tyson Lloyd Thwaites wrote:Oh, ok. Sigh! I'll stick with the old engine then. Thanks Tyson Lloyd Thwaites Technical Lead I.T&e Limited-----Original Message----- From: Dan Hardiker [mailto:dhardiker@staff.firstcreative.net] Sent: Wednesday, 4 September 2002 6:36 To: tysonlt@webmedia.com.au Cc: php-dev@lists.php.net Subject: Re: [PHP-DEV] ZendEngine2 availabilitySorry if this is out of place, but is there any estimates
this list, butfamous Z2 might be ready?There is more (accurate) information in the archives of
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.phpfrom what I recall, the estimates were about 6 months off. -- Dan Hardiker [dhardiker@staff.firstcreative.net] ADAM Software & Systems Engineer First Creative Ltd-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php