Quote:
Originally posted by Nathan
Overhead when executing a C/C++ CGI app is rather huge. Why? Well, Apache first has to run an exec call, which basically FORKS apache and then lets the CGI app take over the process. This prosess is rather time consuming and resource hungry.
|
Hey, Nathan -- I'm going to have to respectfully disagree with you here. Hopefully nobody who goes to all of the effort to write a C/C++ app is going to run it as an Apache CGI module. If you were determined to use Apache, a custom mod_ would probably make the most sense, but why even bother with that?
In my opinion, the highest performing web app is going to be a pure C application with built-in web serving. Of course, this is massive, insane overkill for almost any application, and it means that in addition to your actual app, you effectively have to maintain a web server as well (well, you can buy web server source code off the shelf, or a few other options, but it gets crazy).
All that said, I can't imagine a web app that anyone in this industry is going to need that PHP wouldn't be able to do just fine. The development costs and complexities with C/C++ are dramaticalyl higher, so if raw performance is an issue you'd probably be better off going PHP and just throwing more hardware at it than going C.
Cheers
-b