RSS
 

Posts Tagged ‘modular approach’

Server-side OSGi, is it really useful ?

19 oct

The recent Paris JUG was an opportunity to talk about OSGi technology, already mentioned several times in this blog, and continues to hear about it. Although OSGi is present on the client side with Eclipse, the development of the server side and especially in Java EE environment sometimes leaves developers not convinced. Spring Source (Spring DM server), ObjectWeb (JOnAS), Sun (Glassfish) and IBM (WebSphere 6.1) have clearly made the choice. What are the real benefits for our applications on server side?
First don’t forget OSGi is a specification designed for the embedded domain. This make an implementation without the new Java 5 features : annotations, generics, etc … and that makes us appear OSGi like an old technology. But OSGi stay attractive because what is important above all is the concept: modularization. Concept that on each ear of OOP developer can not be ignored. By development on development we have tried to improve the way we write code, trying to organize it to not create inter-dependencies and go over possible reusability. The arrival of the DI pattern help us to do that and the success of Spring is a good example. OSGi creates a continuity in offering us an infrastructure that obliges us to respect the rules and allows us to dynamically manipulate our components. The dynamic aspect and hot deployment is the icing on the cake but this is not what makes OSGi essential on server side, the current deployment technics with clustered servers, or even with the simple WebObjects Monitor tool, help us to update applications gracefully. What is interesting it’s how the code is organized and the hierarchy throw the management of dependency imposed by OSGi, in application servers and applications themselves.
So in fact this specification is not suited to Java EE and remains technically difficult to understand, but the concept of modularization is a good approach to improve the quality of our developments. That is why Spring focused on because it fits with their framework.
Moreover reconciliation between JCP and OSGi promises well, I hope in the right direction, to make the best of 2 worlds, i.e. all existing OSGi in one hand and the server aspect and Java 5 new features for Sun on the other.
However, we must not forget the dynamic aspect because although users are not insist to see a new button dynamically appear at each time thez need a new functionnality, the fact is with OSGi it is technically possible. But is it really an improvement, actually with a web application it is also possible in PHP, in Java (must reload session). For RIA this becomes more complicated because part of the functional is deported on the client side and update requires complete reloading. This is typically what Chris Brind has managed to improve by combining Flex and OSGi with Solstice. This framework show the potential of modular approach in this domain.
Again what is important is the concept, the modular approach will bring us more quality in our development and greater flexibility in deployment. Let the community choose the best technology to do it…

  • Share/Bookmark