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?
Spring Boot in itself has nothing to do with microservices. It's a Spring module which simply makes the configuration of your app easier. As such, it absolutely can be used in a monolithic app.
Spring Boot is an open-source Java-based framework used to create microservices and production-ready standalone Spring MVC applications.
Spring Boot is a Java-based open-source framework for developing services. Its major goal is to cut down on development and testing time. Their apps don't need as much Spring setup as other Spring applications. Spring Cloud is a tool for centralizing form management.
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.
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With