Wednesday, February 6, 2008

On OSGi and misunderstanding

I just finished reading this: Robert Cooper On SOA, OSGi And More.

Kind of sad. OSGi is not maven (ha ha), and will not download SNAPSHOTS with each run. It is fairly obvious that Robert is missing the whole point of OSGi or he is just misinformed.
His comment "... OSGi, and why I would never allow it in “my” enterprise. In “my” enterprise I want absolute control over what every service has in its runtime environment." brought up this anecdotal situation from my prior life.

At a "Emerging Technology" brown bag with tech leads of unmentionable client some time in 2005, me and a colleague spoke about AOP upon other things. After we were done, there was a comment from one of a "Architects" in attendance that boiled down to "This enterprise will NEVER USE AOP!". I was kind enough to point out that they were using simplified version of AOP with Servlet Filters and that AOP was not dark magic but a proven technology to modularize application concepts. Oh well, what can I say - they are still running WebSphere. (Someone should get fired for buying IBM.)

So back to Robert. "... A WAR/EAR file is an artifact that can be built by development and move seamlessly from development, to QA, staging and production as a singular, atomic unit." OSGi replaces that with a jar. On top of that it provides versioning and inherent hot deploy. Just today I must have spent 2 hours on stop/build/restart cycle. In "my enterprise" I would always choose developer productivity and flexible/dynamic deployment platform over any " ... singular artifact from the developers".

OSGi right now is the best modularization platform. By just providing guarantee that no client of my code can upcast to internal implementation of lets say exported service had me at hello! And benefits don't stop there. Read the spec. It is very good in detailing the niche that OSGi is trying to fill.