Bob Balaban's Blog

     
    alt

    Bob Balaban

     

    Remember "Garnet"??

    Bob Balaban  May 28 2007 02:00:40 AM
    Greetings, Geeks!

    The Domino server has a long and interesting history working with J2EE components (servlets and JSPs). R4.6, the first version of the server to contain support for embedded Java, shipped with a servlet engine, though since it wasn't documented until R5, not many people knew about it. That engine support Servlet spec v2.0, then current. Today, 10 years later, that engine is still shipped as part of the Domino server kit. And it STILL supports v2.0 of the Servlet specification. Your servlet components lived on disk, in the \domino\java\servlet directory, and there was no provision for remote debugging.

    I'm pretty sure it was in the spring and summer of 2001 that one of the beta releases of what was then called Domino "RNext" (later to be released as R6.0) first contained a very interesting new feature set, called "Garnet".

    Garnet was curious, yet intriguing. It was an attempt to merge the part of the world doing J2EE "Web" development (servlets and JSPs) with those doing Domino Web development. The ideas it embodied were simple, yet powerful:
    - Allow j2ee web components (servlet and JSP files) to be stored in an NSF as editable design elements
    - At runtime, these components are extracted from the NSFs and put into the deployment directory of a locally running Tomcat Server, from Apache.
    - This way, the j2EE components could replicate freelly with the deisgn of the NSF, yet a URL to the servlet/JSP would be routed to the Apache "Web Container" and the application would be executed, with the results going back trhough the Domino HTTP server to the client.
    - Tomcat supported remoet debugging from the precursor to Rational Application Developer (RAD), then called WebSphere Studio Application Developer (WSAD).

    It was a huge advance over the original servlet engine, which clearly was done as an afterthought, and wasn't being maintained very well.

    Garnet was popular - easy to understand, it worked reasonably well, and the Apache code was free (many of us assumed that before shipping R6, IBM would replace Tomcat with some version of Websphere Application Server (WAS), but as long as it was going to work, it was not considered a big deal (at least, not by me).

    I spent some considerable time that summer building demos for Garnet, and spent most of September, 2001 (yes, THAT September, 2001) hauling myself and 2 laptops around Europe showing it, and explaining how it worked at various conferences and workshops. I was able to show my "Course Registration" demo (built in conjunction with my then business partner, http://www.burtongroup.com/AboutUs/Bios/PrintBio.aspx?Id=24Karen Hobert  running on a combination of Domino/NSF, Tomcat and Db2, all on one laptop. Very educational, very sweet.

    And then, IBM decided to cancel that part of the project. R6 would ship without Garnet, and would simply maintain the old servlet engine. I was upset, I'd invested a lot of effort and thought (and 2 trade journal articles) in this feature set, and now they were pulling out. There were rumors of all kinds of politics behind the decision, and schools of thought ranged from the merely incompetent all the way to the truly evil.

    Which brings me, children, to the point of today's blog post. After checking around (carefully), it now seems that "Garnet" is no longer a dirty word withing the hallowed halls of IBM. In my new Programming Services Architect role, I've even proposed ("floated" migh be a more accurate term) the idea that the Domino server should have a REAL Web container in it, as a way of solving a few problems that we have now:

    1) We would get an up-to-date servlet engine, with modern Admin tools and interfaces, and fully up to spec. We could seriously consider getting rid of the old crappy one.
    2) We'd get support for JSPs, which the old servlet engine never had
    3) We could store the component code in NSFs, and let it replicate
    4) It would help our WebServices story a lot too, and modernize the code base in that area.

    The details would be a bit different this time around, we would not do it exactly the same way we did Garnet. We would not, for example, deploy to the AppServer's disk, and we probably wouldn't use Tomcat as the Web Container.

    One possible migration issue is that servlets built for v2.0  of the servlet spec (what the COSE -- crappy old servlet engine -- runs) may not run without some recoding on a more modern engine implementing version 2.4 of the spec. Sun has apparently removed some earlier calls......sigh (IBM would never do that, by the way). Would this lack of simple migration be a problem for people out there? Does anyone have a list of things that won't compile in this scenario?

    Overall, do people think this is a good idea? Something worth investing some effort into, on our part?

    Let's hear your thoughts!