Skip to main content

Glassfish in less than a second

Posted by davidvc on May 17, 2007 at 12:38 AM PDT

I know I mentioned this in my
overview of the JavaOne keynote
, but if you blinked your eyes, you may have missed it. It took just a second, but I keep remembering my wonder and amazement at seeing it, so I thought I should give it its own blog entry.

I've both built and used app servers for many years. I am so used to line after line of log output as the beast starts up, loading all of its various components, 99% of which I will never use. A good three to five minutes later (if I'm lucky), it's up and running.

The Glassfish team has done some impressive work to modularize the behemoth called an appilcation server. Before my very eyes they showed a startup time of v3 of less than a second. Less than a second!.

According to the person doing the demo, this magic occurs because only a basic kernel that knows how to serve up static pages is loaded initially. Then, when you deploy an application, Glassfish figures out what other modules you need and automatically loads and starts them. Each time, the deployment time was no more than a second. This works for JRuby, for Phobos (JavaScript on the server) and for regular Java EE applications.

Later I had lunch with an old buddy who now works for a competitor to Glassfish, and he told me that when he saw this he sent an email to his coworkers saying "I warned you! We're f***ed". I have to say I think he has a point there...