Archive for April, 2008

Grizzly related talks @ JavaOne 2008

Not yet tired of Grizzly? After CommunityOne and JavaOne, you will :-). The GlassFish’s v1|2|3 favorite worst nightmare is coming to San Francisco…

CampsPhotosLeoJeanne 129.jpg

I’m doing the monkey all next week, and get ready to listen the Quebecois way of speaking English…as worst as when I write blog, pictures included :-):

After JavaOne, I promise….I hibernate Grizzly, and instead watch the atmosphere

_uacct = “UA-3111670-1”;


Categories: Uncategorized

GlassFish Vee(gri)zzly(v3): Unofficial benchmarks results

We are still working hard on GlassFish v3 and will soon release a new technology preview (JavaOne is coming :-)). What about its performance? As you may know, in v3 we have cleaned up the noise by using a modular approach (thanks Jerome!). In Quebecois (French peoples are probably using some English world to say the same ;-), we say “Faire le Grand Menage”

mathieu 071.jpg

What about Grizzly-In-V3? In v3, the monster is now integrated using its framework module (no http pollution like in v2, just NIO:-)). So when v3 starts, part of its startup logic is done on top of Grizzly (using runtime). Does it make a difference at startup and more important, at runtime? It make a huge one because now, with the modular nature of v3 there is no longer modules that add noise in Grizzly. So let’s benchmark the static resources (.html) performance using Faban (see Scott’s blog about it what is Faban) by using

java -classpath fabandriver.jar:fabancommon.jar -server 
-Xmx1500m -Xms1500m com.sun.faban.driver.ab -c 2000 http://xxx:8080/index.html

This command runs 2000 separate clients (each in its own thread), each of which continually requests index.html with no think time. The common driver reports three pieces of information: the number of requests served per second, the average response time per request, and the 90th percentile for requests: 90% of requests were served with that particular response time or less. Let’s focus on the number of operations per seconds for now by running the test against Grizzly Http 1.0.20, Grizzly Http 1.7.3, v2 and v3:

Grizzly_1.0 Grizzly_1.7 GlassFish_v2 GlassFish_v3
 5739.025    5979.917    5432.300     5882.808

Hey hey v3 is almost as fast as Grizzly 1.7.3. Why? It really because v3 run on top of Grizzly directly, without any noise in between. Now let’s compare the dynamic resource performance using a very simple Servlet

    public void doPost(HttpServletRequest request, HttpServletResponse response){
        PrintWriter wrt = response.getWriter();
        for (int i = 0; i < 1 ; i++) {
            wrt.write("Hello world");

Yes, its a dummy Servlet!

Grizzly_1.7 GlassFish_v2 GlassFish_v3
 3621.600    3256.775      2998.225

v3 is a little slower here……most probably because of the container’s mapping algorithm. What is that? With v3, a tcp/udp port can handle any type of web applications (jruby, groovy, servlet, phobos, etc. (all build on top of Grizzly http :-)). So when a request comes in, v3 inspects and dispatch it to the proper container. That code introduces overhead and I suspect it is part of the regression. But a lot of changes has been made in v3, so I might be wrong…still, I consider the number very impressive as we have now a modular architecture which required a lot of changes.

But wait a minute. Grizzly 1.7 has a Servlet Container? Naaa not a real one. I’m just experimenting a tiny Servlet container, with great help from the Grizzly community. But forget Grizzly for now and look at the number 🙂 The goal for our v3 official release is set: We want to be better than Grizzly, which I’m sure we will :-). We need to improve the Grizzly extension in v3…in case you want to learn how to write such extension, just stop by us at JavaOne!

_uacct = “UA-3111670-1”;


Categories: GlassFish, Grizzly

The Hitchhiker’s Guide to the CometSamplesInGlassFishv3

v3 has now full support for Grizzly Comet..this is just the beginning as v3 is still under active development. Still I’m surprised to see it working on Firefox 3:


Want to build your own Comet application? Look at Shing Wai simple but powerful tutorial. Want to see how the Comet revolution looks like on v3? Download one of the following samples:

To try them, Download GlassFish v3 Technology Preview 2, unzip the file and start it using

    java -Dv3.grizzly.cometSupport=true -jar ${glassfish.home}/modules/glassfish-10.0-SNAPSHOT.jar 

Next, copy drop the *.war under ${glassfish.home}/domains/domain1/autodeploy and you are ready to see Comet in v3! Want to see more powerful demo? You can also try the Direct Web Remoting DWR demo an soon, Ted from ICESoft told me WebMC will shake the v3.

Or maybe you would like to embed the Comet Runtime directly in your application like <Atl>Mobile is doing? Then you can try the samples,but this time using Grizzly runtime:

 java -jar grizzly-comet-webserver.jar -p 8080 -a samples_name Servlet_name


java -jar grizzly-comet-webserver.jar -p 8080 -a \
grizzly-comet-chat.war com.sun.grizzly.samples.comet.AjaxCometServlet

The Comet revolution continue 🙂

_uacct = “UA-3111670-1”;


Categories: Uncategorized