NetBeans 6 delivers great updates to the Matisse GUI builder. Spend a few minutes with Roman Strobl and get an expert briefing on what's new and what has changed. (sponsored)
In this, the third and final installation of Andres' Introduction to Groovy series, you learn about how Groovy handles variable numbers of arguments, named parameters, currying, and more about Groovy operators. Including, some new operators.
Swing Fuse (actually just Fuse), is a framework designed to make it easier to create your own custom desktop components. In this article, Daniel Spiewak shows you how to get started and provides sample source code you can download.
Willam Louth shows how he uses JXInsight Probes to investigate probable performance issues with code bases that he is not familiar with. He also highlights possible pitfalls in creating a benchmark, as well as in the analysis of results.
I'll be honest. It wasn't long ago that I wasn't too impressed with Tomcat. We had used it to power Javalobby and some of our other sites, but soon moved to Resin. Since Tomcat 6 quietly arrived on the scene, I have to admit that I've been giving it a second look. I've been running it on some of my own internal sites and it seems to incredibly stable and supports all the very latest Java EE standards.
Of course, my tiny little experiments are nothing compared to the work of the man who designed the NIO connector in the latest Tomcat, Filip Hanik. He recently ran a test of the scalability of Tomcat, Glassfish, and Jetty starting with 1000, 4000, 8000, and then 16,000 concurrent connections. To summarize, all the servlet containers did well up to about 4000 connections. After that, Glassfish and Jetty started to have some problems while Tomcat just kept going. Apparently, Tomcat has a little bit of the energizer bunny in it now. Limited only by RAM, Filip was able to get Tomcat handling some serious concurrent connections.
I admit, I'm pretty impressed by this. It's pretty obvious that containers using the NIO libraries from the JDK are able to handle many, many more connections than the old socket based containers. What really surprises me is that it has taken this long for Tomcat to start using NIO. Introduced in Java 5, it seems that we should have seen more things taking advantage of it sooner. With Java 6 released, are we just now starting to see uptake of Java 5 on the server starting to increase? Why aren’t more things using NIO these days? Let us know.
Re: Tomcat Scales to 16,000 Concurrent Connections - WHOA!
Actually NIO was introduced in Java 1.4, not 5.
The reason more people aren't using it is it's very, very difficult to get right. You can actually make your IO performance far worse by misusing NIO versus sticking with good old blocking IO + lots of threads.
However this story is evidence that, if you can get NIO right, it produces very impressive results.
Re: Tomcat Scales to 16,000 Concurrent Connections - WHOA!
Hello,
resin 3 has NIO based connector in it's pro edition. And also jboss has done alot on its JBoss Web Server that is tomcat based web server with lots of native code and was designed to handle huge traffic.
And where is resin in that comparison? And maybe jboss web server...
Actually we wanted to use Tomcat 6.0 as the server for our new project. But we discovered that it was not working with war files generated by Netbeans 5.5 (Visual Pack, JSF-1.2).
If any one has a fix to this problem, then we will consider using it (instead of Sun Application Server).
It might be a JSF-1.2 configuration issue (we tried JSF-1.2 libraries from Sun and Apache without success). If any one has been successful in using the combination of Netbeans Visual Pack, JSF-1.2 and Tomcat 6.0, let us know.
Thanks,
Jean-Marie Dautelle - Marlboro, MA
-- Javolution: Everything should be made as simple as possible...
-- JScience: But not simpler!
Re: Tomcat Scales to 16,000 Concurrent Connections - WHOA!
That's great but what's its overall performance like? 16000 connections are pretty worthless if they are running at a snails pace. Tomcat has always been kind of a snoozer on benchmarks.
I've always found Jetty to be such nice container. It's light, the source code seemed always nicely and logically written, right from day one. It's easy to embed.
With Tomcat I've had a lot of frustrations in the past. Not trying bash everything from Apache, but I'm definitely not one of those goes that guts a lot of fuzzy feelings from anything that comes the apache.org website. Often I find their api's convoluted and not well thought out. I think ant could have been created so much more logical, even from day one. And then Tomcat, the debugging and flaky error handling I've had to deal with (quite) a while ago, left me really turned off. Going through the source code left me stone cold. Oh, lastly struts, the error messages left me debugging my struts code for half the time. Had it been coded with error handling in mind, it would have saved me so much time. I had to make all kinds of excuses billing my client for my time, and even had to swallow some of my time.
Needless to say, I'm skeptical about the things that come from Apache land, and I don't automatically look up it.
I do think it's cool to see so many technologies and libraries available in one place, but it shouldn't give people the impression that that is the one place to look for. There are definitely other projects and people that write things that are a lot better than the average Apache project.
ps. I'm glad Maven isn't an Apache project.
ps. The C based httpd Apache webserver I find a very quarky piece of work indeed. Yet it's used by like 70% of the world's servers. Maybe Tomcat can take over Maybe Jetty is better after all, and it can take over
Back to Jetty. A quick comparison between the tomcat.xml and jetty.xml files:
Tomcat:
What immediately stands out, is how Tomcat indicates a thread count directly at the socket, while at Jetty the threadcount is controlled globally.
I also see "Acceptors=1" at Jetty and "acceptorThreadCount=2" at Tomcat.
I don't trust that the threads are distributed fairly in this contest. I need to know how many threads are directly engaged in the servicing of the connections.
I'm not convinced, and I don't consider Tomcat "victorious" until I see what's happening inside each container.
I could be all wrong, it's perfectly possible, and likely, that because Tomcat is the most visible container, it's seen the attention of the right developers. But I remain skeptical, because I think Jetty seems to be written so nicely, and I refuse to believe it lost, just yet.
Also, I just look on the
http://blog.covalent.net/roller/covalent/entry/20070308 site, and consider Greg Wilkins message, who writes that a container should not accept connections that the contain won't be able to serve. What's the point in accepting 16000 connections if you can't actually handle them.
Luckily, ant is also an Apache project.
I strongly suggest developers *NOT* convert the build.xml files to maven.
Almost everything I've ever downloaded that used maven for its build process, didn't build. If you want to cripple Apache's libraries, then maven-ify them.
> > Almost everything I've ever downloaded that
> used
> > maven for its build process, didn't build.
>
> Same here.
> And if it builds, it will break soon, just wait for a
> few commits...
Slightly off topic, but I don't know how you use maven. We are building almost all of our projects with maven and we are pretty pleased. Everything works as expected, no more c&p of ant snippets. And if a build breaks it's just because someone committed rubbish.
What I do is I generate a build.xml file from a small project xml file, using a library of xsl files.
I ship the build.xml along with the project file, that way, people don't have to have my build system to build.
Much more stable, reliable, and faster.
Tomcat Scales to 16,000 Concurrent Connections - WHOA!
URL: Covalent's Blog
At 7:58 AM on Apr 5, 2007, Matthew Schmidt wrote:
Fresh Jobs for Developers Post a job opportunity
Of course, my tiny little experiments are nothing compared to the work of the man who designed the NIO connector in the latest Tomcat, Filip Hanik. He recently ran a test of the scalability of Tomcat, Glassfish, and Jetty starting with 1000, 4000, 8000, and then 16,000 concurrent connections. To summarize, all the servlet containers did well up to about 4000 connections. After that, Glassfish and Jetty started to have some problems while Tomcat just kept going. Apparently, Tomcat has a little bit of the energizer bunny in it now. Limited only by RAM, Filip was able to get Tomcat handling some serious concurrent connections.
I admit, I'm pretty impressed by this. It's pretty obvious that containers using the NIO libraries from the JDK are able to handle many, many more connections than the old socket based containers. What really surprises me is that it has taken this long for Tomcat to start using NIO. Introduced in Java 5, it seems that we should have seen more things taking advantage of it sooner. With Java 6 released, are we just now starting to see uptake of Java 5 on the server starting to increase? Why aren’t more things using NIO these days? Let us know.
18 replies so far (
Post your own)
Re: Tomcat Scales to 16,000 Concurrent Connections - WHOA!
Actually NIO was introduced in Java 1.4, not 5.The reason more people aren't using it is it's very, very difficult to get right. You can actually make your IO performance far worse by misusing NIO versus sticking with good old blocking IO + lots of threads.
However this story is evidence that, if you can get NIO right, it produces very impressive results.
Re: Tomcat Scales to 16,000 Concurrent Connections - WHOA!
Hello,resin 3 has NIO based connector in it's pro edition. And also jboss has done alot on its JBoss Web Server that is tomcat based web server with lots of native code and was designed to handle huge traffic.
And where is resin in that comparison? And maybe jboss web server...
cheers,
tomaz
Re: Tomcat Scales to 16,000 Concurrent Connections - WHOA!
You should put a reference to the tests Hanik ran. I'd love to see the details.Re: Tomcat Scales to 16,000 Concurrent Connections - WHOA!
Ignore previous comment. I can't read, it seems...Does not seem to work with Netbeans 5.5 (JSF-1.2)
Actually we wanted to use Tomcat 6.0 as the server for our new project. But we discovered that it was not working with war files generated by Netbeans 5.5 (Visual Pack, JSF-1.2).If any one has a fix to this problem, then we will consider using it (instead of Sun Application Server).
It might be a JSF-1.2 configuration issue (we tried JSF-1.2 libraries from Sun and Apache without success). If any one has been successful in using the combination of Netbeans Visual Pack, JSF-1.2 and Tomcat 6.0, let us know.
Thanks,
-- Javolution: Everything should be made as simple as possible... -- JScience: But not simpler!
Re: Tomcat Scales to 16,000 Concurrent Connections - WHOA!
That's great but what's its overall performance like? 16000 connections are pretty worthless if they are running at a snails pace. Tomcat has always been kind of a snoozer on benchmarks.Re: Tomcat Scales to 16,000 Concurrent Connections - WHOA!
That's why I use MINA. It's nio made easy.http://mina.apache.org
Still fighting for Jetty
I've always found Jetty to be such nice container. It's light, the source code seemed always nicely and logically written, right from day one. It's easy to embed.With Tomcat I've had a lot of frustrations in the past. Not trying bash everything from Apache, but I'm definitely not one of those goes that guts a lot of fuzzy feelings from anything that comes the apache.org website. Often I find their api's convoluted and not well thought out. I think ant could have been created so much more logical, even from day one. And then Tomcat, the debugging and flaky error handling I've had to deal with (quite) a while ago, left me really turned off. Going through the source code left me stone cold. Oh, lastly struts, the error messages left me debugging my struts code for half the time. Had it been coded with error handling in mind, it would have saved me so much time. I had to make all kinds of excuses billing my client for my time, and even had to swallow some of my time.
Needless to say, I'm skeptical about the things that come from Apache land, and I don't automatically look up it.
I do think it's cool to see so many technologies and libraries available in one place, but it shouldn't give people the impression that that is the one place to look for. There are definitely other projects and people that write things that are a lot better than the average Apache project.
ps. I'm glad Maven isn't an Apache project.
ps. The C based httpd Apache webserver I find a very quarky piece of work indeed. Yet it's used by like 70% of the world's servers. Maybe Tomcat can take over
Back to Jetty. A quick comparison between the tomcat.xml and jetty.xml files:
Tomcat:
Jetty:
What immediately stands out, is how Tomcat indicates a thread count directly at the socket, while at Jetty the threadcount is controlled globally.
I also see "Acceptors=1" at Jetty and "acceptorThreadCount=2" at Tomcat.
I don't trust that the threads are distributed fairly in this contest. I need to know how many threads are directly engaged in the servicing of the connections.
I'm not convinced, and I don't consider Tomcat "victorious" until I see what's happening inside each container.
I could be all wrong, it's perfectly possible, and likely, that because Tomcat is the most visible container, it's seen the attention of the right developers. But I remain skeptical, because I think Jetty seems to be written so nicely, and I refuse to believe it lost, just yet.
Also, I just look on the
http://blog.covalent.net/roller/covalent/entry/20070308
site, and consider Greg Wilkins message, who writes that a container should not accept connections that the contain won't be able to serve. What's the point in accepting 16000 connections if you can't actually handle them.
Anyone "impressed" still?
Re: Still fighting for Jetty
Maven is an Apache project. Go to http://maven.apache.org/ for more information.Re: Tomcat Scales to 16,000 Concurrent Connections - WHOA!
+1 MINA rocks.Re: Still fighting for Jetty
Luckily, ant is also an Apache project.I strongly suggest developers *NOT* convert the build.xml files to maven.
Almost everything I've ever downloaded that used maven for its build process, didn't build. If you want to cripple Apache's libraries, then maven-ify them.
Re: Still fighting for Jetty
> Almost everything I've ever downloaded that used> maven for its build process, didn't build.
Same here.
And if it builds, it will break soon, just wait for a few commits...
-----
Gustavo.
Re: Still fighting for Jetty
> > Almost everything I've ever downloaded that> used
> > maven for its build process, didn't build.
>
> Same here.
> And if it builds, it will break soon, just wait for a
> few commits...
Slightly off topic, but I don't know how you use maven. We are building almost all of our projects with maven and we are pretty pleased. Everything works as expected, no more c&p of ant snippets. And if a build breaks it's just because someone committed rubbish.
Re: Still fighting for Jetty
What I do is I generate a build.xml file from a small project xml file, using a library of xsl files.I ship the build.xml along with the project file, that way, people don't have to have my build system to build.
Much more stable, reliable, and faster.