Eclipse MicroProfile

Microservices can be built with the current JEE specification (JEE 8). However, there are certain specifications within JEE that are more important for developing microservices, such as JAX-RS (for RESTful Web Services) and JSON-P (for processing JSON data). So, a group of organizations has come together to create specifications for developing and running microservices, which are categorized as MicroProfile. Many of the specifications under MicroProfile are already part of the JEE specification (such as JAX-RS and JSON-P), but some are new specifications, such as for configuring and monitoring microservices.

The group has come up with two profiles so far. Each MicroProfile-compliant implementation is expected to implement each specification in the supported profile. This ensures that a microservice created with a particular profile runs on all Microprofile implementations supporting that profile. At the time of writing this chapter, the group has come up with two profiles. Here is the list of MicroProfiles and specifications that they include:

  • MicroProfile 1.0 (released in Sep 2016):
    • CDI 1.2
    • JSON-P 1.0
    • JAX-RS 2.0
  • MicroProfile 1.1 (released in August 2017):
    • Config 1.0
    • CDI 1.2
    • JSON-P 1.0
    • JAX-RS 2.0

MicroProfile 2.0 is expected to be released in June 2018, and it will include updates to some of the specifications as per JEE 8. Some of the implementations of MicroProfiles are WildFly Swarm (http://wildfly-swarm.io/), WebSphere Liberty (https://developer.ibm.com/wasdev/websphere-liberty/), Payara (http://www.payara.fish/), and Apache TomEE (http://tomee.apache.org/). Visit the official website for MicroProfiles at https://microprofile.io/ for more information.

In the next section, we will see how to implement a microservice for our Course Management use case using two solutions:

  • Using a MicroProfile implementation (WildFly Swarm)
  • Using Spring Boot, which is not part of MicroProfile

Later, we will see how to deploy microservices in Docker containers.


To follow the code examples in this chapter, you need to be familiar with JPA and REST APIs. Refer to Chapter 4, Creating JEE Database Applications, for JPA concepts and Chapter 9, Creating Web Services, for RESTful web services.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.21.93.20