Scripts2026年7月7日·1 分钟阅读

Helidon — Java Microservices Framework by Oracle

A set of Java libraries for writing microservices that run on a fast Helidon WebServer underpinning, with support for MicroProfile and a reactive programming model.

Agent 就绪

先审查再安装

这个资产需要先审查。复制的指令会要求 Agent dry-run、列出写入项,确认后再继续。

Needs Confirmation · 64/100策略:需确认
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Helidon Overview
先审查命令
npx -y tokrepo@latest install b17f8331-7a23-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run,确认写入项后再运行此命令。

Introduction

Helidon is a collection of Java libraries developed by Oracle for building microservices. It offers two programming models: Helidon MP (MicroProfile) for developers who prefer annotation-driven JAX-RS style, and Helidon SE for those who want a lightweight functional/reactive approach without dependency injection frameworks.

What Helidon Does

  • Provides a fast embedded web server based on virtual threads (Loom) in Helidon 4.x
  • Implements the Eclipse MicroProfile specification including Config, Health, Metrics, and OpenAPI
  • Offers a functional reactive API (Helidon SE) for building services without annotations or CDI
  • Integrates with GraalVM Native Image for ahead-of-time compilation to reduce startup time and memory
  • Supports built-in service mesh features like tracing (OpenTracing/OpenTelemetry), fault tolerance, and JWT authentication

Architecture Overview

Helidon 4.x is built on virtual threads (Project Loom), replacing the earlier reactive Netty-based server. Helidon MP layers MicroProfile APIs (CDI, JAX-RS, JSON-P/JSON-B) on top of the core web server, while Helidon SE exposes the same server through a functional routing API without a CDI container. Both flavors share the same underlying HTTP engine, configuration system, and security framework, so features like health checks, metrics endpoints, and tracing work identically regardless of programming model.

Self-Hosting & Configuration

  • Requires JDK 21 or later for virtual thread support in Helidon 4.x
  • Use Maven or Gradle with the Helidon BOM (Bill of Materials) for dependency management
  • Application configuration is loaded from application.yaml or microprofile-config.properties with environment variable overrides
  • Build native executables with GraalVM using the native-image Maven plugin included in Helidon archetypes
  • Deploy as a standalone JAR, a Docker container, or on Kubernetes with the provided Dockerfile templates

Key Features

  • Virtual-thread-based server that handles high concurrency without reactive complexity
  • Dual programming models (MP and SE) sharing the same runtime and configuration system
  • Full MicroProfile compliance for portability across compliant implementations
  • GraalVM Native Image support for sub-second startup times
  • Built-in observability with health checks, Prometheus-compatible metrics, and distributed tracing

Comparison with Similar Tools

  • Quarkus — Red Hat's Java framework with hot reload and native compilation; larger ecosystem and community
  • Micronaut — compile-time DI framework; similar startup performance but uses annotation processing instead of virtual threads
  • Spring Boot — dominant Java framework; more libraries and integrations but heavier baseline footprint
  • Vert.x — reactive toolkit by Eclipse; event-loop model vs. Helidon's virtual-thread approach

FAQ

Q: What is the difference between Helidon SE and Helidon MP? A: Helidon SE is a functional API with no dependency injection container, suited for developers who want full control. Helidon MP implements Eclipse MicroProfile with CDI and JAX-RS annotations, suited for those familiar with Jakarta EE patterns.

Q: Does Helidon support GraalVM native images? A: Yes. Both Helidon SE and MP support GraalVM Native Image compilation. The Helidon CLI and Maven archetypes include native-image profiles out of the box.

Q: How does Helidon 4.x differ from earlier versions? A: Helidon 4.x replaced the Netty-based reactive server with a virtual-thread server (Project Loom), simplifying the programming model by allowing blocking-style code that scales like reactive code.

Q: Can Helidon run on Kubernetes? A: Yes. Helidon projects generated by the CLI include Dockerfiles and Kubernetes YAML manifests. Health and readiness endpoints are enabled by default for probe configuration.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产