ADR-00011 — Go vs Java vs Node: Default Backend Runtime
- Status: Approved / Implemented
- Date: 2026-09-27
- Authors: Engineering Team
Context
ADR-00010 established that this platform matches language to workload rather than standardizing on one. This ADR narrows in on one specific pairwise-style decision that ADR-00010 stated but didn’t fully argue on its own: why Go, specifically, is the default choice for the nine domain/CRUD/aggregation microservices and the one Temporal workflow host (order-service), against the two alternatives a team building this kind of platform would realistically consider — Java and Node. This decision traces to SR-007’s FR-01.
Decision Drivers
- Startup responsiveness under autoscaling. A domain/CRUD service that scales out in response to a traffic spike needs to become ready to serve a request quickly and predictably — see BRD-007’s BR-02.
- Baseline memory footprint per instance. Running many small, independent services (nine in this platform) means each instance’s idle/baseline memory reservation multiplies across the fleet — see BRD-007’s BR-01.
- An officially supported Temporal SDK. Only Go has one in this ecosystem (see the platform’s cross-cutting principles capability table) — this alone decides which language can host the checkout saga workflow, independent of the other drivers.
- Concurrency model fit for I/O-bound aggregation and fan-out joins. Domain services in this platform frequently join results from multiple downstream gRPC calls (see the platform’s layered architecture standard for the EAV/external-API patterns) — a concurrency model needs to make many concurrent outbound calls cheap.
Options Evaluated
Option 1 — Go (CHOSEN)
- Compiles to a single static binary with no separate runtime process to warm up; a new instance is ready to accept traffic essentially as soon as its process starts.
- Goroutines give cheap, lightweight concurrency for the fan-out gRPC joins these services already perform (e.g.
shop-service’s report-section joins againstinventory-service/product-catalog). - The only language in this ecosystem with an official Temporal SDK (
pkg/temporal/) — decidesorder-service’s runtime independent of the other drivers. - Cons & Accepted Trade-offs:
- No borrow-checker-level memory-safety guarantee — an accepted trade-off because these services don’t hold long-lived decrypted secret material (that responsibility is Rust’s, see ADR-00012).
- A smaller general-purpose library ecosystem than Java’s — acceptable because
go-lang-core-libalready supplies this platform’s own cross-cutting needs (errors, logging, auth, tracing — see the platform’s cross-cutting principles).
Option 2 — Java (including GraalVM-compiled Java)
- Pros: Mature ecosystem, large hiring pool, strong tooling for enterprise-style CRUD services.
- Cons (Why Rejected):
- A JVM running in standard (non-native-image) mode pays a class-loading and JIT warm-up cost on every fresh instance — the exact cost BRD-007’s BR-02 flags as limiting how fast new capacity can absorb a spike. This cost is real and specific to the JVM’s execution model, not a general property of “compiled languages.”
- GraalVM native-image compilation removes most of that warm-up cost and was explicitly considered as the closer alternative to Go here — but it narrows the ecosystem advantage that’s Java’s main case in the first place (not every library or framework used in a typical Java stack supports native-image compilation cleanly), and doesn’t reduce Java’s baseline heap-reservation behavior the way a Go binary’s smaller runtime does.
- GraalVM’s native-image build step itself is a separate cost from runtime cold start, and a real one for this platform’s own build pipeline: ahead-of-time whole-program analysis and compilation for a single service typically takes minutes, against Go’s compile times of a few seconds. Across nine services rebuilt repeatedly through CI on every change, that difference compounds into materially slower iteration and deployment cycles — a build-time cost, not a request-latency cost, but one this platform weighs the same way since both eventually gate how fast a change reaches production.
- No official Temporal Java SDK gap exists (Java does have one), but adopting Java here would still mean running Go for
order-servicealongside a second backend language for everything else — reintroducing the same “why two backend languages” question this ADR is meant to close, without the specific memory-safety justification Rust has for its own carve-out.
Option 3 — Node
- Pros: Same language as the migration pipeline (see ADR-00015); non-blocking I/O suits request-driven CRUD reasonably well.
- Cons (Why Rejected):
- No official Temporal SDK for Node (see the platform’s cross-cutting principles) —
order-service’s checkout saga would still need a second backend language regardless. node-lang-core-libis explicitly documented as not yet at parity withgo-lang-core-lib(no TypeScript types, inconsistent typed-error coverage, no server-side request-duration metric) — moving nine domain services onto Node today would mean building out that parity under migration pressure rather than as planned, incremental hardening.- A single-threaded event loop handling CPU-adjacent aggregation/join logic (not just I/O waiting) is a weaker fit than goroutines for the kind of multi-downstream-call fan-out these services already do.
- No official Temporal SDK for Node (see the platform’s cross-cutting principles) —
Final Decision
Option 1 (Go) is selected as the default backend runtime for every domain/CRUD/aggregation microservice and the Temporal workflow host. Java’s warm-up cost (even in its native-image form) and Node’s lack of an official Temporal SDK and current core-lib parity gap both fail BRD-007’s cost/startup-responsiveness criteria or reintroduce a second backend language without a memory-safety-specific justification — the one thing that does justify a second backend language, addressed separately in ADR-00012.