RE: [PHP-DEV] Persistant global objects: WAS: RE: [PHP-DEV] ZendEngine2 availability

2002-09-05 Thread Tyson Lloyd Thwaites

I actually had a look at msession, and for a while I thought that was the
answer, but msession sends all its data through sockets...bye bye speed. I
made an Application object that used either msession or files as storage,
and files proved faster by about 2 times. But I want just RAM
storage...pervasive computing and all that. Otherwise msession would have
been perfect!!

Maybe there's a way to more tightly integrate it with PHP, so it send data
directly somehow (shm?), rather than through sockets...

Tyson Lloyd Thwaites

Technical Lead
I.T&e Limited

-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DEV] Persistant global objects: WAS: RE: [PHP-DEV] ZendEngine2 availability

2002-09-05 Thread Tyson Lloyd Thwaites

Something like that would be great. Do you mean store the *PHP object in
smh, after serialization, or do it on the Zend side from within an
extension? I guess what I am after is the ability to cache certain data
objects so that they can be retrieved with maximum speed, because there will
be thousands of them.



If these data objects could be written in C, and stored in some great global
washing basket in the sky, then that would just be great. Threaded access
will be an issue, but we can deal with that by using a single Application
object. I just have a feeling that all the serialize/deserialization that is
happening now will be bad for scalability, when it constantly needs to hit
the disk to create these objects.

Just a few thoughts. I would love to come up with a funky solution to this.

(PS: AFAIK ASP Application vars are actually stored in a seperate,
single-threaded containter. This is somewhat amusing, as many programmers
(myself included once :) store database connection objects in the
Application to save having to reconnect - little did we realise that there
might 100's of different requests all queueing up to use this single
connection...heh heh :)

Thanks for your help,

Tyson Lloyd Thwaites

Technical Lead
I.T&e Limited

> -Original Message-
> From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 6 September 2002 12:19
> To: Tyson Lloyd Thwaites
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-DEV] Persistant global objects: WAS: RE: [PHP-DEV]
> ZendEngine2 availability
>
>
> You could just stick it in shared memory.  Obviously given the standard
> multi-process Apache architecture application objects ASP-style cannot be
> implemented the same way.
>
> -Rasmus
>
> On Fri, 6 Sep 2002, 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 Limited
> >
> > > -Original Message-
> > > From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, 5 September 2002 5:50
> > > To: Zeev Suraski
> > > Cc: Tyson Lloyd Thwaites; [EMAIL PROTECTED];
> > > [EMAIL PROTECTED]
> > > 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 is
> > > quite alive
> > > > and kicking.  You just have to work a bit in order to get a
> > > fairly recent
> > > > version.
> > > >
> > > > 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
> > > &

[PHP-DEV] Persistant global objects: WAS: RE: [PHP-DEV] ZendEngine2 availability

2002-09-05 Thread Tyson Lloyd Thwaites

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 Limited

> -Original Message-
> From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 5 September 2002 5:50
> To: Zeev Suraski
> Cc: Tyson Lloyd Thwaites; [EMAIL PROTECTED];
> [EMAIL PROTECTED]
> 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 is
> quite alive
> > and kicking.  You just have to work a bit in order to get a
> fairly recent
> > version.
> >
> > 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 (or
> > rename) the Zend/ directory inside it, and then check-out the
> ZendEngine2
> > module 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 beta
> quality 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:[EMAIL PROTECTED]]
> > > > Sent: Wednesday, 4 September 2002 6:36
> > > > To: [EMAIL PROTECTED]
> > > > Cc: [EMAIL PROTECTED]
> > > > Subject: Re: [PHP-DEV] ZendEngine2 availability
> > > >
> > > >
> > > > > Sorry if this is out of place, but is there any estimates
> as to when the
> > > > > famous Z2 might be ready?
> > > >
> > > > There is more (accurate) information in the archives of
> this list, but
> > > > from what I recall, the estimates were about 6 months off.
> > > >
> > > >
> > > > --
> > > > Dan Hardiker [[EMAIL PROTECTED]]
> > > > ADAM Software & Systems Engineer
> > > > First Creative Ltd
> > > >
> > > >
> > > >
> > >
> > >
> > >--
> > >PHP Development Mailing List 
> > >To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> > --
> > PHP Development Mailing List 
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php