BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Helidon V1 Brings API Stability and MicroProfile 1.2 Support

Helidon V1 Brings API Stability and MicroProfile 1.2 Support

Lire ce contenu en français

Oracle has released version 1.0 of Project Helidon, an open-source collection of Java libraries to build microservices, with greater API stability than beta versions and support for the MicroProfile 1.2 spec.

According to the release notes, the Helidon team has been finalizing the API changes over the last couple of months before the V1 release. Helidon comes in two programming models: Helidon SE and Helidon MP. Helidon SE is a micro-framework that comes with a reactive web server to build microservices. Helidon MP is based on Eclipse MicroProfile and provides JAX-RS, CDI and JSON-P/B APIs.

Helidon provides multiple components to build cloud-native applications.

Web Server

The NodeJS inspired WebServer component provides a reactive API for creating microservices and web applications. The WebServer handles incoming traffic using routing patterns and request handlers. The WebServer comes with a static content handler and support for generic and specific error handling.

Configuration

The configuration component provides Java APIs to load key/value pairs that can be used by an application to configure itself. The configuration can be loaded from multiple data sources like the file system or a URL. The component offers a polling mechanism to detect and publish changes to the config sources.

Security

The security component provides authentication and authorization support. Security related events are audited by default. Audit can be can be configured. The component comes with security providers like JWT, HTTP Basic, and attribute based access control.

Metrics

The metrics component provides a means to configure and expose application metrics in JSON format or plain text.

Tracing

The tracing component provides support for instrumentation and distributed tracing. Helidon’s tracing support is based on the OpenTracing APIs.

Health Checks

The health check component provides support to configure and expose built-in and user defined health checks.

The following code example showcases how to build a simple web server using Helidon SE and serve static content (images) under the file system:

import io.helidon.webserver.Routing;
import io.helidon.webserver.ServerConfiguration;
import io.helidon.webserver.StaticContentSupport;
import io.helidon.webserver.WebServer;

public static void main(String... args) {
    var contentSupport = StaticContentSupport
            .create(Paths.get("app/content/images"));

    var routing = Routing
            .builder()
            .register("/api/v1/images", contentSupport)
            .build();

    var config = ServerConfiguration
            .builder()
            .port(8080)
            .build();

    WebServer
            .create(config, routing)
            .start();
}

Helidon provides a getting started guide with two quick start examples - one for Helidon SE and the other for Helidon MP.  

InfoQ reported on the introduction of Helidon and interviewed Dmitry Kornilov, Oracle senior software development manager, in October 2018.

Rate this Article

Adoption
Style

BT