This time a proper fight :)
Finally, I got the chance to look into Micronaut around a year ago (Before the pandemic); I started a project, to be more accurate, I started converting a Spring Boot application to a Micronaut application.
In the beginning, it was kind of hard to understand how the Micronaut works due to the lack of good documentation. I did a lot of research to understand a simple thing.
In case you wonder, I finally learned a lot about it from the videos below presented by the founder/developer:
- Connecting to a MongoDB should be simple right? I do not want to be a person who complains all the time but honestly, why would I need to change two places in my application config for the connection info? Yeah, it gives you the ability to have multiple connections from the config file but in reality how many times you face this situation? Why should I put so many data-source-specific annotations on my model and repository classes? Wasn’t it supposed to be decoupled when you use Micronaut Data? That is the whole reason to use the repository pattern. Also, what is wrong with the way Spring Boot handles different data source connections?
- Then, I encountered the problem of having an AOP on the libraries that have been used, it seems the AOP is just for the code that you write at least the version I was using.
- To support some stuff like JPA and others which are famous for their functionalities, it seems the developers just ported them and, basically; they allow you to use libraries that do the reflection which is against of Micronaut principle.
- Difficulty fits with dealing with Micronaut, when I started using Mongo DB in their subproject called `micronaut-data`, I realized suddenly; they are not supporting it even though they promised it is a Microservice quality framework, lots of microservices nowadays are using No-SQL databases which clearly the developers didn’t care that much and still don’t. (See the issues raised in their Github and I mentioned it below)
- I had a rough time getting the answer from the developers or the support team (On their Github or Gitter) and I have the proof of that. Just check the reply dates:
LastModifiedBy and CreatedBy annotation · Issue #506 · micronaut-projects/micronaut-data
Hi, I recently moved from Spring data to Micronaut and I was trying to do auto-populated for createdBy and modifiedBy…
OR and AND in a query · Issue #507 · micronaut-projects/micronaut-data
Hi, I tried this combination with no success findAllByWordContainsOrCommentContainsAndUser(x,x,y) it shows me an error…
Add support for MongoDB · Issue #220 · micronaut-projects/micronaut-data
You can't perform that action at this time. You signed in with another tab or window. You signed out in another tab or…
Now see the response time of the Spring team:
Supporting reactor-kafka · Issue #2166 · spring-cloud/spring-cloud-stream
Hi, After some discussion in the Gitter spring cloud stream channel, I realized to have a sequential pause/resume…
Configure the consumer properties programatically · Issue #960 ·…
sobychacko added a commit to sobychacko/spring-cloud-stream-binder-kafka that referenced this issue Sep 23, 2020 Adding…
On the other hand, Spring Boot/Data make all the above functionalities very easy to use but we know it comes with the greater cost of memory footprint, long startup time, reflections, and all of those bad boys which I frankly surprised how fast a Micronaut project was in the startup time, not so great after the boot compare to spring application especially when you use high throughput data and reactive programming. I am not going to paste performance metrics here but you can find it easily with a small search like this:
Performance Comparison Between Spring Boot and Micronaut
Today we will compare two frameworks used for building microservices on the JVM: Spring Boot vs Micronaut. First of…
We heard enough, Let’s wrap it:
Do not get me wrong, I complained a lot about the Micronaut in this article because it was a pain for me to start, to work with, and to continue with it but it is a great project with a great future, just it is not a right time for me to use it. It might bring down the cost of service in a short time but in the long run, it costs even more, as it has so many learning curves you need to figure out it on your own and the support team is not mature enough to help you get through the problem. It still is great for small projects and small microservices that do not have that much complexity or database interaction but when it comes to deal with Kafka, Database, Batch and others, I do not recommend it.
I really do not know what their plan is.
- Do you think they might stop the project?
- Do you think they might have cold feet as Spring started rolling out the compile-time functionality the same thing Micronaut is famous for?
- Do you think their growth rate is fast enough to compete with such a giant framework like Spring?
I recommend it if you really have tiny Microservices and for small interaction but for a medium to big size project, still, Spring Boot/Cloud/Data is the best. I cannot convince myself yet to give it another try after a year but if you think it is beneficial and has something to offer, let me know your thoughts on the comments, my Twitter (https://twitter.com/navid_gh), or my Linkedin (https://www.linkedin.com/in/ghahramani). Share your thoughts and let’s thrive together.
Please clap if you enjoyed reading this article.