Implementing microservices in Java has become a top priority at Oracle, which is rebooting Java Enterprise Edition for microservices and cloud deployments. Meanwhile, another microservices effort for Java has emerged separate from Oracle.
Attributed to Sixt, a rental car service operating worldwide, the lightweight java-micro framework enables developers to easily set up microservices in Java. Developers can build services as a Docker container or fat jar package, and they can configure environment, command-line, and external services.
The framework features a pluggable service registry for registering and discovering service instances, while event-handling is done via the kafka distributed streaming platform. Guice dependency injection is featured for implementing and testing services, and the framework provides an interface for calling endpoints on other services and handling errors from them. Java-micro also features standardized Json logging and metrics reporting, client-side load-balancing, an interface for a service to support health checks, and built-in database migrations.
Java-micro was begun with the intention to support both Java and Google’s Go language. Sixt uses Go Micro as its framework for Go services and wanted compatibility between its Go and Java frameworks. “Java-micro is meant to keep compatibility so that service developers can easily choose between developing a service in Java or Go,” Sixt said. “Other languages can also be supported by using the Go Micro sidecar.”
The Java framework was developed primarily in 2016 and is offered under an Apache license. It has emerged not long after Eclipse took on MicroProfile, a formerly independent project to outfit Java with microservices. This effort arose amidst concerns that Oracle had been neglecting enterprise Java.