Helidon Takes Flight

Dmitry Kornilov
Sep 7, 2018 · 5 min read
Image for post
Image for post

Today is a great day. Today we introduce a new Java microservices framework and a new member of the MicroProfile family. Please welcome Project Helidon — a new open source Java microservices framework from Oracle.

Helidon is a Greek word for swallow, a type of bird that according to Wikipedia has “a slender, streamlined body and long pointed wings, which allow great manoeuvrability and… very efficient flight”. Perfect for darting through the clouds.

Overview

The work on what would become the Helidon Project started some time ago. When we entered the cloud world, and microservices architecture started to become very popular for creating cloud services, we realized that the development experience also needed to change. It’s possible to build microservices using Java EE, but it’s better to have a framework designed from the ground up for building microservices. We wanted to create a lightweight set of libraries that didn’t require an application server and could be used in Java SE applications. These libraries could be used separately from each other, but when used together would provide the foundation a developer needs to create a microservice: configuration, security, and a web server.

There are already some efforts to build standard microservices frameworks from MicroProfile. MicroProfile is quite popular in the Java EE/Jakarta EE community and provide a development experience similar to Java EE. We like the idea and support the initiative. Helidon implements MicroProfile 1.1. We will continue working on implementing new versions of MicroProfile and intend to support relevant Jakarta EE standards in this area as they are defined.

Helidon is made by Oracle, so don’t be surprised that there will be some useful Oracle Cloud integrations. These are not included in the initial version, but will be added later. Helidon is already used by many internal Oracle projects and these integrations simplify our developers’ lives big time. We believe that will simplify your life as well if you use Oracle Cloud. If not, these integrations are optional.

Landscape

Image for post
Image for post
Microservices frameworks categories

Java Frameworks for writing microservices fall into a few categories. From smaller to larger:

  • Microframeworks
    Simple, fun, intentionally small feature set. Examples are Spark, Javalin, Micronaut, etc.

Helidon comes in two flavours and covers two categories — Microframeworks and MicroProfile. It’s up to a developer to choose what to use in their applications.

  • Helidon SE — simple, functional, lightweight microframework developed in a modern reactive way. There is no injection “magic”. No special runtime required. JDK is used as runtime.

Architecture

Helidon’s high level architecture is shown on the picture below.

Image for post
Image for post
Helidon architecture
  • Helidon SE components are marked green. These are Config, Security and RxServer.

Usage and Samples

Setup

The easiest way to start using Helidon is if you use a Maven project with Java 8 (or higher version) and configure the Helidon bom-pom:

Helidon SE

Helidon SE is the base to build lightweight reactive microservices.

A Hello world implementation:

This would start webserver on a random (free) port and expose endpoint /hello.

Imports
Dependency needed to start this example (version not required if you used bom-pom)

Adding metrics to SE

We have provided an implementation of MicroProfile Metrics interfaces also for Helidon SE (without support for injection, as that is not included in SE).

This requires a new dependency:

New endpoints are available:

  • /metrics
    All metrics (base, vendor and application)

Helidon MP

Helidon MP is an Eclipse Microprofile implementation and a runtime for microservices.

A Hello world implementation that uses metrics to meter the invocations.

You must create a JAX-RS resource class to process your requests:

And then start the server with this resource:

You also need to create beans.xml file in the src/main/resources/META-INF directory to trigger CDI injection in this project:

This would start a webserver on the default port (7001) and expose endpoint “/hello”.

The following endpoints are available:

  • The hello world example
    http://localhost:7001/hello

Plans

We have so many plans, I could write a separate article about them.

Our short term goal is to advertise Helidon in the Java community. We are planning to talk about Helidon at some conferences. We have four Helidon-related Oracle Code One 2018 talks planned. We have also submitted talks to EclipseCon Europe 2018 and will participate in the Jakarta EE/MicroProfile Community Day there. Some learning materials such as such as videos, samples, articles, etc. are also on the way.

From the technical perspective, we are working on implementing the next MicroProfile versions. We are also working on GraalVM support, which looks like a great feature for Helidon SE users.

We are working on some other cool stuff and features, but we can’t show all cards now. Stay tuned, we will announce new features as soon as the are ready.

Useful Links

You may find it interesting

  • The original internal name of the project was J4C (Java for Cloud).

Helidon

The official project Helidon blog containing articles from…

Dmitry Kornilov

Written by

Oracle Employee, Eclipse EE4J PMC member, Jakarta EE contributor, JCP star spec lead, Helidon Project lead.

Helidon

Helidon

The official project Helidon blog containing articles from Helidon developers and the developers community. All articles are approved by the Helidon team. Contact @dkornilov to publish your story.

Dmitry Kornilov

Written by

Oracle Employee, Eclipse EE4J PMC member, Jakarta EE contributor, JCP star spec lead, Helidon Project lead.

Helidon

Helidon

The official project Helidon blog containing articles from Helidon developers and the developers community. All articles are approved by the Helidon team. Contact @dkornilov to publish your story.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store