In my previous post, I asked the question: Why most large-scale Web sites are not written in Java. That question triggered very active discussions in the comments to my post, as well as on TheServerSide, and more recently, on Artima.
The responses to this question varied from those who took it as an offense against Java, and replied that Java is used in large-scale web applications (and even gave specific names and references); and those who said that LAMP is probably a better choice because it is much simpler. I picked Mike O'Keefe response on Artima, which IMO provides a good answer to this question:
1. Some of the biggest sites are using LAMP since that's what was proven, reliable, and had market share and skilled programmers, when they were written. Take Lands End, one of the first e-commerce sites, written in perl, C, running on Oracle DB. Or Slashdot - perl. Still is, I think. Certainly Slashdot scales, given the "slashdot effect", when Slashdotters hit a linked site, which invariably falls over.
2. All of the sites in Shalom's list are what I would call "content management", not heavy on the business logic. I think Shalom understands this as web vs. financial. But the point here is, if you are serving up mostly static pages, without too much business logic, certainly those are different requirements than a "financials" type app. Take Flickr- photos, or YouTube - video, Digg - text messages, etc.3. In addition to point #1, it also is important to consider the skills of the person writing the app. If the folks who wrote e-bay, as legend has it, over a weekend with a few perl scripts, or Facebook (PHP), in a similarly short time I think, followed the usual procedure required for your basic business app, they'd still be hashing out the requirements ;) Additionally, while certainly there are tools to simplify this (Rational Application Developer, NetBeans, Eclipse, AppFuse), but I can guarantee the effort, including steep learning curve required to hack out a simple app in J2EE (or Spring, or Struts, etc), on top of learning Java, is considerably more than hacking together a few perl scripts (or, nowadays, Ruby/Rails). To put it another way, Bill Gates scraped together 50K and bought the rights to Q-DOS. It didn't matter that even then were much better OSs out there, like CP/M. Marketshare's the key. Time enough to rewrite and build on more solid ground like NT. What's important is to take the time to do that, this will be key for Facebook.
It was quite amusing to read that some thought that I was anti-Java myself☺ (Thanks to Guy Nirpaz, my colleague at GigaSpaces, for clearing that up).
Some felt that the question itself was misleading. Well, I think that they are probably right in saying so. Finding an accurate way to put such question is very challenging.
Others felt that this was some kind of a marketing spin.
What seemed to be common to a lot of the responses is that the Java community tends to be fairly protective and defensive at first to new ideas, and many in the community view them as a threat. By doing so, we are missing a great opportunity to learn from approaches taken in the LAMP world, which address similar problems faced by the JEE community. Clearly there must be interesting lessons we can learn from them.
We simply can't ignore the fact that the sites that I was referring too were able to deal with very large-scale requirements without Java, and be very successful.
Final Words
The final word on what should be the *right* application stack hasn't been spoken yet, and we are probably going to see more of that debate in the future.
The interesting question that remains open is whether the Java/JEE world and LAMP will converge, or continue a parallel evolution.
There are new emerging frameworks that try to bridge between the two worlds: Run PHP Web Applications on the Java Platform is a good example, and Caucho and Spring On Rails. There are plenty of other emerging frameworks that I haven't listed that try to address the same challenge. Is that going to lead to convergence? - I certainly hope so. IMO there is a good chance that such convergence will happen simply because the challenges that even a relatively simple site needs to deal with become more complex when you add scalability to the list of requirements. This makes the simplicity argument in the LAMP stack significantly weaker,and the value of Java more relevant. It is now up to the Java community to embrace the LAMP world and not treat it as a threat.