ID:               19694
 Comment by:       okapi at yahoo dot com
 Reported By:      citd at mediaways dot net
 Status:           Open
 Bug Type:         Feature/Change Request
 Operating System: N/A
 PHP Version:      4.2.3
 New Comment:

I'm suprised why something along these lines isn't incorporated into
PHP such that there's an application process that could handle
application scope variables (and query caching). It seems this kind of
issue would make it match up better with ASP and Cold Fusion. Is anyone
aware of such an effort?


Previous Comments:
------------------------------------------------------------------------

[2002-10-02 03:16:56] citd at mediaways dot net

Thinking at Shared memory data-interchaning comes to my mind. (OK SSJS
can interchange data via the project-variable. But, at leat in our
project, i can't see the point for this.)

For our project a global and persistent variable is important for
SPPPPPEEEEEDDDDDD (and cost. We don't have to buy more
frontend-machines to compensate the performance losse of PHP compared
to SSJS). Having to parse the configuration for every request just
kills the performance.

------------------------------------------------------------------------

[2002-10-01 12:23:18] [EMAIL PROTECTED]

what about using shared memory?

http://www.php.net/manual/en/ref.sem.php
http://www.php.net/manual/en/ref.shmop.php

------------------------------------------------------------------------

[2002-10-01 10:19:10] citd at mediaways dot net

In "Serversite Javascript" exists the (global) "project" variable. The
content of this variable is persistent as long as the Web-Server isn't
restarted.

This concept is IMHO great for e.g. configuration-variables. Load the
configuration once and be done with it until the web-server is
restarted.

In a project i'm assigned to the configuration is stored in a
Oracle-DB. As the configuration must only be parsed once after
restarting the web-server the cost of about 2 seconds is no problem at
all. In PHP we would have to do this every time a uses requests a page,
which is to costly. Currently seems like we have to make an external
"Configuration2PHP"-Script which fetches the current configuration and
makes a static (PHP-)file out the configuration.
(The "application" is "stateless", so it can't be achieved over a
session. (->reading the config-reading once per user). And the
application is running on many web-servers. With the stateless design
the load-balancing is easier as you don't have to "bind" a session to a
specific web-server or making a DB-Session or something similar. And
you don't have problems with expired/stalled sessions.)

"Better(tm)" would be if a concept like a persistent variable is
introduced. IMO others would appreciate that too. :-)

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=19694&edit=1

Reply via email to