Serve and call HTTP APIs, expose JSON-RPC methods and trace the whole stack.

Overview

The HTTP stack of Fusion is built on Apache Tomcat (server) and java.net.http (client), with a uniform request/response API and generated endpoint matchers.

TIP

JSON-RPC is a first-class, core feature: declare a @JsonRpc method on any bean and it is served over HTTP with full OpenRPC discovery - no routing or serialization plumbing to write. It is the recommended way to expose an API and shines for internal backends.

Besides RPC, the same server serves plain Endpoint/@HttpMatcher handlers and health/metrics, the client is an extended java.net.http with listeners, routing and replay, and tracing bridges both sides.

Modules

  • JSON-RPC - JSON-RPC 2.0 over HTTP with @JsonRpc methods, pre-request hooks and OpenRPC support.

  • HTTP server - Tomcat abstraction, health checks and metrics, high level Endpoint API and @HttpMatcher.

  • HTTP client - extended java.net.http client with request listeners, routing, throttling and HAR/NDJSON replay.

  • Tracing - Zipkin/OpenTelemetry oriented tracing for the server (valve) and the client (listener).