And it actually is ...
I think you're trying to use tools without having a basic understanding of the area. OSGi is no secret sauce that you can sprinkle over code and it gets better. It is also not a library that you can add to an existing code base that then adds some core functionality. It is an incredibly powerful way to provide an architecture to systems/applications. Unfortunately, it requires a way of thinking that is not common in our industry used to quick fixes. We all want to have the benefits of modularity but are not willing to invest what makes it tick. 30 years after Fred Brooks' 'The mythical man month' we're still hoping for a silver bullet.
In the last 8 months I invested significantly in learning HTML 5 (Javascript, CSS, HTML, JSON, and a large number of Javascript libraries). I thought I understood those technologies since I had been using them over the years for different projects (I even felt somewhat of an expert!). However, it is not until you build a real life application that you start to "feel" what a technology is about. Looking back at my code from the beginning I can only but cry for the messes I made. On top of this (hopefully not local) summit I can only conclude that the OSGi provides a unique way to organize large applications that is sorely lacking in all these web areas. I am pretty sure that this is not because I know OSGi so well and just miss its familiarity. It is because I can now see where things do not scale despite the many desperate attempts to struggle with modularity in the web world.
The main problem is the 'Hello World' fallacy. If it is not possible to do a 'Hello World' in 5 minutes than the technology is considered too complex. The effect is that any technology desperately adds hacks that make the 5 minute tutorial possible, even if these hacks have little to do with the core architecture. Unfortunately, OSGi requires a paradigm shift and these shifts require more than 5 minutes, even for the best. It took 15 years to go from structured programming to object oriented. I still hope to see service oriented programming become mainstream in my life time but I am sure it is happening.
So now about you're rather unfair complaint that it is all so complex. The diversity and richness is a sign of maturity and success, it shows many people and groups have adopted the technology and built upon it. In actually pales in comparison to the JEE world but that happens to be the world you know, which therefore always looks simpler. However, if you look deeper then you find that the core technology is very simple, straightforward, and surprisingly simple to use. If you fire up bndtools it actually does take less than 5 minutes to do a 'Hello World' component if you follow the flow. However, if you start at the end it is easy to get lost in the technology since Eclipse, Karaf, Virgo, Maven, Spring, Pax, and others all added their own functions, quirks and interpretations on top of OSGi. If you want to understand OSGi then start with the basics then move on to the next step since at that moment you can understand the choices you're making. Actually, follow one of Neil's courses and learn it infinitely quicker.
That said, what I have learned over the past months is that OSGi utterly lacks a skeleton (web) application/system. An 'OSGi on Wings'. Though there is a lot of code available in JEE, it invariably tends to be highly coupled and not very cohesive. It always thrills me to see how little code you need in OSGi to do pretty complex things. Since I wanted to build an OSGi system as OSGi was intended to be used I had to develop a lot of basic infrastructure since these basic components are just not available. I'd love to write a book about OSGi architecture but looking at how the 'OSGi in Action' book is pirated it seems that serious book writing has become a heavily deceased victim.
Anyway, from your mail it sounds like you're in a hurry and just want a modularity sauce. In that case, move on. OSGi is a huge pain in the ass unless you take its edicts to heart.
Kind regards,
Peter Kriens