James Gosling, the “father of Java,” recently commented on PHP:
“PHP and Ruby are perfectly fine systems,” he continued, “but they are scripting languages and get their power through specialization: they just generate web pages. But none of them attempt any serious breadth in the application domain and they both have really serious scaling and performance problems.”
…
PHP (for example) is able to make things simpler because it’s 100% aimed at web pages, Gosling explained. Whereas with Java, he said, “We have a balancing act: we need the simplicity but we also need power.”
The headline here should be “Father of Java says writing web applications in PHP is simpler.” This is pretty much what I said in my Comparing PHP with other languages post:
Why is Java considered so complicated? One reason is that it is designed to run on everything from servers to cell phones, from desktops to dishwashers. It’s scope is impossibly general. Of course, specialized tools such as Rails and PHP are more productive for their sweet spot applications.
Both .NET and Java have this be all things to everyone mentality. If you need that generalization, fine, but generalization is not without cost as Gosling points out.
He called Simplicity and Power “evil twin brothers” – “Building systems that have a lot of power just attract complexity. Because of the way that the world has become so interconnected it helps to have systems where it carries over from one domain to another. You can do web presnentation stuff really well in PHP but you couldn’t write a library that does, say, interplanetary navigation.
So, if you are writing software for interplanetary navigations, by all means, choose Java. If you just want to write really good web applications quickly, choose PHP.
Regarding the scalability and performance characterization. I’m so tired of that. PHP performs and scales just fine for many people. Flickr makes an interesting case study of PHP scaling:
“Regarding the scalability and performance characterization. I’m so tired of that. PHP performs and scales just fine for many people.”
How do you know that Gosling was talking about web apps? It’s not possible to determine that from the article. He said:
“But none of them attempt any serious breadth in the application domain and they both have really serious scaling and performance problems.”
Since that was paired with a statement about Ruby and PHP lacking breadth, maybe he meant that they have scaling/performance problems in certain domains, not necessarily web apps. Surely you’ll agree there are some areas (desktop GUI applications, long-running system daemons, etc.) where PHP *would* have scaling/performance problems and Java would not? Perhaps that was what Gosling was referring to; who knows? This seems to be supported by his other statement:
“You can do web presentation stuff really well in PHP…”
so I think it’s likely that he didn’t mean web apps when he said that PHP has “serious scaling and performance problems”. Just my interpretation…
Realise the scaling thing is tiring but it’s also interesting.
There’s some excellent stuff about Wikipedia’s architecture floating around as well. There was a bunch of fascinating talks at some wiki conference in Berlin, if I remember right (lost the link) – some detail on the architecture and some fascinating insights like how the need to “diff” word by word, not line by line.
A quote from a fairly lightweight article here: http://www.wired.com/news/culture/0,1284,66210,00.html
So that’s the opinion of someone who has scaled.
In fact I wonder if PHP (and MySQL, Apache, Squid and everything else involved) needs to bang the wikipedia drum more often. I love to hear more from those involved.
When you look at alexa’s top500, Wikipedia is number 19;
http://www.alexa.com/site/ds/top_sites?ts_mode=global&lang=none
Now looking at the sites ranked higher, only myspace.com (coldfusion?!?) and ebay (claims to have “gone J2EE” but still much C++ around) might be considered “many-to-many”: sites which are having to cope with lots of reads and writes. The rest are effectively read only : updates are restricted to the few. What would be a really interesting statistic is the number of GET vs. POST requests these sites are having to handle.
The point is I think wikipedia certainly has unique scaling requirements and perhaps the most challenging – no one really has an architecture on their drawing board to handle this (no matter how much they get paid to invent ones). So far the LAMP stack has worked well for wikipedia. Or as a snide turn around – have Java ever scaled to anything like this?
Also wonder if Java really would be a good choice for interplanetary navigation – at least if writing such systems ever became close to mainstream – strikes me you’d want a language specialized to that task such as data structures that makes it easy to work with 3d + time. Also a long might need to be very very very long – perhaps longer than what Java offers right now? And what about relativistic data types
[...] James Gosling on PHP – Professional PHP (tags: php scaling programming) [...]
You definitely know how to bring an issue to light and make it important. I cant believe youre not more popular because you definitely have the gift.
Hi, I’m just trying to get a pdf in the browser but I’m getting a blank response.
10 Google Products That Failed to Live Up to Expectations
[...]The information mentioned in the article are some of the best available [...]……
[...]The information mentioned in the article are some of the greatest available [...]……