4 ms·
I don't know enough about MySQL vs Postgres or RedHat vs Ubuntu to make a point with them, but sometimes it's not about being cool. Apache is a webserver from
by brian_cloutier 14y ago
I don't know enough about MySQL vs Postgres or RedHat vs Ubuntu to make a point with them, but sometimes it's not about being cool.
Apache is a webserver from 1995. It uses a process (sometimes a thread) per request, a architectural decision which made it nearly fundamentally incapable of solving the C10K problem. Only back in January was the Event MPM added (and it's still experimental), allowing you to have many Keep-Alive connections open at once without degrading performance. Nginx was started in 2004, and is event-based allowing for much higher concurrency. (Yes, I'm hand waving.)
PHP is among the worst languages most sane programmers have ever used. The referenced article, "A Fractal of Bad Design" is a pretty good starting point if you want more details on why it sucks. PHP stands for letting amateurs code effectively. Python is designed with an emphasis on readability, and manages to have a rational type system and a fairly regular standard library.
Apache vs Nginx is about learning from the mistakes of your ancestors. Apache was designed with the 90s in mind, and our technology has moved on to the point where the decisions made in its architecture simply don't work anymore.
PHP vs Python is about being a rational, non-masochistic, human being.
To say what is cool "has nothing to do with any objective qualities of the [technologies involved]" is to know nothing about programming as a business.
- brlewis 14y agoPHP stands for letting amateurs code effectively. I hear this a lot. I think people assume that because lots of amateurs use PHP, it must be helping them be effective. This is not a safe assumption. A shoe does not help amateurs drive nails effectively, no matter how many amateurs you see using one. For a better of idea of how amateurs interact with PHP, see http://stackoverflow.com/questions/tagged/php http://stackoverflow.com/questions/tagged/php
- maratd 14y agoYou wrote a well thought out response. I owe you a response in kind. People have a tendency to overrate their rational capacity to reason out a viable decision. While you listed a few solid critiques, the situation is infinitely more complex. And by infinitely, I do mean exactly that. As in, beyond your capacity to reason it out. In the end, the only right decision is a decision which withstands the test of time. Both Apache and PHP have done that and continue to do so. Apache holds 65.5% of the market [1]. PHP holds 77.9% of the market [2]. Those solutions are working, right now, for all of those people. That's reality, not grand "rational, non-masochistic" theories. [1] http://w3techs.com/technologies/details/ws-apache/all/all http://w3techs.com/technologies/details/ws-apache/all/all [2] http://w3techs.com/technologies/details/pl-php/all/all http://w3techs.com/technologies/details/pl-php/all/all Now that we're finished with that, I'm going to enjoy myself. > a architectural decision which made it nearly fundamentally incapable of solving the C10K problem. C10K is not a problem and never was. The limiting factor in the overwhelming majority of deployments is the pipe. Apache can saturate the pipe just as well as NGINX. You will saturate the pipe long before you reach 10K connections. Which is why people continue to use Apache. Being technologically superior is pointless when there are no real-world benefits to that technological superiority. On top of that, Apache's thread model provides it with greater stability. If a worker thread crashes for whatever reason, another will simply spin up. If your NGINX process dies, you'll need to wait until your monitoring solution brings it back up. Which could be a long time. > PHP is among the worst languages most sane programmers have ever used. Worse than COBOL? Yes, yes, a fractal of bad design! Except that article was written by somebody who doesn't have much experience in PHP and most of those complaints don't apply to the current stable version. The rest are easily avoided with sane design. > Python is designed with an emphasis on readability Was that humor? Python shoves its version of readability down your throat and laughs as you choke on it. Not all of us get off on syntactically significant white-space. In fact, most of us don't. Which explains why Python is so unpopular. But I get, I get it. It's cool.
- deleted 14y ago[deleted]
- ceol 14y agoThe first half of your post is basically a long-winded appeal to popularity. Yes, most people on the web use PHP and Apache. Most people on the web also need nothing more than a WordPress installation and their online needs are met. Does that mean WordPress is the best tool out there? You should stop confusing popularity with quality, because the two rarely overlap. > C10K is not a problem and never was. Somebody better tell the developers of nginx, Lighttpd, Tornado, node.js, Cherokee, Apache Deft, IIS, and Jetty! All those hours wasted developing solutions to a problem that doesn't exist. > Which is why people continue to use Apache. For someone who just decried a situation "infinitely more complex" a few line breaks ago, you sure did generalize the reason millions of servers use a certain piece of software. It couldn't be because Apache has an easier installation on most of the common distros or that cPanel/WHM, the most-used virtual hosting control panel, only supports Apache as its web server. It also couldn't be because of mod_php. This all stems from your conflation of popularity with quality. PHP did not become popular because it was good. It became popular because it was easy to learn and run. > Except that article was written by somebody who doesn't have much experience in PHP and most of those complaints don't apply to the current stable version. The rest are easily avoided with sane design. Most of his criticisms were completely valid, so I'm not sure where you're getting the author doesn't have much experience in PHP. Which ones have been fixed in the current stable PHP? And which ones can be avoided "with sane design"? > Which explains why Python is so unpopular. Now I know you're spouting nonsense: https://github.com/languages/ https://github.com/languages/
- wvenable 14y ago> Most of his criticisms were completely valid Not even close. The author trolled through a bunch of other misinformed articles, copied some them verbatim mistakes and all. He doesn't know PHP and didn't research anything. > Which ones have been fixed in the current stable PHP? And which ones can be avoided "with sane design"? http://news.ycombinator.com/item?id=4177516 http://news.ycombinator.com/item?id=4177516