Reputation: 95
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?
Upvotes: 8
Views: 8112
Reputation: 44
to the title question: "OSGi" for sure. An OSGi service is a very (the most?) natural candidate for the microservice moniker.
to the content of your post:
I have to jump in here, and say "both." OSGi, IMHO, is the best thing to happen to Java, since... well, maybe ever. Why? It begs you to follow better design practices, by facilitating the production of smaller, more modular pieces of code.
I love spring-boot as well, but I find it more suited to (read, "awesome for") writing client-side applications.
To the point about your experience with Spring--don't be afraid. If you're accustomed to spring XML configurations, you'll find that the blueprint syntax is, in most cases, identical... and you can still make extensive use of the various spring pieces within an OSGi-leveraging system.
FYI - I'm speaking from the standpoint of having developed several large-scale systems rooted in OSGi (and also a few forays into the wilds of the typical WAR/servlet deployments)
Upvotes: 1
Reputation: 3652
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.
Upvotes: 7
Reputation: 522
The issue is that those are two totally different concepts of making modular apps.
OSGI is a huge system that sits much lower than boot, or spring. It gives you a different set of tools for modularizing application and sets very different challenges while developing.
Read what exactly is OSGI, what is Boot and what problems they solve. If after reading you don't know which tool to pick, go for Boot.
Upvotes: -1