Why architecture matters here

Native image fails on reflection config gaps, build time, and mistaken use for throughput-critical apps. Architecture matters because AOT + closed world change the model.

Advertisement

The architecture: every piece explained

The top strip is the tool. Java bytecode. native-image tool. Closed-world analysis. Native binary.

The middle row is knobs. Reflection config. Metadata repo. PGO / build modes. Runtime features.

The lower rows are practice. Interop. Trade-offs. Ops — build + test + debug.

GraalVM native image — AOT + closed world + reflection config + startupJava without the JVM warmupJava bytecodeapp + libsnative-image toolAOT compilerClosed-world analysisstatic reachabilityNative binaryno JVM neededReflection configdeclare dynamicMetadata reporeachability metadataPGO / build modesquick / releaseRuntime featuresGC options + heapInteropJNI + resource filesTrade-offsstartup + memory vs throughputOps — build time + testing + debuggingdeclarehelpoptimizetuneinteropmeasuremeasureoperateoperate
GraalVM native image build pipeline.
Advertisement

End-to-end flow

End-to-end: Spring Boot app built with native-image. Reflection config generated from tracing agent. Build takes 3 min. Binary starts in 20ms + 50MB memory. Peak throughput 20% lower than JIT but fine for serverless.