RE: [PHP-DEV] serializing references, almost without modifications
| From: | David Hjortso | Date: | Thu, 20 Jul 2000 10:52:10 +0000 |
| Subject: | RE: [PHP-DEV] serializing references, almost without modifications | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-25199@lists.php.net to get a copy of this message | ||
Hi,
> This is why I suggest it may be dangerous, to save state in what is
> essentially a stateless environment.
I doubt you mean dangerous, what you mean is that you think it's
non-optimal.
> So you get a request for a page, you create a parser (e.g.), do some
> work and send a page back to the client. You save the state of the
> parser so that on the next request you do not need to reinitialize it.
> What if the client goes off to lunch? Connection is broken?
Just as it would with *any* session, when its life time is over it'll be
deleted by the gc. ALL (or nearly all) applications/services on the web are
built on this principal, it's not like we're inventing anything -- its used
just about anywhere.
> Then you have to time out, and clean up... and that means someone has
> to keep track of what is where and when etc.
> This sort of situation is also not scaleable, although we could make
> something that will save and restore state, how well will it function
> when the hits move from one a minute up to thousands/minute?
Ask amazon/yahoo/hotmail/chek about that, seems like its working fine for
them.
> Rather than try to create ways of saving state, I would try and create
> a system where state is not needed. In those situations where some kind
> of state is needed pass it to the client and back.
Perhaps but that's most likely never going to happen with PHP.
Kind regards,
David Hjortsoe.