Can OSGi help reduce complexity?

后端 未结 6 1568
傲寒
傲寒 2021-02-01 04:20

I saw lots of presentations on OSGi and i think it sounds promising for enforcing better modularization. Apparently \"hotdeployment\" and \"running different versions of x in pa

6条回答
  •  礼貌的吻别
    2021-02-01 04:32

    OSGi does NOT pay off. The fact is OSGi is not easy to use and at the end of the day or year depending on how long it takes you to get things working, it does not add value:

    • Your application will not be more modular overall, on the contrary, It ends being more exposed and not isolated from other applications since it is a share everything instead of share nothing arch.
    • Versioning is pushed further down the stack, you wrestle with maven transitive dependencies only to do that again at runtime in OSGI.
    • Most libraries are designed to work as libraries in the application classloader not as bundles with their own classloader.
    • Maybe appropriate for plugin architectures where third party developers need to be sandboxed or maybe it is just EJB2.0 all over again.

    I added the following slides and I will follow up with example code to demonstrate how to work successfully with OSGi if it is forced on you. http://www.slideshare.net/ielian/tdd-on-osgi

提交回复
热议问题