There is a bit of a flap which you may have seen on Slashdot recently over the moving of Friendster (aka "The Devil") from Java to PHP. The whole thing is summarized nicely by Chris Shiflett here.
The depressing thing about discussions like this is how much misinformation gets spread around. Here are a few examples:
There is one thing about Java which can be a problem for scalability, and that is the proprietary nature of many of the server environments people run it on. If you buy a commercial J2EE server, the vendor will promise you incredibly scalable session data storage and database caching, but they will typically not tell you how they do it. When you run into trouble, you have no knobs to twiddle and no alternate options because the whole thing is closed to you. This is why I would recommend that people wanting to use a Java solution should look at the open source tools instead, especially the new lightweight ones.
The most unfortunate thing about this PHP/Java discussion is that people still aren't talking about the things that actually do make a system scalable, like ways of limiting the resources that each active user on the site takes up, and ways of handling overload gracefully.
Okay, I guess I had a little more to say about this than I thought. I'm going to stop here for now. Maybe some of this will filter into my OSCON talk.
This is why I would recommend that people wanting to use a Java solution should look at the open source tools instead, especially the new lightweight ones.
Friendster was using Tomcat, which is open source, but is hardly lightweight.
The first shoe dropped on J2EE when people began shying away from container-managed persistence in favor of rolling their own. I wonder if we're seeing the second shoe drop.
Re:Open Source, but still heavyweight
lachoy on 2004-07-04T13:26:45
I think Perrin is referring more to the lightweight containers like Spring and (to a lesser extent) Pico Container.Spring is much easier to work with than J2EE and replaces a good deal of its useful functionality -- declaring transactions and security, creating components and dependencies -- and allows you to use Spring within J2EE for the other stuff like remoting, or when your project shalt use WebSphere or the like.
It's also interesting to note that one of the main motivations behind the lightweight containers is testability. EJBs are very difficult to test because you have to run them in-container, which makes the startup time too onerous to actually run the tests as many times as you should. I think testability is a really useful code smell -- if something is hard to test, you should probably stay away
:-)