springosgispring-bootspring-dm

What is correct path for creation of micro services in Java? Spring Boot or OSGI


I found a book "Spring DM in action". When I started to check the latest release of Spring for OSGI, I found out that Spring has discontinued this project.

As I have some experience of developing in Spring, I would like to understand should I continue to read about Spring and OSGI or switch to Spring Boot as way of creating modular applications?


Solution

  • I've wanted to write a comment, but it didn't give me enough characters.

    If you need the modularization and dynamic of OSGi, spring DM (now Gemini Blueprint) is a nice technology. We used it to create a high performance message oriented middleware with a plugin-infrastructure. The plugin-infrastructure was needed, cause the customer wanted to be able to add/replace/update modules and change routes via a web-interface at runtime. Each message also was transformed via 0-N groovy-scripts (stored in db, changeable on runtime). The processing engine was based on spring batch and spring integration.

    So if you have a real use cases for OSGi, it can be a nice technology.

    But most of the time people tried to use it, to separate the layers of a monolithic webapplication, which is not useful and gives you more work than profit. Once i saw an approach where a developer used OSGi to separate each group of his domain-model into a small module. This harms your application-design more than you can profit from, cause the profit is null.

    Also, the book might be a nice idea to give you a different approach on "how to develop" software.