bundled example appserver (Jetty vs Tomcat)

2006-06-20 Thread Yonik Seeley

The servlet container we bundle for the example server, Jetty, is
turning out to have a number of bugs (or maybe just a few that
multiple people have all hit) in the new 6.0 line, and the 5.1
stable line.

Nice things about Jetty vs Tomcat:
 - very easy to start java -jar start.jar, and more foolproof than
Tomcat since we rely on $cwd for the demo to find the solr home
./solr
 - fewer files, esp in bin... easier to understand what is needed and
what is not
 - log messages appear right on console, so errors are immediately
apparent.  You don't have to teach users how to go look through
multiple log files, and you don't have to teach them about shutting
down the server (just the normal CTRL-C)

Nice things about Tomcat 5.5 vs Jetty 5.1:
 - more stable!
 - doesn't require a JDK... can run with a JRE (Jetty6 could as well
since it uses JDT)
 - biggest user community, better docs, better support
 - slightly faster (in my micro benchmark sending deletes to Solr)

So, I'm obviously leaning toward Tomcat, esp if we can make it easy
enough for new users. Maybe make our own start script that calls
Tomcats (blech) and maybe tails a log file for better error
feedback???   Maybe it's just a matter of education/documentation,
esp in the tutorial?

No flame wars please ;-) (for people who don't follow the lucene dev
list, this is a reference to the current java5 discussion over there)

Thoughts?
-Yonik


Re: bundled example appserver (Jetty vs Tomcat)

2006-06-20 Thread Yoav Shapira

Hi,
I'm biased towards Tomcat in this case for a couple of reasons, as
previously noted:

- It's an Apache product, and so is Solr.  Mortbay is nice about
Jetty, but it's a commercial enterprise and I would rather not depend
on it for anything as important as the default distro.  (Naturally,
I'm in favor of making it easy for users to plug in their servlet
container of choice in their own setup).

- Relying on the current working directory (CWD) in any enterprise
application is an evil on the same order as peppering your code with
System.exit() calls.  Let's not do it in Solr, it's a very slippery
slope.  (Note this isn't specifically anti-Jetty, just let's not do
this in general, and you noted Jetty allows this while Tomcat does
not).

- You can change the logging.properties that Tomcat uses to your
heart's content, including enabling only a console logger or whatever.
It's pretty easy to do.

Costin (one of the Tomcat developers) has been working on essentially
a one jar version of Tomcat for 6.0, the next major Tomcat release.  I
don't speak for him, and I don't know its current status, but his
intent and plan was to make it possible to run Tomcat as java -jar
tomcat.jar and that's it.  It's not in Tomcat 5.5, heck it may never
be ready, but it's worth mentioning since you brought up the one-jar
point (which I agree is a very nice thing in Jetty).

And as you said, no flamewars.  I think Jetty and its developers are
cool, competent, I use it myself sometimes, have nothing against it.
But I think Tomcat is better for Solr as the example bundle for the
above reasons.

Yoav

Yoav

On 6/20/06, Yonik Seeley [EMAIL PROTECTED] wrote:

The servlet container we bundle for the example server, Jetty, is
turning out to have a number of bugs (or maybe just a few that
multiple people have all hit) in the new 6.0 line, and the 5.1
stable line.

Nice things about Jetty vs Tomcat:
  - very easy to start java -jar start.jar, and more foolproof than
Tomcat since we rely on $cwd for the demo to find the solr home
./solr
  - fewer files, esp in bin... easier to understand what is needed and
what is not
  - log messages appear right on console, so errors are immediately
apparent.  You don't have to teach users how to go look through
multiple log files, and you don't have to teach them about shutting
down the server (just the normal CTRL-C)

Nice things about Tomcat 5.5 vs Jetty 5.1:
  - more stable!
  - doesn't require a JDK... can run with a JRE (Jetty6 could as well
since it uses JDT)
  - biggest user community, better docs, better support
  - slightly faster (in my micro benchmark sending deletes to Solr)

So, I'm obviously leaning toward Tomcat, esp if we can make it easy
enough for new users. Maybe make our own start script that calls
Tomcats (blech) and maybe tails a log file for better error
feedback???   Maybe it's just a matter of education/documentation,
esp in the tutorial?

No flame wars please ;-) (for people who don't follow the lucene dev
list, this is a reference to the current java5 discussion over there)

Thoughts?
-Yonik




--
Yoav Shapira
Nimalex LLC
1 Mifflin Place, Suite 310
Cambridge, MA, USA
[EMAIL PROTECTED] / www.yoavshapira.com