From: Rasputin Date: 2003-05-08T08:55:20+09:00 Subject: Re: Why is PHP so popular? What can we learn from the PHP camp? * henq [030508 00:42]: > I beg to differ. You get many requests per second. So you need a thread or > process mechanism to let each request get its response when the response is > calculated/assembled/generated. > > Apache happens to do just that *very* efficiently, by spawning off > processes. MySQL connections are pooled by the way (transparently for the > developer, if you want). I don't use MySQL, but I doubt that forking off a subshell to run a CGI is as fast as starting a new thread on an existing object instance to service an incoming connection. [ Apache of course preforks *itself* to speed things up, but there's nothing stopping you doing the same thing with a thread pool, although I'll leave that as an exercise for the reader :) ] > Monolithic apps have disadvantaged too, you know. For example, if they > crash, the whole app crashes, not just one script in a remote corner of the > web application. Sure, but that's like saying if apache crashes, all the CGIs stop working... > >From a computer sciences point of view app servers are the greatest, but in > real life, the mod_* / apache combo's are hard to beat. I *tried* to love mod_perl, honest. But having to rewrite a CGI to run under it is a pain in the ... neck. Cheers. > "Rasputin" wrote in message > news:20030507141127.GA50159@shrike.private.submonkey.net... > > * Brian Candler [030506 11:34]: > > > > > IMO, ruby appservers are the way to go, rather than a CGI-based approach > > have persistent objects on the server, and spawn a new thread for each > client. > > The servlet model is A Good Thing for OOP code, as opposed to a > > 'when the client connects fork off a shell with this in' legacy approach. > > > > -- > > Rasputin :: Jack of All Trades - Master of Nuns > > > > > -- Rasputin :: Jack of All Trades - Master of Nuns