Quarkus k8s
- 11. So who is this Quarkus—
and what’s all the fuss?
Up to 10x smaller, 100x faster
Seriously.
- 16. Traditional Java apps (both app server and fat-jar stacks)
● Tons of classes loaded during boot time
○ Unused later on
○ Occupy a lot of memory
● Reflection used extensively
XML Parsers, Annotation models….
- 17. Quarkus
Do as much as possible at build time
● Annotation processing
● Configuration parsing
● Throw away all classes that are not needed at runtime
● Avoid runtime reflection as much as possible
Output: generated classes
- 22. GraalVM Limitations
● Dynamic classloading
○ Creating, reloading classes at runtime is not possible
● JVMTI, JMX
○ No agents
● InvokeDynamic, MethodHandles
○ But lambdas are supported
- 23. GraalVM Limitations
● Reflection
○ All targets of reflection need to be known
● Dynamic Proxies
○ All classes that will get proxied at runtime need to be
declared
● Classpath resources
○ All resources to be included must be declared
- 24. GraalVM Limitations
Example of manual invocation:
native-image -jar target/app.jar -H:ReflectionConfigurationResources=reflection_config.json
-H:Name=name
--delay-class-initialization-to-runtime=io.netty.handler.codec.http.HttpObjectEncoder
Quarkus shields you from all GraalVM peculiarities!
- 27. Thank you!
Twitter: @geoand86
Further reading
• http://quarkus.io
• https://developers.redhat.com/blog/2019/03/07/quarkus-
next-generation-kubernetes-native-java-framework/
• http://in.relation.to/2019/03/08/why-quarkus/