BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News What's New in MicroProfile 3.3

What's New in MicroProfile 3.3

This item in japanese

Lire ce contenu en français

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

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 allowing 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.

The Road to MicroProfile 4.0

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

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

Rate this Article

Adoption
Style

BT