Kyler Laird said:
Outstanding points. For trivial applications, CGI is fine, but beyond
that we get into the need for this infrastructure. Creating it from
scratch (or bundling it into each application) is a pain and demands
ongoing maintenance. It's great for "tinkerers" but doesn't make
sense for someone wanting to concentrate on building applications.
A Python solution for all of this is Zope.
There are several solutions for Perl, and I'd imagine that there's at
least one for Tcl, but that's sort of beside the point.
Going the Java route buys you some things. There are a lot of Java
developers out there, and with baseline-competent management, Java can
do a decent job of protecting you from less competent developers.
(Much as I like Perl, the same cannot be said for it.) There is a
standard interface between the web application and the container that
can handle the more annoying problems such as object persistence,
session state, and authentication, not to mention more difficult
things like load balancing and clustering.
At the same time, Java has a lot more overhead. You'll need more
hardware and probably more support staff, and the easy availability of
Java support staff is no indication that they're any good. And then
you get to run into the single biggest Java headache. Because the
implementation involves everything running in a virtual machine, and
many code libraries are closed-source, with just the interface and the
compiled bytecode available, it can be extremely difficult to track
down a bug: even identifying with any certainty whether the issue lies
in your code, in the library you're calling, or in the JVM can be a
pain.
I suppose what I'm getting at is that if you're comparing FastCGI to
Java based solely on performance, you're ignoring a whole host of
criteria that can be equally as important: development speed,
available support, and scalability, just to name a few. In
particular, if you've got programmers and admins on staff who can do
good work with FastCGI, don't force them to use Java instead; the
results will probably be horrible at first, and any performance
improvement you expect to see by switching to Java will be more than
offset by the learning curve.
My advice would be to use Java for a project or site that is large
enough to afford the overhead, and to use a language-based approach
(mod_perl, Mason, Zope) otherwise. If you're the only person working
on the project, it's almost certainly too small to be worth the
overhead.
Charlton