Reputation: 45
I want to develop Microservices using Java. What will be the best option among Spring 5 and Eclipse Vert.x? Or should I try anything else?
Upvotes: 3
Views: 5651
Reputation: 733
Development time: Vertx is very lightweight but you need to add libraries and write the integration code, Spring has a lot of integration modules which increased the deployment size
Memory cost: Because of the above point Vertx take less memory whereas Spring takes more memory for each service instance
Maintenance cost - Vertx: Manual configuration is high, Spring provides a lot of Autoconfiguration
Complexity: My personal opinion is that creating reactive applications with Vert.x is much simpler and understandable than using Spring Framework 5.0.
Vert.x is polyglot. Applications can be written in several languages. It is even possible to use different languages in the same application. At this point, Java, Python, Groovy, Ruby, and JavaScript can be used and support for Scala and Clojure is on the way
Non-blocking, event-driven nature is extremely well-suited for modern web applications Where Vert.x makes it easy to write concurrent applications that scale effortlessly from a single low-end machine to a cluster with several high-end servers.
Upvotes: 8
Reputation: 36
Honestly, it depends - on a lot factors. Some of the factors you would want to consider before making a call are
How much time do you have to get going? Are you doing it for just learning these frameworks or are you building a larger project?
With the Reactor framework now part of Spring 5 async nonblocking rest services are possible using both frameworks. Both are built on top of Netty and will serve most of your needs as far as building microservices is concerned. Pivotal (the company behind Spring/SpringBoot) has created a lot of integration modules for you to use other frameworks (for other purposes) but if you are using Spring boot it is opinionated on how it feels is the best way to integrate certain components. This can lead to larger deploy size packages but you do get benefits of not having to integrate those components. Vertx is truly polygot and any language which work with the JVM will work smoothly with Vertx itself.
Upvotes: 2