Zakaria El OrcheandClaude Sonnet 5 36216cd401
Publish Maven packages / publish (push) Successful in 47s
ci: publish fpr-core/fpr-netty/fpr-bench to the Gitea Maven registry
maven.relism.dev is down, and Flash5 depends on fpr-core to build. Mirrors
Flash5's own .gitea/workflows/publish-maven.yml exactly: on push to master,
stamp every module with a commit-scoped version (1.1.0-<short-sha>, since
Gitea's Maven registry refuses to re-publish an existing name+version) and
deploy to Relism's Gitea package registry with a write:package PAT (Gitea's
own job token can't publish to package registries at all).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-20 10:58:23 +00:00
2026-03-15 01:15:43 +01:00
2026-03-15 01:15:43 +01:00
2026-03-15 01:15:43 +01:00
2026-03-15 01:15:43 +01:00
2026-03-15 01:15:43 +01:00

FastPathRouter (FPR)

FastPathRouter is a tiny, GC-friendly routing core designed to compile startup-time route definitions into immutable, array-based match tables. The hot path avoids String and Map allocations and works directly on byte views.

Modules:

  • fpr-core: routing core and compiler
  • fpr-netty: Netty adapters (ByteBuf view + path extraction)
  • fpr-bench: JMH benchmarks

Philosophy:

  • build routes at startup, compile into frozen tables
  • match using byte-level comparisons
  • avoid String/Map allocations in the hot path

Route syntax:

  • params use {name} (e.g. /users/{id})
  • mixed segments are allowed (e.g. /static/pre-{x}-suf)
  • * matches a single segment, ** matches the rest of the path

Zero-copy param extraction:

RouterBuilder<String> builder = new RouterBuilder<>();
builder.add(StringRouteParser.parse("/users/{id}/orders/{orderId}"), "H");
FastPathRouter<ByteView, String> router = builder.compile();
String[] paramNames = builder.paramNames();

ByteView view = ...;
MatchResult<String> out = new MatchResult<>(builder.maxParamCount());
router.match(view, out);
out.forEachParam(view, paramNames, (name, bytes, start, len) -> {
    // Use bytes + start/len as needed; convert only if required.
});

Build and test:

mvn -q -DskipTests=false test

Run benchmarks:

mvn -pl fpr-bench -DskipTests package
java -jar fpr-bench/target/fpr-bench-1.0-SNAPSHOT-shaded.jar -wi 5 -i 5

Or use the Maven exec profile:

mvn -pl fpr-bench -am -Pbench verify
S
Description
State of the art *state* machine multi-strategy java path router.
Readme MIT
78 KiB
Languages
Java 89.6%
Python 10.4%