4 Java Frameworks to build Micro Services
List of frameworks to build your application
In this article, I am going to mention about 4 popular Java Frameworks that are widely used across by multiple companies/developers to build microservices.
Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run". It has an active community of developers and one of the most popular Java-based framework for microservices. It also provides out of the box libraries, integrations that are compatible with the Spring ecosystem making the integrations easier by reducing the boilerplate code.
Example:
- Spring Data
- Spring Redis
- Spring Kafka
- Spring Elasticsearch
Dropwizard is a Java framework for developing ops-friendly, high-performance, RESTful web services.
Dropwizard has out-of-the-box support for sophisticated configuration, application metrics, logging, operational tools, and much more, allowing you and your team to ship a production-quality web service in the shortest time possible.
Dropwizard pulls together stable, mature libraries from the Java ecosystem into a simple, light-weight package that lets you focus on getting things done. Dropwizard also provides different components which are used in building microservices.
Example:
- Dropwizard Core - Module which provides Jetty (a high-performance HTTP server), Jersey (a full-featured RESTful web framework), Jackson (the best JSON library for the JVM), Metrics (an excellent library for application metrics) etc...
- Dropwizard Hibernate - support for object-relation mapper (ORM).
- Dropwizard Validation
- Dropwizard Authentication
A Kubernetes Native Java stack tailored for OpenJDK HotSpot and GraalVM, crafted from the best of breed Java libraries and standards.
Quarkus tailors your application for GraalVM and HotSpot. Amazingly fast boot time, incredibly low RSS memory (not just heap size!) offering near-instant scale-up and high-density memory utilization in container orchestration platforms like Kubernetes.
Quarkus claims that it is a cohesive platform for optimized developer joy with features like:
- Unified configuration
- Zero config, live reload in the blink of an eye
- Streamlined code for the 80% common usages, flexible for the 20%
- No hassle native executable generation
Quarkus allows developers to modify and test business code with extremely fast hot-reloads. More thoughts on Quarkus here.
4. Spark Java A micro framework for creating web applications in Kotlin and Java 8 with minimal effort. This framework ecosystem is still in its early stages compared to Spring boot, Dropwizard but it is getting popular over time.
Lets you take full advantage of the JVM
The JVM offers one of the biggest programming ecosystems in the world. It has a lot of Java web frameworks, but pure Java web development has traditionally been very cumbersome.
If you love the JVM, but hate verbose code and frameworks, Spark is the web framework for you. It will have you up and running in minutes, and you can even use it with Groovy or Kotlin or whatever you want.
Spark is an expressive, lightweight and unopinionated pure Java (and Kotlin) web framework that doesn’t get in your way, unlike in other web frameworks, you can structure your application as you want.
List of few companies using Spark Java:
- Apache Software Solutions
- Asana
- Playlyfe