Re: Re: Persistent PHP web application?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > However, would a single process PHP server daemon be able to
> > appropriately handle the incoming load from Apache, which will be
> > running multiple processes handling concurrent incoming requests?
>
> I don't think you've quite got the right picture here...
>
> When you write your single process PHP server daemon, Apache's not even in
> the same picture frame any more.
>
> The requests aren't coming from Apache -- PHP is listening to a port you
> select, exactly in the same way that Apache listens to port 80, MySQL
> listens to 3306, your SSH server listens to 22, your Mail server listens
> to 25, your FTP server listens to [I forgot]...
>
> In other words, you are giving PHP a "promotion" from a Module of Apache,
> to being its own "web" server, only it won't be a "web" server, it will be
> a "Whatever You Want" server.  I'll call it WYW (Whatever You Want) for
> the rest of this post.
>
> Just don't ask me how to pronounce WYW. :-)

pronounce it like "wha u" as in "wha u say?" :)

What I envision is an apache server running mod_php, opening sockets to
a standalone "WIW" (whatever I want) server (a long-running PHP script)
on some other port.  Apache/mod_php handles the remote HTTP clients, the
WIW server treats the php scripts running from apache as clients.  This
is what I meant by "the incoming load from Apache."

> I'm betting the do-nothing PHP socket-server will handle VERY heavy load.
> That code is all thinly-disguised wrappers around the C socket library on
> your server -- The same library Apache, FTP servers, and so on are all
> using to handle their load, almost for sure.
>
> Whether or not what you need to *DO* with the incoming data and your
> calculations needed to compose a valid response will be fast enough really
> depends on what you want your WYW server to *DO*...
>
> You might even want to have multiple PHP processes going, just like
> Apache, if you need to handle really have load.

Ok I'm getting the picture.

Am I barking up the wrong tree with this whole concern for persistent
PHP native variables and code? It seems like the implementation of a
standalone PHP server is overkill and I ought to just throw more
loadbalanced servers at the application rather than cut the application
init time with a solution like this... or at least that is how I'm
starting to see it.

Not to say you're suggestions are in vain, if anything they're helping
me to see the bigger picture.

Regards,
/josh w.

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux