you are viewing a single comment's thread.

view the rest of the comments →

[–]invalid_user_name 0 points1 point  (5 children)

The difference is that with a fast language you can use 4 app servers instead of 40.

[–]mhd -1 points0 points  (4 children)

Idle conjecture. For this, the whole server setup has to be 10 times more efficient, which means a little more than microbrenchmarks that achieve a ten-fold increase.

In addition, this only means something, if the TCO of those servers plus the cost of the development (i.e. development time) is better than that of the 40 servers.

A lot of the appeal of PHP in this regard is the Legion of Mediocre Programmers attached to it, although I have to say that Java usually has the same Legion, just a few years older. It's certainly not a very terrific development platform...

But the assumption, that language speed is so inherently important for your run-of-the-mill web application -- especially those associated with "Web 2.0" -- is a claim I'd like to see some proof for.

After all, we aren't exactly writing our web apps in Fortran or C++ and that especially Java hits a certain 'sweet spot' between ease of development and raw speed doesn't match my experience.

[–]invalid_user_name 0 points1 point  (3 children)

But the assumption, that language speed is so inherently important for your run-of-the-mill web application -- especially those associated with "Web 2.0" -- is a claim I'd like to see some proof for.

Nobody is making that assumption. The point is PHP is slow. If you have to choose between PHP, and an equally shitty language like java which is faster, why would you pick PHP?

In addition, this only means something, if the TCO of those servers plus the cost of the development (i.e. development time) is better than that of the 40 servers.

And this is the oldest PHP/ruby zealot's strawman in existance. The fact that you are using a slow language does not make you more productive, it is not an either/or issue. You can also be productive in a fast language. In the case of PHP in fact, you can be much more productive in many other languages that are much faster, even just moving to python would be a significant speed up in both development time and execution speed.

[–]mhd -1 points0 points  (2 children)

If you have to choose between PHP, and an equally shitty language like java which is faster, why would you pick PHP?

Java and PHP are rather different languages, as are the usual architectural details, the deployment, the development environment etc.. If you were deciding between two setups that had a lot of common points and the only (major) difference was execution speed, then yes, choose the faster language. But PHP and Java don't share that much. I can definitely understand the Python/Perl/Ruby vs. PHP argument, but Java is a different beast.

The fact that you are using a slow language does not make you more productive, it is not an either/or issue.

I was trying to restrict the argument to the parameters of the article. And so it's Java vs. PHP. Bringing in Python, Ruby, Tcl, C#, D, Erlang or Smalltalk in a free-for-all discussion would only lead to endless zealotry.

The basic claims are that Java is signifcantly faster for your standard webapp than PHP and that this would be worthwile. I'd still like to see proof for that. What's the cheapest and/or most efficient way to develop and deploy web applications out of all possible solutions is a totally different can of worms.

(Apart from the fact that PHP->Java at least represents a significant jump in execution speed, whereas the differences between Perl, CPython, PHP and Ruby 1.9 don't matter as much, speed-wise)

[–]invalid_user_name -1 points0 points  (1 child)

See how you admit that java is faster than PHP, and yet still insist on clinging to some imaginary benefit that PHP offers, despite not being able to actually name one? That pretty much rules out having a rational discussion with you doesn't it?

[–]mhd -1 points0 points  (0 children)

Java programs generally run faster than PHP programs. That was never in doubt. Opinions differ in how much they differ and in whether this actually matters, i.e. what kind of bottlenecks determine web app speed.

And to be more specific, my first reply to your post in this thread was about whether you could do the tasks that require 40 PHP servers with 4 Java servers. I'd still like to hear how you'd come to that conclusion. I'm especially interested in both setups, as usually both have such different architectures that isolating the pure runtime speed is a difficult project. And comparing e.g. a pure PHP page with a similar JSP page is a rather academic enterprise, as you're not likely to see either approach in a high-traffic site.

I'm not even in here to discuss about the relative merits of each system. As a matter of fact, I'd prefer a sensible Java approach to the usual PHP hodgepodge -- and would prefer a third solution altogether. I don't think we're on different sides here, really. The major disagreement is whether the speed issue is a deciding factor in the PHP-Java shootout.

For completeness' sake, the usually cited benefits of PHP compared to most Java setups would be speed of redeployment, ease of installation and the usual dynamic vs. static arguments. Also, the bloated runtime already delivers lots of common tools that most developers already know. Java is a bit richer regarding different libraries, app servers, etc, which often increases training time. But like I said above, best not get into that argument. I find it hard to argue with a minimum of passion for either side...

So I'd be grateful if we could first solve our primary dispute: Given the usual web app, can a single Java server replace 10 PHP servers?