BreadcrumbHomeResourcesBlog What Is MicroProfile? December 7, 2021 What Is MicroProfile?MicroservicesBy Pavel FolMicroservices can provide developers a slew of advantages, but they don't come without their challenges. Originating from Java user groups and server vendors, MicroProfile aims to address the limitations of microservices in enterprise Java development.In this blog, we explore MicroProfile: what it is, why it was created, its future, and using MicroProfile with JRebel. Table of ContentsFinding a Microservice FrameworkWhat Is MicroProfile?Goals of MicroProfileNotable MicroProfile Features and FunctionalitiesFuture of MicroProfileMicroProfile vs. Spring BootJRebel and MicroProfileFinal Thoughts on MicroProfileTable of Contents1 - Finding a Microservice Framework2 - What Is MicroProfile?3 - Goals of MicroProfile4 - Notable MicroProfile Features and Functionalities5 - Future of MicroProfile6 - MicroProfile vs. Spring Boot7 - JRebel and MicroProfile8 - Final Thoughts on MicroProfileBack to topFinding a Microservice FrameworkWith all these online resources, starting the development of a new application couldn't be easier these days — or at least that’s how it seems. When you get started, however, there are many things that need to be decided. For now, let’s put all the questions about frameworks and technologies aside and focus on one of the most important decisions: the architecture of the application. Should you go with a monolith or microservices?Let’s say you decide on microservices. That's great! Today, they’re very common and much discussed, but you don’t want to start from scratch. Rather, you'll most likely want to start with a reliable solution. One of the available solutions you may consider is MicroProfile.📚 Further reading:Developer's Guide to Microservice PerformanceBack to topWhat Is MicroProfile?MicroProfile is a a project that provides a collection of specifications designed to help developers build Enterprise Java cloud-native microservices.Initially released in September 2016, the first version of MicroProfile was formed on JAX-RS, JSON-P, and CDI. While the first two are specifications that provide API, CDI puts everything together. As you can see, these are all components of Java EE. That’s because MicroProfile targets enterprise applications.Back to topGoals of MicroProfileThe main goal of MicroProfile is to define collections of Enterprise Java APIs for the optimal development of cloud-native microservices. These APIs were originally adopted from the Java EE standard (MicroProfile 3.x releases on Java EE 8) and were extended by those that are useful for the microservices pattern. Since the version of MicroProfile 4.0, Java EE was replaced by the Jakarta EE.Another goal of MicroProfile has been the ongoing addition of implementations and components. For example, MicroProfile is implemented in WildFly SWARM, Open Liberty, Apache TomEE, Thorntail and others. As mentioned above, MicroProfile version 4.0 and onward is based on Jakarta EE, which replaced the role of Java EE. If for some reason you are still dependent on previous Java EE, you can still use older releases.Back to topNotable MicroProfile Features and FunctionalitiesIts many specifications mean MicroProfile covers the needs of almost every Enterprise Java-focused development. The list is long, including:Health CheckFault ToleranceMetricsRest ClientOpen TracingLet’s zoom in to talk about the OpenAPI, JWT, and Config specifications.MicroProfile OpenAPIUsing this specification, developers can use Java API and programming models to produce OpenAPI v3 documents from JAX-RS applications. Recently, this spec was updated to use Jakarta dependencies and new annotations, such as @SchemaProperty and @RequestBodySchema. @APIResponseSchema was also added.MicroProfile JWTMicroProfile JSON Web Tokens, or JWT for short, is a specification that allows you to authenticate and authorize requests to a service. The latest stable release added support for JWT Token cookies.MicroProfile ConfigThis feature allows configuring applications based on a running environment using data from different sources and different locations. This means you can externalize configuration from microservices. MicroProfile Config is using Jakarta EE 8 dependencies.Back to topFuture of MicroProfileThe current stable version, MicroProfile 7.0, was released in August 2024. Stated future goals of MicroProfile are to “iterate and innovate in short cycles.”To try out MicroProfile 7.0, just open your pom.xml and add the following dependency:<dependency> <groupId>org.eclipse.microprofile</groupId> <artifactId>microprofile</artifactId> <version>5.0-RC2</version> <type>pom</type> <scope>provided</scope> </dependency>If you want to start working immediately with MircroProfile, you can visit its “starter” page and generate a runnable MicroProfile project there. The starter page is available here: https://start.microprofile.io/Back to topMicroProfile vs. Spring BootNowadays, development teams who need to break down their monolithic application into microservices (or who just want to start with a new microservices) face a difficult decision: Which framework they should use?If you search for a Java microservice framework on Google, you’ll find a huge selection, such as Spring Boot, Micronaut, Quarkus, Vert.X, and others. While some of them are older and some of them are newer, they all share the same goal — to provide the best features for microservices development — and they all do it well. Why even bother looking at other microservice framework options when you could just use Spring Boot?Because alternatives, including MicroProfile-based alternatives, could be a better fit depending on the application.Let’s now quickly compare MicroProfile vs. Spring Boot.Spring Boot is objectively one of the most popular Java frameworks for writing microservices and has many extension projects. It’s a mature, open-source, feature-rich framework with excellent documentation and a huge community. Starting with the development is super easy; for example, you can generate an application template using start.spring.io and start the application within minutes. That’s because Spring Boot has an embedded Tomcat server that you can use. But if you don’t want to use Tomcat, you can easily edit the default approach.MicroProfile, while not as ubiquitous as Spring Boot for microservices applications, still offers unique benefits to certain types of microservices applications. With a cloud-native approach that makes it easier to use within cloud infrastructure, and benefits that make it fault-tolerant, discoverable, and secure, expect to see MicroProfile-based frameworks command more market share as companies continue to go to cloud. Back to topJRebel and MicroProfileOur productivity tool, JRebel, works well with implementations of MicroProfile that we support, such as Payara Server, WebSphere Liberty, or WildFly.To start working with JRebel, you need to enable JRebel for your MicroProfile project.Once you start the server with the JRebel agent attached, you can enjoy skipping the long reload times! A good sign that it's working is a message from the JRebel agent that a specific class was reloaded.Back to topFinal Thoughts on MicroProfileConsider MicroProfile the next time you need reliable specifications for your next microservice-oriented project. By bringing together many parts of the Java ecosystem in open collaboration, enterprise Java in microservice-based architectures has been optimized for the benefit of all members of the community.Save upwards of a month of Java development time annually by eliminating rebuilds and redeploys with JRebel. See for yourself during your 14-day free trial. Try FreeFor all of our content related to Java microservices, check out our comprehensive guide to Exploring Java Microservices.Back to top
Pavel Fol Solutions Consultant, JRebel by Perforce Pavel is a Solutions Consultant at JRebel by Perforce. Pavel is passionate about helping Java development teams increase development efficiency with our tools, while providing continued support for ongoing success.