Helidon: Build microservice in zero time

Microservice is the new architectural practice in the Cloud-native application development. This will make sure quick and easy shipment to the customers. Development tools and frameworks are released frequently than before to enable the whole eco-system moving so fast.

Helidon

Helidon is the new addition in the microservice development race for Java developers. It is an open-source project developed by Oracle. When I came across this framework, I wanted to give a try for my next microservice development. The moment I started looking into their documentation, I couldn’t stop reading further. So I wanted to give a shot to get my initial feelings about the framework. My first feeling was fantastic! This is not simply because of offering nice tooling and the latest technology. But this is so easy to get started and get things done in zero time. I mean ZERO time.

Create project skeleton

Execute the below archetype to get the skeleton code. Please make note that before executing the command you should have Java and Maven in your classpath.

mvn archetype:generate -DinteractiveMode=false \
    -DarchetypeGroupId=io.helidon.archetypes \
    -DarchetypeArtifactId=helidon-quickstart-mp \
    -DarchetypeVersion=1.3.1 \
    -DgroupId=com.hustlebar \
    -DartifactId=dailyapi \
    -Dpackage=com.hustlebar.dailyapi

Run project

Compile and run the project using the following command,

Compile:
  > mvn package

Run application:
  > java -jar target\dailyapi.jar

Access application

Access the application using http://localhost:8080/greet

There are few other default endpoints are created in our skeleton code. But the most important point here is, you will get a lot more capability out of the box due to the Microprofile.

PathsExplanation
/healthTo get the health of the application
/openapiTo generate the Open API specification document
/metricsTo get the metrics of the application

All the above endpoints are supported out of the box without even writing a single line of code by us.

The whole exercise is completed within 5 minutes of my time. The first experience with the Helidon framework is so awesome. I will keep exploring the framework further and share my thoughts in the coming weeks!

{ happy coding }

NOTE: I am NOT employed at Oracle and I am NOT promoting this framework!

API Evangelist | Chief Hustler @workrituals.com | Habit Coach | Madras Java User Group Leader
80FollowersFollow
0SubscribersSubscribe

Latest articles

When to use Firebase Cloud functions?

Recently I got a question from one of the Indie makers that, when to use Firebase Cloud Functions? This...

Jakarta Tech Talk: Build Microservice using Microprofile + Helidon

Recently I gave a presentation on Jakarta Tech Talk series on 'Building a Microservice using Microprofile + Helidon. Enjoy watching the presentation...

Serverless REST APIs made simple with Cloud functions

Introduction Serverless is one of the top keyword in the integration space right now. Everyone is talking about the...

How to get started with Google cloud functions?

The 'Cloud Functions' is a Google technology bundled as part of the Firebase platform. It is a serverless backend to support our...

Why Firebase is a great technology for ‘Indie Makers’...

Firebase is a technology developed by Google. In this article, I am going to explore why Firebase is a great technology for...

Similar articles