What is Eclipse MicroProfile?
This shot will introduce you to the Eclipse MicroProfile framework by providing an overview of its main components and key features.
Introduction
Eclipse MicroProfile is a framework for Java developers for creating microservices-based applications. A microservices-based application consists of several smaller pieces that allow developers from different teams to work on them independently without worrying about affecting other components.
To learn about microservices architecture in detail, you may refer to the shot: What are Microservices?
The goal of this framework is to enable developers to build enterprise-scale, lightweight microservice applications without having to worry about developing all the necessary components from scratch.
Key components
Initially, the MicroProfile framework started by implementing a limited set of Java EE/Jakarta EE standards relevant to microservices development, such as:
-
CDI Context and Dependency Injection -
JSON Parsing
-
JSON Binding
-
Restful Web Services
The framework later expanded its feature set by implementing more standards relevant to microservices like:
- Configuration Distributed Tracing
- Open API
- Rest Client
- Fault Tolerance
- Monitoring operation Metrics
- Health Checks
- Authentication using JWT Propagation
In addition to implementing necessary Java EE and Jakarta EE standards, the MicroProfile framework also added support for new APIs to allow developers to take full advantage of the latest technologies.
The diagram above represents the key components of this framework. Below are brief descriptions for each of these components:
-
CDI: This allows Java developers to automate dependency injection in your microservice application without using any additional frameworks/libraries.
-
Restful Web Services: This defines an API for RESTful Web Services. Restful Web Services allow developers to create services in Eclipse MicroProfile applications that can be accessed with the REST protocol.
-
JSON Parsing: Eclipse MicroProfile provides APIs for parsing JSON objects. JSON parsing is vital in Eclipse Microprofile applications for sending and receiving data over the network using RESTful Web Services protocol.
-
JSON Binding: This enables binding of Plain Old Java Objects (POJOs) into a JSON representation using annotations, JSON Binding, and Java Objects as REST requests. It also responses directly from the client-side without needing any additional data conversion.
-
Configuration: This supports externalizing configuration to enable changing the application’s behavior at runtime. It allows developers to easily configure their applications using standard formats, such as YAML, annotations, or APIs.
-
Open Tracing: Open tracing implements a distributed tracing solution to monitor the application’s behavior. It is built upon the Eclipse Open Tracing API, which leverages existing tracer implementations to provide vendor-neutral APIs for developers interested in building their tracers or adding support for new technologies, such as Zipkin.
-
Metrics: Eclipse MicroProfile provides a Metrics API that can be used to publish metrics from Eclipse MicroProfile applications.
-
Fault Tolerance: This provides an implementation of the
specification, which enables developers to implement fault tolerance mechanisms.JAX-RS Java API for RESTful Web Services -
Health Checks: It uses Health Check APIs to quickly determine whether or not a MicroProfile application is running as expected and can be dynamically configured without being restarted.
-
OpenAPI: It uses
to document APIs. Eclipse MicroProfile provides a reference implementation of OpenAPI for Eclipse Microprofile applications.OpenAPI formerly known as Swagger -
JWT Propagation: It enables sending
as part of the request and receiving them as part of the response, thus simplifying authentication between microservices in Eclipse MicroProfile-based architecture by eliminating the need to manually handle tokens.JWTs JSON Web Tokens -
JAX-RS (Java API for RESTful Web Services): It defines an API for creating web services based on the Representational State Transfer (REST) architecture style. Eclipse MicroProfile uses JAX-RS to provide a Java API for RESTful Web Services.
Conclusion
This shot provides an overview of the critical capabilities of Eclipse MicroProfile components. If you plan to develop your next microservice-based application using Java, check out Eclipse MicroProfile and its APIs.