Skip to content

Technology Languages and Frameworks

mavrovde edited this page Nov 13, 2026 · 3 revisions

Technology: Languages and Frameworks

Part of the Technology Evaluation. One section per option. Memory figures are estimates from public sources and general experience, not measurements of ours.

Current position: three candidates have full designs: Go (huma v2 on chi, pgx v5), Rust (axum, utoipa, tokio-postgres) and TypeScript (Fastify 5, zod v4, pg). Go and Rust are the owner's preferred candidates. The three are compared on Stack Comparison, which recommends Go; a benchmark decides.

Summary

Option Language Verdict One-line reason
huma v2 + chi + pgx v5 Go Recommended candidate native server-side cancel, OpenAPI 3.1 and RFC 9457 from types, small footprint
axum + utoipa + tokio-postgres Rust Alternative candidate smallest footprint and strongest compile-time guarantees; explicit cancellation and slower iteration
Fastify 5 + zod v4 + pg TypeScript Third candidate fastest delivery and one schema for types, validation and OpenAPI; single event loop, larger memory, hand-built server-side cancel
Hono TypeScript Viable portable, typed; smaller server middleware set
NestJS TypeScript Rejected heavy for an API of this size
Express 5 TypeScript/JS Rejected no schema-driven typing
Echo, Gin Go Rejected OpenAPI by comments, not OpenAPI 3.1 from types
actix-web Rust Rejected its own runtime model; axum fits the tower ecosystem better
Spring Boot Java/Kotlin Rejected memory
Quarkus Java/Kotlin Rejected a JVM toolchain with no gain over Go
Ktor Kotlin Rejected immature OpenAPI, small ecosystem
FastAPI Python Rejected weaker typing, memory per worker
Django REST framework Python Rejected ORM-centred, synchronous
ASP.NET Core minimal APIs C# Rejected technically strong; toolchain fit only
Phoenix Elixir Rejected dynamic typing, niche
Bun, Deno runtimes Rejected for now different runtime from the rest of the platform; young

Go: huma v2 on chi with net/http

  • What it is. huma generates OpenAPI 3.1 and JSON Schema from Go types and sits on a router; chi is a lightweight, net/http-compatible router.
  • Fit. A very large throughput margin. pgx v5 sends a real PostgreSQL cancel request when the request context ends, which matches the 2 second rule exactly.
  • Memory. Estimated 15–50 MB resident; one static binary in a small distroless image.
  • Strengths. The deadline flows through handler and driver; sqlc generates typed code from SQL checked against the contract; RFC 9457 errors are built into huma; x/time/rate provides a token bucket.
  • Weaknesses. A second language beside the platform; verbose error handling.
  • Risks. huma is maintained by a small team. Mitigation: it emits standard OpenAPI and handlers are plain functions, so a move to another generator is mechanical.
  • Licence. MIT (huma, chi), BSD-3 (Go).
  • Verdict: Recommended candidate. Details: Architecture: Go.

Rust: axum

  • What it is. A tokio-based framework from the tokio team, built on tower middleware.
  • Fit. Maximum headroom.
  • Memory. Estimated 5–40 MB resident.
  • Strengths. Lowest memory and latency; OpenAPI 3.1 through utoipa; the tower ecosystem for timeouts and limits; no null and no data races at compile time; exhaustive enums suit total mapping tables.
  • Weaknesses. Cancellation through tokio-postgres or sqlx is explicit and documented as racy: dropping a future does not stop the server-side query, so a cancel token and the statement timeout are needed. Slower compiles. Longer compile-and-fix cycles for AI agents.
  • Risks. Build times; a narrower maintainer pool for some supporting crates.
  • Licence. MIT (axum).
  • Verdict: Alternative candidate. Its main strength, raw throughput, is the one the API needs least; its compile-time guarantees are its real argument. Details: Architecture: Rust.

Rust: actix-web

  • An actor-heritage framework and a perennial leader in throughput benchmarks.
  • Same trade-offs as axum, but outside the tower ecosystem that the Rust design relies on.
  • Licence. MIT or Apache-2.0. Verdict: Rejected in favour of axum.

TypeScript: Fastify 5 (third candidate)

  • What it is. A schema-driven Node framework with a plugin system and type providers.
  • Fit. Ample throughput; the database is the limit. Same runtime as the ViaFrei platform.
  • Memory. Estimated 80–130 MB resident.
  • Strengths. Code-first OpenAPI 3.1 via a zod type provider; mature hooks for keys, limits and admission; plugins for ETag, compression, rate limiting and event-loop pressure; reuse of the platform's tooling.
  • Weaknesses. A single event loop, so heavy JSON must stay in the database. The node-postgres driver documents its query timeout as a client-side timeout, so real server-side cancellation needs SET LOCAL statement_timeout plus an explicit cancel.
  • Licence. MIT. Verdict: Third candidate. It scored highest on reuse in the first evaluation; without the reuse weight it ranks third on Stack Comparison. Details: Architecture: TypeScript.

TypeScript: Hono

  • A small Web-Standards framework running on Node, Bun, Deno and edge runtimes; OpenAPI 3.1 via a zod integration.
  • Portable and cleanly typed, but a smaller server-side middleware set and an extra translation layer on Node.
  • Licence. MIT. Verdict: Viable, second among the TypeScript options; Fastify's first-party production plugins decide for Fastify (see Architecture: TypeScript).

TypeScript: NestJS

  • An opinionated, Angular-style framework with dependency injection and decorators.
  • Estimated 120–200 MB resident; decorator-driven OpenAPI duplicates types; more code per endpoint; its abstractions hide SQL and deadline control.
  • Licence. MIT. Verdict: Rejected: it costs more than it gives for an API of about twenty endpoints.

Express 5

  • Ubiquitous and familiar, but no schema-driven validation or serialisation; OpenAPI only through add-ons that drift from the code.
  • Licence. MIT. Verdict: Rejected.

Go: Echo and Gin

  • Popular, mature, batteries included.
  • OpenAPI relies on comment annotations (swaggo), which produce older OpenAPI versions and drift from the types. OpenAPI 3.1 from types is a requirement.
  • Licence. MIT. Verdict: Rejected in favour of huma (which can also run on Gin through an adapter if ever needed).

Java/Kotlin: Spring Boot

  • A huge ecosystem, first-class JDBC cancellation.
  • On the JVM, estimated 250–500 MB resident; native images are smaller but slow and memory-hungry to build.
  • Licence. Apache-2.0. Verdict: Rejected on memory footprint.

Java/Kotlin: Quarkus

  • Container-first, build-time dependency injection, the best footprint on the JVM when compiled natively.
  • Native builds take minutes and a lot of memory; adds a JVM toolchain without beating Go's footprint.
  • Licence. Apache-2.0. Verdict: Rejected.

Kotlin: Ktor

  • Concise, coroutine-based, with structured cancellation.
  • Less mature OpenAPI generation; PostgreSQL access needs extra glue; JVM memory.
  • Licence. Apache-2.0. Verdict: Rejected.

Python: FastAPI

  • The best OpenAPI-from-types experience; asyncpg is fast; agents know it well.
  • The interpreter lock means one process per core, which multiplies memory; typing is optional rather than enforced.
  • Licence. MIT. Verdict: Rejected.

Python: Django REST framework

  • ORM-centred, a poor fit for view-only SQL, PostGIS JSON and deadline control; synchronous by default.
  • Licence. BSD-3. Verdict: Rejected.

C#: ASP.NET Core minimal APIs

  • Among the fastest stacks; built-in partitioned rate limiting; cancellation tokens throughout; strong typing; built-in OpenAPI.
  • A separate toolchain with nothing shared.
  • Licence. MIT. Verdict: Rejected on toolchain fit only. Technically one of the strongest options.

Elixir: Phoenix

  • Excellent concurrency and fault isolation.
  • Dynamic typing; OpenAPI only through a third-party library; a niche skill set.
  • Licence. MIT / Apache-2.0. Verdict: Rejected.

Runtimes: Bun and Deno

  • Bun: fast start-up and HTTP, a built-in PostgreSQL client. Deno: native TypeScript and a permission sandbox.
  • Both would differ from the platform's runtime, and both are younger, with compatibility edge cases.
  • Licence. MIT. Verdict: Rejected for now.

Sources

Home

About

Design

Data Model

Technical specification

Testing

Engineering

Technology choice

Reference

Clone this wiki locally