Eclipse Microprofile and Microservice Frameworks

Overview

15 years later Eclipse MicroProfile was launched in 2016, after Java and Enterprise Java had hit a bit of a wall in terms of advancing the technology. Eclipse MicroProfile is an attempt to repackage the essential API’s in order to build microservice style architectures. We’re going to have a brief rundown of each of these API’s, what they provide and an example.

  • JAX-RS — For building simple REST endpoints;
  • JSON-B — For processing JSON documents via newer style Java objects;
  • JSON-P — For processing JSON documents (older style).
  • Config — retrieval of application configuration properties by various means;
  • Fault Tolerancehandling failure (with downstream services, third party services) by using Circuit Breakers, Bulkheads etc…
  • Health — For building simple health checks into your services;
  • Metrics — For emitting performance metrics from your services (think performance information etc…)
  • JWT Auth— for building JSON web-token auth style flows into your services;
  • OpenAPI— for exposing your service RESTful API’s to the world for consumption — hurrah.
  • OpenTracing — distributed tracing for your services (a must if you're doing micro-services);
  • REST Client — Annotation driven REST endpoints, example.
  • Context and Dependency Injection (CDI) — Interceptors for cross-cutting concerns (auditing etc…) and observers for event style management.
  • Common Annotations Annotations for resources, lifecycle management.

Working Example

There’s a great overview here of an example of using MicroProfile to build microservices:

Comparisons

Eclipse MicroProfile isn’t the only way to build microservices in Java. You have a few other options as well:

Choosing

The choice of which microservice framework comes down to a number of factors for me (aside from building something to satisfy business requirements):

  • How efficiently I can develop with it, have the developers thought about eating their own dog food here : ) — how quickly can I download and get something up and running?
  • How easily the team can pick it up and work with it — the documentation and the tutorials (not just written by the core team either);
  • How good the support is when you run into issues with it and how they respond to your support requests;
  • How frequently it’s updated — I want to see active development on it.

In Conclusion

I’m a consulting CTO working with various languages and technology, but also Java. You can find out more about me here:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store