proomt

Search

Search posts, papers, and topics

All posts

CodeName OneShai Almog15 min readintermediate

We Didn't Want to Build Another Java Server

Summary

Codename One introduced an experimental native Java backend that compiles Java controllers to a tiny native executable via ParparVM. Benchmarks show sub‑millisecond startup, 10‑40 MiB memory, and up to 20 % higher request throughput than a Go fasthttp server.

  • ParparVM translates Java bytecode to C and produces native binaries as small as 392 KB with ~3 ms startup.
  • In a plaintext HTTP benchmark the static native build handled 595k RPS (≈20 % faster than Go) with <0.3 ms median latency.
  • Memory usage stays under 40 MiB, far lower than a JVM handler (~190 MiB) and comparable to Go’s 6 MiB.
  • Shared Java models and validation rules can be used both on mobile apps and the server, eliminating duplication.

Teams that need low‑latency, low‑memory Java microservices or serverless functions can get Go‑like performance without leaving the Java ecosystem.

6/10

Related reading

  1. What Go Taught Us About Java Garbage Collection

    ParparVM’s GC was tuned by lowering the allocation‑trigger floor, adding configurable thresholds, parallel marking, mutator assistance, and proper weak/soft reference handling. These changes cut RSS from 98 MB to 38 MB, reduced worst‑case GC pauses from seconds to sub‑second, and improved cache hit rates with a recency‑based eviction policy.

    CodeName Onecodenameone.com7 min
  2. Faster Starts, Less JavaScript Overhead

    Codename One reduced startup latency and JavaScript overhead by publishing screen state atomically, indexing style lookups, avoiding unnecessary artwork generation, and refining suspension analysis, yielding measurable speedups.

    CodeName Onecodenameone.com7 min
  3. One Java Model from the App to PostgreSQL

    Codename One introduces a backend runtime allowing a single Java model to define entities and validation rules for both client applications and the server. This approach aims to reduce duplication and ensure consistent data rules from the app to PostgreSQL.

    CodeName Onecodenameone.com7 min
  4. How Factory scaled its cloud backend to one billion monthly requests on Vercel

    Factory runs its entire SaaS backend on a single Next.js app deployed to Vercel, handling about a billion API requests per day with 350 ms p95 latency. They achieve this with Vercel’s Fluid compute to avoid cold starts, built‑in observability and WAF for security, and internal automation (“Droids”) that let non‑engineers deploy tools without extra infrastructure.

    Vercelvercel.com4 min