Friday, May 16, 2008

OSGi: Deployment Nightmare Unfolding

There is quite a bit of buzz around OSGi at the moment with every vendor and his dog announcing support for it in one way or another. When it comes to deployment, right now everyone is doing their own thing with OSGi. On the one hand this is good since OSGi bundles are compatible with each other so the more vendors support it the more we can do around bundling components. On the other hand, every vendor is coming up with their own mechanism for deploying to an OSGi runtime. This is because there is no standard way to package up bundles of bundles. In JEE we have WARs, RARs and EARs for deploying applications but in OSGi world we’re going to have many vendor-specific ways of deploying applications. It’s like we’re taking a giant leap backwards. I should point out that we at MuleSource are guilty of doing the same thing because there is no standard right now that anyone can align with.

Ideally, what we need is a JSR (or similar) that defines a standard deployment format to deploy to OSGi containers. Essentially this would mean a small kernel that understood how to unpack and deploy bundles of bundles to an OSGi runtime. There is no value in vendors owning this stuff or coming up with proprietary implementations.

Ultimately, a standard deployment mechanism should be part of the JDK. I just don't know if I trust the JCP to produce a simple elegant solution by committee...

2 comments:

Neil Bartlett said...

Actually there is a "bundle of bundles" standard. It's called Deployment Admin, check out section 114 of the OSGi R4.1 Services Compendium.

Of course that doesn't stop others coming up with their own alternatives, but reinvention of the wheel is an irrepressible force in IT generally.

Ross Mason said...

Thanks for the info Neil. I'll take a look. You may have saved us from producing yet another deployment model.

Phew... maybe there is no need for another JSR after all :)