GlassFish, Tomcat, and Oddly Shaped Bicycles

There's some debate in mailing lists and other places about the wisdom or otherwise of continuing to bundle Tomcat with NetBeans IDE. Some believe that it would make more sense to favor GlassFish, at least partly since it is an open-source alternative to Tomcat (although the latter is a web server, while the former is an application server), while others argue that Tomcat is pretty much the de-facto web server of choice, hence an IDE would be shooting itself in the foot (assuming an IDE had a foot) by not bundling it, especially if it had been doing so all along.

I don't know the right answer to these questions and you're not going to find my opinion on these questions in this blog entry, since I don't really have one. However, people deserving the special attention of cranial surgeons are those who begin their e-mail with: "I haven't used GlassFish for over a year, however it is slow." Those people need to be hoisted into a tight white jacket and then locked up in a ward adjoining the one containing those who start their e-mail with words such as: "Although I haven't used NetBeans IDE for the last five years, here are my thoughts."

The reason for the summary justice that should be meted out for such offences is that these statements are the equivalent of saying: "I haven't ridden a bicycle since 1871, but I hate how the front wheel is so much larger than the back wheel." For those who want to know, this is how a bicycle looked in 1871:

Seriously, how can you have an opinion on a piece of software that is constantly, daily, being improved when you haven't used it for over a year? I'm not sure what the internet equivalent of a slap in the face is, but that's what you should get if you can have any opinion on GlassFish if you haven't used it for some time. In fact, you can't have much of an opinion if you haven't used it recently. Even more in fact, you can start up a NetBeans IDE 6.0 daily build and install the GlassFish V3 Server plugin. (You probably won't find this plugin in milestones yet. It is only in the plugin center for daily builds.) Even though the plugin doesn't do anything with server resources, such as JDBC and JPA, one can already see, with the naked eye, that the start up time is significantly improved. I am no expert, but to me it seems like the start up time is already equivalent to Tomcat. Of course, since the various server resources aren't being started up, because they're not supported yet, it is impossible to say how things will be when the final release of GlassFish comes out. However, effectively, GlassFish currently is nothing more than a web server, so one can, to some extent, already compare it to Tomcat, while realizing of course that it is no where near to being stable. FYI, here's a screenshot of what you'll see after registering the technology preview of GlassFish V3, which you can do once you've installed the aforementioned plugin (I don't like the underside of the tabs, among other things, in the IDE below, on Ubuntu Linux 7.04, running on JDK 6 and above, but I've commented on this before):

Now, start up time of GlassFish may or may not be relevant to whether or not NetBeans IDE should continue to bundle Tomcat, but if a full blown application server (i.e., GlassFish) has the same performance as Tomcat, (note that I'm saying "if"), wouldn't the fact that it is performant and more powerful (i.e., no one denies that GlassFish can do far more than Tomcat, it would be silly to deny that, because it is objectively true) wouldn't that mean that GlassFish is objectively BETTER than Tomcat? I'm happy to be shown to be wrong. Just please don't start out by saying that you haven't used GlassFish for a long time. At the very least, pretend you have... :-)

Comments:

Thanks for the post. This GlassFish V3 is a little bit more than Tomcat, as it can accept Ruby Applications, Phobos Applications, PHP quercus applications, when instrumented with the correct containers... I've also heard that a Ruby Gem containing V3 is coming very soon, and that you could even add Tomcat as an alternate web container, to deploy legacy Tomcat web applications (i.e with context.xml, etc)... Finally, it can also run embedded (The Phobos NetBeans modules are in fact using a pre-preview of GlassFish V3, and it runs in the same JVM as NetBeans so that we can debug server side JavaScript). We now need to see if the kernel could work on a JavaPhone:-)

Posted by Ludo on May 18, 2007 at 05:14 AM PDT #

Actually, I have tried a Glassfish milestone within the last month, and I had some mixed feelings about it. I really really liked its features, directory layout and management controls. It's got awesome potential. Unfortunately, it took less than an hour to eat so much RAM that it completely crashed my server (and that's saying something). So, back to Tomcat for me...

Posted by Daniel Spiewak on May 18, 2007 at 05:25 AM PDT #

Did you file a bug? GF V2 is still in beta, and there is a reason for that:-)

Posted by guest on May 18, 2007 at 05:35 AM PDT #

I agree that Glassfish V3 should replace Tomcat one day. But not now - currently is V3 available as preview and final version is planned for 2008. When it will be stable and fully featured, there will be probably no advantage of having Tomcat. Right now I think we need to provide both options: Tomcat and Glassfish. Let the people choose during installation. For me, removing bundled Tomcat completely is a big regression. But once Glassfish V3 is released, the situation will most probably change. This change came just too early.

Posted by Roumen on May 18, 2007 at 05:37 AM PDT #

Ludo, thanks for adding that additional info. I'll be deploying Ruby applications to the preview of GlassFish V3 soon.

Daniel, your decision to return so quickly to Tomcat seems odd -- you're comparing a milestone to a released product, which doesn't make sense. Shouldn't you wait for the full release before decising which server to use? As 71.141.248.218 points out, why didn't you file a bug?

Roman, you can't "agree" with me on the replacement of Tomcat by GlassFish V3, because I explicitly never argued that point. Like I aid at the start of the blog entry, I have no opinion on whether Tomcat or GlassFish or both should be bundled with NetBeans IDE. My only points were (1) you should have recent experience of something before commenting on it and (2) if GlassFish becomes as performant as Tomcat, it will be BETTER than Tomcat, because GlassFish already has far more features than Tomcat. Whether or not that means that Tomcat should or should not be bundled with NetBeans IDE is a different discussion, not one that I discussed in this blog entry (and not one on which I have an opinion).

Posted by Geertjan on May 18, 2007 at 05:43 AM PDT #

Why didn't I file a bug: Because I'm lazy and was in a bit of a hurry. :-) Yeah, I could have dropped back to an earlier version, but Glassfish responded so badly to my experimentation that even previous versions didn't seem worth it. It's very possible that there was just something in the way I setup glassfish or something odd about my server config which caused GF to act weird. After all, there are people using GF 2.0 without problems, so... The point is more that I needed something which would work, and Glassfish failed to fit the bill (twice actually). As old school as tomcat may be, it does at least work.

Posted by Daniel Spiewak on May 18, 2007 at 05:53 AM PDT #

Ok, sorry Geertjan, I didn't get it. Yes you are right people should try the latest version before saying anything about it. I have been trying out recent versions of V1, V2 and V3 recently :)

Posted by Roumen on May 18, 2007 at 06:05 AM PDT #

Thanks for the interesting post. I turned away from Tomcat several years ago, although it is a really good piece of software, because of two things that bothered me: 1. Upgrades from one version to the next are a nightmare as the configuration changes even with minor version updates, and the changes are usually not documented, at all. 2. Some of the Tomcat developers tend to be very impatient towards users and developers asking improvement in aspects like the one mentioned above. That's how I learned to like Jetty. It is stable, has a better HTTP server than Tomcat and a very friendly community, and it is embeddable and well documented (!). And switching from Tomcat to Jetty was easier than upgrading from one Tomcat version to the next, because the configuration file format is a lot more stable. My hope is that Glassfish will follow the example of Jetty and not become another Tomcat. In the meantime I wouldn't mind if Tomcat would be replaced by Jetty in Netbeans... Best regards Alex

Posted by Alex Baer on May 18, 2007 at 06:09 AM PDT #

But even if Glassfish is better than Tomcat:

Most people only need a servlet container and don't want to be bothered with the complexities of a full application server (I know what I am talking about because in my company I am the only one who uses JBoss and has ever had a look at Glassfish).

"Tomcat is pretty much the de-facto standard." You can safely delete the "pretty much" and replace it with "overwhelming".

How can I ever explain to my (less Tomcat-savvy) colleagues, that a migration to NB 6 requires them to

  1. Download and install Tomcat manually.
  2. Create a CATALINA_BASE setup on their own (after learning how to do that).
  3. Integrate this Tomcat setup manually into the IDE.
to arrive at a configuration that is similar to what they have now out of the box.

Posted by georg on May 18, 2007 at 06:22 AM PDT #

hi there, if the netbeans team wants to replace tomcat with something of their own, all support for it. But you should give 2 options 1) full blown app server 2) only servlet container give the developers something that they need(servlet containers are good enough for most people) and somethign that is mature. netbeans will win a lot more support by continuing with tomcat for some more time! BR, ~A

Posted by anjan bacchu on May 18, 2007 at 07:23 AM PDT #

I think that the download size issue is relevant. If someone needs just servlet container downloading additional 60MB of (for this person) useless stuff is not nice. Also there are lot of people already using tomcat (e.g. I have been using it for something like 7 years and don't plan to migrate to anything (hence my bias)).

Posted by David Strupl on May 18, 2007 at 07:31 AM PDT #

i think most developers does not care - ejb2 support - rubby,php support - some not commonly used JEE stuff so, a modular, trimmed Glassfish is way to go. i see that V3 will have such capabilities but i wish it could be out earlier.

Posted by afsina on May 18, 2007 at 02:51 PM PDT #

Perhaps a question to ask is ... if replacing Tomcat with GlassFish V3 is the solution, then what is the problem? On a slightly different note ... I have always been of the opinion developers will choose what they feel makes them the most productive. So, if developers will feel more productive with GlassFish V3, then perhaps it is a viable replacement for Tomcat. Fwiw, I think "what makes developers more productive" is not only true for app servers / web containers, but IDEs as well.

Posted by huntch on May 18, 2007 at 10:25 PM PDT #

Why do you feel the need to tell me I need glassfish when all I want is Tomcat. If all I want is a VW beetle why can't I just have a VW beetle. There is something to be said for simplicity. I can't comment on glassfish since it has been forever since I used it. I can comment on the fact that I hate when other people tell me what I need when I know what I need. Put both on and leave it at that. In this way all the tomcat users are happy and when they are bored at work they might take glassfish for a spin. If you remove tomcat then I am pissed and I waste time stripping out glassfish to get tomcat working. And if tomcat doesn't work then I am going to blame Netbeans and go back to eclipse or IDEA where tomcat works just fine.

Posted by Steven Citron-Pousty on May 19, 2007 at 07:02 AM PDT #

One final note on this: This is why people get pissed at Sun in this arena. You push Sun solutions over best of breed or popular applications. I can not tell you how many people refused to use Creator bc it only bundled Sun App Server and it was a POS. Crashing, locking ports, taking forever to boot. Java is about choice - not just the Sun choice. I know there are holes in my arguments but in the end removing tomcat makes a lot of ppl grumpy. Having both makes nobody grumpy.

Posted by Steven Citron-Pousty on May 19, 2007 at 07:06 AM PDT #

Steven, you need a web container, not Tomcat. Choice is not going away (no one is talking about removing \*support\* for Tomcat) because "choice is good" (tm). Daniel, if Tomcat was good enough for the job that's fine, but obviously more details about the issues you faced with GlassFish would be very valuable. I'm curious though, why did you look at GlassFish in the first place? Just to check it out or because you expected a better experience than with Tomcat? If so anything in particular? thanks.

Posted by Alexis MP on May 20, 2007 at 08:37 AM PDT #

Alexis: When netbeans is trying to get people to adopt it, they should make the barrier to entry as low as possible. Bundling only Glassfish makes the barrier higher than it needs to be. I would venture to say that most Java web developers know and use tomcat, not all but most. By giving something familiar you reduce the barrier to entry. I am still voting for bundling both. In this way when people have a free moment they may take Glassfish for a spin. If it really is great and easy to use then I am sure most people will switch. After a few years when people have given up tomcat for glassfish because it is "objectively better" then you can remove tomcat from the bundle. For now tomcat is the container of choice for the majority of java web developers.

Posted by Steven Citron-Pousty on May 20, 2007 at 03:44 PM PDT #

Thanks all for sharing your various views. I hope that those who make decisions on these things stop by to read them. I don't think anything said here is surprising. As far as I know, no final decisions have yet been taken. One point to make -- at the time when NetBeans moved from the "mount" system to Ant-based project system, there was an "outcry" (to the extend that that word can be applicable in these contexts), but things seem to have settled down since then. This is potentially another big change of similar proportions, though in a different arena. It's unclear what will happen, but let's wait and see.

Posted by Geertjan on May 20, 2007 at 08:29 PM PDT #

I think the comparison between removing the bundled tomcat and switching from the NB 3.x to the Ant-based 4.x project system is flawed, because the project system is concerned with development, but tomcat support is concerned with deployment, it is a runtime environment.

After all it is very simple: if you want to increase your market share, you'd probably want to improve, not reduce the user experience. Using NetBeans as a vehicle to shove a fish into our throats by force will probably only cause antiperistaltic movements...

Posted by georg on May 21, 2007 at 12:08 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
12
13
14
23
24
25
26
27
28
29
30
   
       
Today