Alexis Moussine states: "...painting every application server as being monolithic and heavyweight is a gross caricature...." In a recent blog posting, he labels GlassFish v3 as a 'lightweight application server' and lists seven reasons for his characterization.
Download size
Since downloads start at 30MB (or even 20MB for those wishing a functional RESTful+EJB31 server), Moussine declares that download size matters. Some users, he notes, are struggling to fit their downloads onto a single DVD or CD.
Pay for what you use
Given that the extensible architecture of GlassFish v3 brings services and containers online only when artifacts using them are deployed, Moussine likens this to "on-demand services."
Fast (re)deployment
The GlassFish team has optimized the time-to-redeploy process so that it now offers sub-second redeploy time for simple applications, according to Moussine. GlassFish v3 also offers the preservation of sessions across redeployments, which is a pretty safe operation (new class-loader, new application) and takes less than 5 seconds to recreate a Spring context (for instance with the jpetstore demo on my laptop), and even less on traditional Java EE web apps. This is all built into the product with no configuration or add-on required. He recommends a brief screencast that illustrates this attribute.
Startup time
Moussine reckons startup times for the web container, individual applications ... even GlassFish v3 with Apache Roller already deployed ... take no more than a few seconds.
Memory consumption
Base GlassFish v3 runtime uses less than 20MB (another "side effect" of the modular and extensible architecture) and a non-trivial application only 50MB of heap (as reported by visualvm), Moussine observes, adding that it may one day run on a feature phone.
Spring and OSGi
Moussine's most detailed reason for the "lightweight" label has to do with the absence of a need to choose between standard Java EE, Spring, and OSGi. Users can have all of the above in a single integrated product, he assures his readers, adding that even the unmodified "OSGi-fied" Spring DM version of the framework is available at the expense of a couple of clicks in the update tool.
Further, he notes, the HK2 layer in GlassFish v3 is abstracting OSGi away and manages to have GlassFish retain its lightweight feel while allowing for Java EE components to inject any OSGi-based declarative services at the expense of a standard @Resource annotation.
Open Source
And, in his own words, "GlassFish is open source, so you can make it whatever you want, even a heavyweight monster if you so decide! Certainly the barrier to entry for using GlassFish is very lightweight."
Is this enough to justify the characterization? Moussine invites his readers to decide for themselves.
More Information
Project GlassFish v3 Preview - from the GlassFish Project page
Sun GlassFish Enterprise Server v3 Prelude
Sun GlassFish Enterprise Server - Sun product page
Download
[...read more...]