OSGi is not just solving problems that only show for larger projects that stay around a long time, it is also about collaborative software.
In the nineties I read a book called Super Distribution from Brad Cox. Brad had this idea of developing software like hardware with IC like components. Reusability had been the grail for some time but his idea of well defined interfaces (TTL in hardware) made sense to me as hardware engineer. However, sharing, and thus abstracting, is hard. The saddest moment in my (professional) life was when I single stepped through a JPA implementation and saw that every transaction manager, for which an excellent API existed, was checked for and treated differently. As community, we seem to never let a hack go unused if it saves us a few hours.
At the same time, the OSGi swam against the stream. The bundle was an excellent delivery model for code and resources, the service model is an unsurpassed model for collaborative and adaptive software, the requirement-capability model provided a far superior dependency model than the primitive module-to-module model so popular in the rest of the world, and last but not least, the baselining that ensures your API are backward compatible. Clearly I am biased but even after all this time I still love it.
I’ve noticed with all my customers that OSGi just works extremely well when you know how to use it. One developer remarked that he had been using OSGi for another employer and thought it sucked. However, now he saw how it was used in his new company, he’d fallen in love with it.
Peter, I think you put the finger on where the pain is. Although we could have done lots of things better, the key thing is that most people just don’t get what we’re trying to do and are too impatient to find out. With that perspective, OSGi is overly complex and a pain. Maybe better documentation or focusing on maven would’ve helped but I doubt it. The spec is excellent but I frequently hear it is too big.
I still think the original goal of enRoute was right, make Java/OSGi attractive for the Ruby on Rails crowd. However, on one side we had the enterprise crowd that got stuck with some awful APIs and were unwilling to let that go, on the RoR side we never got any interest.
Interestingly, I showed Christer Rueger the old enRoute site, he had never seen it and it does not show up on Google. There is lots of cool stuff there, maybe we can integrate this in the bndtools.org site.
Anyway, thanks for the post. Makes my old heart warm to see this energy