This article is an effort to summarize the Top Microservices Frameworks in Java and is listed in no particular priority order. Considering the flexibility in MSA (Microservices Architecture), these are not mutually exclusive and you can choose as per your architectural requirements, business need, organizational context, and other factors under consideration.
#1 Spring Boot with Spring Cloud (Production-grade, Widely Adopted)
StarDeveloped by: Pivotal (part of VMWare)
Link: spring.io/projects/spring-boot
Spring Boot does not require any introduction as it is the most widely used Microservices framework for Java. It is an opinionated view of Spring framework to get started quickly. Spring initializer is very handy to generate code with many options to choose from as dependencies as needed.
Key Features:
- Production-grade java services with a strong development community.
- Integrates with Spring lifecycle to leverage capabilities like Security, Service Discovery, Config Server, Tracing, and so on.
- Automatically configure Spring and 3rd party libraries whenever possible.
- Supports both servlet stack and now reactive stack (see below).
High-level Architecture:
Cloud Support:
- Spring Cloud has connectors built for integration with AWS, Azure, Google Cloud, Alibaba Cloud, and many more. Click here for Cloud Deployment.
- Spring Cloud for CloudFoundry makes it easy to run Spring Microservices using CloudFoundry (an OpenSource PaaS model built by Pivotal).
- Provides Spring Cloud Services with VMWare Tanzu as a service offering.
- VMWare partnered with Azure to provide it as a service offering: Azure Spring Cloud
Suitable for:
- Enterprise-grade, and industry-proven Java-based Microservices
- Out-of-the-box integration with many third-party libraries/dependencies are needed
- Developers availability & community support are major criteria for selection
Where other frameworks flare better:
- Lightweight Microservices – Spring dependencies can make the services heavier particularly with many dependencies
- gRPC based Microservices – Custom support but still evolving
- Reactive programming – started support but there are other frameworks which got built with reactive as foundational architecture
#2 Micronaut (Modern, Full-stack, Easy Testable, Designed for Serverless)
StarDeveloped by: Object Computing (the company behind Grails)
Link: micronaut.io
Micronaut is a modern, lightweight framework designed for building modular, easily testable JVM applications with multi-lingual support for Java, Kotlin, and Groovy. It has excellent cloud-native & serverless support. Click here to download the slides covering an overview of the framework.
Key Features:
- Based on Reactive programming model with support for both RxJava & Project Reactor.
- Faster startup time (early GraalVM adopter), reduced memory footprint, minimal use of proxies & reflection, no runtime bytecode generation
- Easy unit testing & lightweight framework with non-blocking calls native built using Netty from start
Cloud Support:
- AWS Lambda Support for building Serverless Application (with GraalVM Native Image)
- Azure Support for Deploying to Microsoft Azure App Service for Web Apps
- Google Cloud Support for Deploying to Google App Engine
Suitable for:
- Reactive programming model (with serverless support) is a key criterion
- Event-Driven/Message-Driven Applications, Command Line Applications, HTTP Servers, and Microservices with Faster Startup Time
- Lightweight & Minimal Overhead
Where other frameworks flare better:
- Wider developer community and skill-set support is required
- Companies looking for wider adoption and avoidance of multiple frameworks
#3 Quarkus (Container First, Cloud-Native, Faster Startup)
StarDeveloped by: Red Hat (part of IBM)
Link: quarkus.io
Quarkus is a Kubernetes Native Java Stack tailored for OpenJDK HotSpot and GraalVM. It is designed to work with popular Java standards, frameworks, and libraries like Eclipse MicroProfile, Spring, and many more.
Key Features:
- Container First with fast boot time, incredibly low RSS memory, high-density memory utilization
- Focused on Compile first approach using Native Image (GraalVM)
- Imperative and reactive code – designed to seamlessly combine the familiar imperative style code and the non-blocking, reactive style when developing applications
Cloud Service Provider Support:
- Deployment guide available for Azure, AWS, OpenShift, Google Cloud – essentially using container-based deployment model
- Serverless deployment support with cloud-service provide native tool (e.g. using gscloud & gcloud CLI for Google Cloud Functions)
Suitable for:
- Applications require faster boot time (native image), lightweight with low memory foot-print
- Reactive application development
Where other frameworks flare better:
- If preference is to use framework, which has been battle tested for production (as Quarkus is relatively – first released in 2019)
- Wider developer community and skill-set support is required
- Companies looking for wider adoption and avoidance of multiple frameworks
#4 Helidon (Lightweight, Modern, Cloud-native, MicroProfile Compliant)
StarDeveloped by: Oracle
Link: helidon.io
Helidon is described as a collection of libraries (than framework) for writing microservices powered by Netty. It is simple, lightweight, functional, and reactive.
Key Features:
- Supports two programming models: Helidon MP (MicroProfile implementation, Declarative style with dependency injection) and Helidon SE (a small, functional style API)
- Supports GraalVM to convert Helidon SE & MP applications to native executable code
- Cloud-native support with modern architecture and so no need for any specific tooling or deployment model
High-level Architecture:
Cloud Service Provider Support:
- Oracle Cloud published documentation and support for Helidon. Click here to read the deployment article.
- As it is built using cloud-native principles, Kubernetes & Docker support available with a lightweight footprint and hence can easily be deployed to any Cloud.
Suitable for:
- Architecture looking to support both functional & reactive: Helidon SE for minimal development experience with no annotations and no dependency injections, and Helidon MP for Jakarta EE microprofile development experience
- Modern architecture with cloud-native, microservices support from initial architecture & design
Where other frameworks flare better:
- Full-stack framework or capabilities required
- Wider developer community and skill-set support is required
- Companies looking for wider adoption and avoidance of multiple frameworks
#5 Eclipse Vert.x (Polyglot, Event-driven, Reactive)
StarDeveloped by: Eclipse Foundation
Link: vertx.io
Vert.x started with taking non-blocking, event-driven principles from Nodej.js and implemented it for Java applications. It is one of the most popular for building reactive and non-blocking java applications.
Key Features:
- Polyglot (Java, Kotlin & Groovy) event-driven application development
- Resource-efficient – handles more requests with less resources in comparison to other frameworks
- Concurrent & asynchronous with flexible framework. Supports ecosystems such as Web APIs, databases, messaging, event streams, cloud, registries, security, and many more
Cloud Service Provider Support:
- Tooling support available in the community for deployment. Click here to see an example.
- Standard packaging (zip or jar) will work with most of the cloud providers. See How-To Guide (very useful):
Suitable for:
- Event-driven architecture & Reactive application with non-blocking
- Concurrency (Actor-based) & Asynchronous I/O is required
- Support for multi languages is required: Java, Kotlin, Groovy
Where other frameworks flare better:
- Full-stack framework or capabilities required
- Synchronous and RESTful application development
Key Frameworks Summary
Framework | Developed By | Key Proposition | GitHub Stars | Microprofile Compliant |
---|---|---|---|---|
Spring Boot | Pivotal (now VMWare) | Most widely used with production-grade java services with a strong development community | Star | No |
Micronaut | Object Computing | A modern, JVM-based, full-stack framework for building modular, easily testable microservice and serverless applications | Star | No |
Helidon | Oracle | A cloud-native, open‑source set of Java libraries for writing microservices that run on a fast web core powered by Netty | Star | Yes |
Quarkus | Red Hat (part of IBM) | A Kubernetes Native Java stack tailored for OpenJDK HotSpot and GraalVM, crafted from the best of breed Java libraries and standards. | Star | Yes |
Eclipse Vert.x | Eclipse Foundation | For building reactive applications on JVM | Star | No |
Dropwizard | Yammer | For developing ops-friendly, high-performance, RESTful web services | Star | No |
Open liberty | IBM | A lightweight open framework for building fast and efficient cloud-native Java microservices | Star | Yes |
Armeria | LINE Corporation | Go-to microservice framework leveraging your favorite technologies, including gRPC, Thrift, Kotlin, Retrofit, Reactive Streams, Spring Boot and Dropwizard | Star | No |
Lagom | Lightbend | Opinioned framework to decompose monolith and build, test, and deploy entire systems of Reactive microservices | Star | Yes |
Axon Framework | AxonIQ | For event-driven microservices, based on CQRS, DDD | Star | No |
Kumuluz | Sunesis | Lightweight framework with Java EE / Jakarta EE technologies and extend them with Node.js, Go and other languages | Star | Yes |
Spark Java | Per Wendel | A micro framework for creating web applications in Kotlin and Java 8 with minimal effort | Star | No |
Payara Micro | Payara | Lightweight middleware platform for containerized Jakarta EE (Java EE) microservices | Star | Yes |
Play Framework | Lightbend | A lightweight, stateless, web-friendly architecture with Java & Scala support. Built on Akka, provides predictable and minimal resource consumption (CPU, memory, threads) for highly-scalable applications | No |
Java Frameworks – Visual Representation
References
- Difference between Spring framework & Spring Boot – by Baeldung
- Difference between Reactive Programming & Reactive Systems – by Lightbend
- InfoQ Article on Oracle Helidon
Very informative. Can we add some comparison and which one best suited for microservices
Thanks for your inputs. Comparison is work in-progress, planning to publish. Stay tuned.
Please add Play Framework: https://www.playframework.com/
Considered Lagom (builit on Play) as Microservices framework and based on my experience of Play Framework (used for 1+ yrs as part of web dev), I considered it as a web application framework.
There is small discrepancy in the Helidon description, both MP and SE flavors support GraalVM native image
Thanks for your comment. I have updated the blog.