The Source for Java Technology Collaboration
User: Password:
Register | Login help    

Search

Online Books:
java.net on MarkMail:


Grizzly HTTP based server or GlassFish v3?

Posted by jfarcand on May 17, 2007 at 12:04 PM PDT

This year at JavaOne Jerome has introduced GlassFish v3. GlassFish v3 has a groundbreaking architecture based on modularity of components and containers. The beauty of v3 is you can install only the components/containers you are interested. So if you want to only uses Servlet and JSP, then v3 will allow you to only start that container instead of several unused containers. I recommend everybody interested to look at the hk2 page to learn more about v3 architecture. Now technically, v3 run on top of the Grizzly HTTP based server....hence I've got questions about which one to use: Grizzly or v3.

As we have demonstrated during our BOF at JavaOne (you can download it here), v3 build on top of the Grizzly Adapter extension and add very nice functionalities. Jerome design is really interesting as you can have more than one Grizzly's Adapter serviced by the same Grizzly HTTP based server. This is really an improvement over the GlassFish.next kernel I've demonstrated last year at JavaOne (see preso [2] here) where I was using more than one Grizzly HTTP based server to bootstrap components and containers.

Hivers07 029.jpg

Now back to the original question....Grizzly HTTP based server or GlassFish v3? Well, I would recommend GlassFish v3 because it remove the restriction of having a single Grizzly Adapter. In v3, each application can register its Grizzly Adapter using a single Grizzly HTTP based server. What does it means? It means that instead of starting two Grizzly listening on two different port, you start only one v3 Grizzly Adapter, hence only one port. As an example, you can run Phobos, JRuby or Comet using the same port, something you can't do when using Grizzly HTTP based server (well you can but you need to write your own Adapter). v3 Grizzly Adapter will make sure the request is dispatched to the proper Adapter. Plus v3 offer much more like commons administration, container loading/unloading, intra adapter communication etc. So if you are planning to use more than one Grizzly adapter, then I strongly recommend you take a look at v3. v3 project is just starting so you also have the opportunity to influence the design if you don't like it (like we did for Grizzly 1.5). Event if you are using a single adapter, you should consider v3 for the extra functionalities and performance (almost the same as Grizzly HTTP based server). You might first develop it using Grizzly HTTP based server, and then migrate it.

What is the cost of migration? You just need to add one more method to your Grizzly Adapter and then you are ready to use v3. Can wait to see how? Take a look at the BOF for the technical details....and thanks for the approximatively one hundred peoples than showed up at 10h00pm to listen the French|Quebec connection speaking at JavaOne :-)

technorati:

Related Topics >> Java Enterprise      
Comments
Comments are listed in date ascending order (oldest first)