The Eclipse MicroProfile Committers recently released MicroProfile 2.2, helping developers to create microservices on top of EE 8. This release comes at the same time that Eclipse is taking over as steward of Java EE and rebranding it to Jakarta EE.
This release enhances support for the OpenTracing API, helping developers create legible log statements that track interactions between different microservices. Additionally, it improves interoperability with other frameworks such as OpenAPI and RestClient, which work in tandem to help build and consume RESTful services. Using these capabilities, developers can leverage Java’s static typing system and turn possible runtime errors of piecing JSON together, into compilation errors that can be found through automated tooling.
Keshav Vasudevan from Swagger’s OpenAPI group elaborates in his blog post, "The Benefits of OpenAPI-Driven API Development".
The [OpenAPI Specification] is to REST what WSDL was to SOAP. It provides a common framework of designers, developers, testers, and devops to build and maintain APIs. Think of the specification as a set of rules to build and implement a REST API. The OAS is language agnostic, and is both human and machine readable, which allows both people and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic.
OpenAPI’s focus on human readable APIs and small MicroProfile services that work together is a combination that reduces the amount of work needed to understand what programs actually do, applying the famous Donald Knuth quote, "programs are meant to be read by humans and only incidentally for computers to execute."
In a previous interview, Uber’s chief system architect Matt Ranny explains the role of type-safe interfaces.
Microservices have a lot of trade-offs, not all of which are obvious… A lot of early code at Uber was using JSON over HTTP which makes it hard to validate those interfaces… Moving towards type safe interfaces between services; one of the biggest lessons was the unexpected cost of using type unsafe JSON strings for exchanging data between services.
Adam Bien, freelance developer and author of "Real World Java EE Night Hacks -- Dissecting The Business Tier" recently did a two-minute productivity tip, explaining how to use "Thin Wars, MicroProfile, and Docker together" to streamline application development.
The new MicroProfile framework is compatible with Payara Fish, JBoss, WildFly, and IBM’s OpenLiberty project.
Developers looking to try and test MicroProfile services can leverage the new MicroProfile Starter Beta. They are also able to deploy MicroProfile applications in standalone mode through the Thorntail framework, which is a similar set of technologies to Spring Boot that embeds the components necessary to have a standalone executable JAR file.