What’s New in MicroProfile 3.3

The Eclipse Foundation released MicroProfile 3.3 featuring updates to five of the APIs:

What's New in MicroProfile 3.3

Other improvements include clarifications and enhancements to specifications and documentation, improved integration among all the MicroProfile APIs, interoperability across different MicroProfile implementations, and a complete set of artifacts for each API.

Based on JSR 339 for consistency and easier reuse, the MicroProfile Rest Client API provides a type-safe approach to invoke RESTful services over HTTP that handles the communication between a client and a service. Rest Client makes the HTTP connection and serializes an object so that a remote service can process it. New features of version 1.4 include an updated TCK, enhancements to the specification and documentation, proper CDI and JAX-RS injection into the ClientHeadersFactory interface, and improvements to its service provider interface and annotations.

The MicroProfile Config API provides runtime configuration from external sources to minimize repackaging of the application. Based on a priority-based ordinal system, these sources include: system properties (ordinal = 400); environmental variables (ordinal = 300); and a .properties file (ordinal = 100). Priority is given to the highest defined ordinal value. Custom sources may also be defined by implementing the ConfigSource interface. New features in version 1.4 include classloading bug fixes, updates to the Converter interface with new built-in converters, and enhancements to the specification and documentation.

The MicroProfile Fault Tolerance API provides a number of strategies (timeouts, retries, circuit breakers, etc.) to handle failure within an application. Each of these strategies have a corresponding annotation that, when applied, will redirect the application with a necessary course of action to minimize the adverse effects of a failure. New features in version 2.1 include new methods for improved functionality, configurable tests to the TCK, and relaxing some requirements on the implementation of the Future and CompletionStage interfaces.

The MicroProfile Metrics API provides time series telemetry data for MicroProfile applications. A built-in /metrics endpoint sends data in Prometheus format. Custom metrics may be defined via built-in annotations such as @Counted, @Gauge, @Histogram and @Timed. New features in version 2.3 include a new metric, SimpleTimer invoked with @SimpleTimed, new methods for improved functionality, and allows metrics to be used without an implementation of MicroProfile Config.

The MicroProfile Health API determines if a computing node is on the brink of termination or shutdown and will replace that node with a fresh, healthy instance. Just like the Metrics API, a /health endpoint is automatically provided to display an application’s health information in JSON format. New features in version 2.2 include improvements to the API and TCK and interoperability with CDI 2.0.

Getting Started

Similar to the Spring Initialzr and Quarkus web-based starter pages, the MicroProfile Starter page is a relatively new tool for developers to start writing cloud-based, microservices applications. Released in January 2019, MicroProfile Starter will generate a complete Maven project based on selected options such as the MicroProfile and Java SE versions, a supported runtime based on the selected MicroProfile version, and a series of check boxes to select desired MicroProfile APIs.

What's New in MicroProfile 3.3

The Road to MicroProfile 4.0

MicroProfile 4.0, scheduled to be released in June 2020, will ship with the following updated APIs:

  • Config 2.0
  • Fault Tolerance 3.0
  • Health Check 3.0
  • JWT Propagation 1.2
  • Metrics 3.0
  • OpenAPI 2.0
  • Rest Client 2.0
  • OpenTracing 2.0

Due to the recent merger of the OpenTracing and OpenCensus projects that formed OpenTelemetry, the MicroProfile contributors have been considering removing the OpenTracing API in favor of a new OpenTelemetry API, but it is unclear at this time if this will occur with the release of MicroProfile 4.0.

Resources

  • Custom ConfigSource with MicroProfile Configuration by Roberto Cortez (February 4, 2019)
  • Introduction to Open Liberty by baeldung (March 6, 2020)