Adnan Rahman
Adnan Rahman

Reputation: 45

Which one among Spring 5 and Eclipse Vert.x will be better option for reactive Microservice using java?

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

Answers (2)

Akshay Misal
Akshay Misal

Reputation: 733

  1. 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

  2. Memory cost: Because of the above point Vertx take less memory whereas Spring takes more memory for each service instance

  3. Maintenance cost - Vertx: Manual configuration is high, Spring provides a lot of Autoconfiguration

  4. Complexity: My personal opinion is that creating reactive applications with Vert.x is much simpler and understandable than using Spring Framework 5.0.

  5. 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

  6. 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

Arnav Desai
Arnav Desai

Reputation: 36

Honestly, it depends - on a lot factors. Some of the factors you would want to consider before making a call are

  1. How are you planning to deploy in production?
  2. What are other components are you planning to integrate?
  3. will the service exist by itself or part of a larger group of microservices?
  4. What kind of volume do you expect for your services
  5. Have you worked with Spring Rest services before?
  6. 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

Related Questions