Kest
Architecture
The processor, the container and the engine, and how a request travels through them.
Three layers
The processor (packages/processor) is the only build-time piece. It is one KSP processor extended by contributors (HTTP routes, validation, ORM, API docs, handler attachments). Contributors match annotations by name, so the processor never depends on the packages it serves.
The container (core) holds providers, resolves scopes, runs lifecycle hooks and exposes discovery (methodsWith<A>(), classesWith<A>()) for annotation-driven features such as @Cron or @MessagePattern.
The HTTP layer (http-server) knows nothing about a particular server. An engine implements the HttpAdapter SPI and Kest does the routing and the pipeline.
Life of an HTTP request
The same pipeline pieces (guards, interceptors, pipes, filters) also wrap microservice, WebSocket and gRPC handlers.
Why a processor instead of reflection
| Reflection at startup | Kest | |
|---|---|---|
| Missing provider | found when the app starts | build error |
| Startup cost | scans and builds metadata every launch | none; generated code constructs objects |
| Native image or trimming | needs extra configuration | plain code |
| Cost | longer builds, a KSP step |