W-JAX 2009: SpringSource dm Server – Fitness für die Webanwendungen

runDisclaimer: This entry has been written while listening to the talk. Please forgive me any typographical or grammatical errors resulting from this approach.

Agim Emruli from SpringSource and Papick Taboada from pgt technology scouting GmbH are going to present the latest news about the SpringSource dm server, especially related to Java EE development and more lightweight deployment approaches. Since I regard the dm server as one of the more exciting technologies these days I’m always keen on updates in this area. Stay with me…

Agim and Papick are going to present how the dm server can help to mediate class dependencies in projects. As an observation they note that projects and framework which include repackage third party libraries are a typical indicator for OSGi use cases.

Papick afterwards gives the short standard introduction to how OSGi works. He then introduces the Bundle concept as a new module concept between classes and WARs or EARs. Also well-known. Next he explains how proxying, dynamic service lookup, etc. works.

Next Agim explains the important additions of the dm server:

  • installing applications (not just bundles),
  • defined handling for multi-threading,
  • configuration files,
  • a management console and more.

He also mentions that the SpringSource dm server is a GPL based open source product and he mentions the GPL FAQ on the SpringSource website.

As deployment options he explains using WAR files due to the embedded Tomcat in the dm Server, which provides a perfect combination of deploying WAR based applications that also can enjoy the benefits of OSGi. This positions the dm Server well above standard OSGi environments which out of the box do not provide any support for web applications. Additionally the existing application bloat can be reduced by just repackaging the application without changing any code. The common libraries are extracted as OSGi based libraries which are installed in the server. Next the services should be extracted to be able to install them as OSGi components.

So the way from WAR to OSGi-enabled application is:

  • Take the existing WAR with external libraries, internal services and misc resources.
  • Repackage the application WAR as a shared library WAR. The libraries are externalized by installing them in the dm server.
  • What is missing in the current enterprise is a bundle repository that provides manifest files for bundling OSGi-enabled external libraries. SpringSource provides a bundle repository for such OSGi-enabled JARs. More than 400 open source libraries have so far been processed manually to provide this infrastructure. Additionally SpringSource provides a tool named Bundlor for manifest generation. Bundlor analyzes the underlying project and builds a manifest file with the help of a template and a project profile.
  • In the final step the SpringSource dm server introduces the concept of a PAR (program archive) which is a collection of OSGi bundles that make up a program.

Additionally the dm server corrects some OSGi problems with libraries that are not appropriately implemented. An example for Hibernate is presented – Hibernate uses the thread class loader in one place instead of the system class loader which leads to problems with the OSGi standard. SpringSource introduces a new scope (application) for libraries in PAR files which helps to resolve such visibility issues.

Next Agim shows the example from many well-known SpringSource dm demos showing how it is possible to start, stop and exchange parts of a web application without compromising the runtime stability. Not something you want to do in production environments but still something you usually cannot do with a standard OSGi environment but only due to the dm server. I would argue that there are some critical hot fix situations in production environments where it might be very useful to do exactly that – it just must not become standard procedure 😉

Next Agim introduces a modularization concept for web applications which leaves the service layer (which already was modularized with bundles) but rather the actual web layer. This part of the demo is a technology study of a system that is currently under development for the dm server called slices. Slices basically are vertical modules for the system (e.g. a reporting slice, an order slice or whatever) which can be – like other OSGi bundles – activated and deactivated for individual web applications. Personally I am not quite sure how this conceptual dispatching infrastructure will work in cooperation with security guidelines, user management, user navigations and other important parts of a web application but future releases surely will shed more light on this. As Agim mentioned slices currently are pre-alpha, so we’ll have to wait a little but until the SpringSource dm server 2.0 (or even later) will be released. dm server 2.0 currently is under development with milestone 6 being available. According to the plan a release candidate should appear during this quarter.

Technically the presentation was well-done, but I’m afraid I already have heard too much about OSGi to learn anything new from this talk… which is not the fault of the presenters.

Comments are closed.