Posts

Showing posts with the label GraalVM

Spring-Boot Native Image

Image
Spring Boot is the most popular java stack nowadays. New languages like Go and Rust are capable of creating a single binary, self-contained with all deps to run the application. This is great for deployment simplicity but also easier to maintain. As time pass we want to have fast bootup times and do more with less. The native solutions are fast since they are statically compiled for a target platform or OS(in the case of UniKernels). Java was designed to be better as time pass(Runtime) and optimizations kick in. However thats not ideal for Serverless applications. GraalVM changes that since allowing us to compile JVM applications(Java, Scala, Kotlin) to native applications. Today I want to share a simple Video + POC using a new project called Spring Boot Native which allows us to create native images to spring boot apps.  Native images have some challenges like Type Erause for C++ and Reflections in Java. So Let's get started!

Polyglot and Native runtime with GraalVM

Image
GraalVM is a universal VM mainly for Java and JVM supported languages. With GraalVM you can run native programs written in Python, Ruy, R and all JVM languages like Scala, Clojure, Groovy and Kotlin also LLVM based like C and C++. Graal VM removes isolation between languages and enables interoperability with natively shared runtime. You might be wondering why botter use other VM? Well, there are a couple of good reasons. Java is a pretty old language and does not have the best startup time. Today we are all running services in containers on top of kubernetes and we are always looking for ways to improve the customer experience. Startup time is not only a matter of better customer experience but also availability. For the developers, this means better development experience and idiomatic experience with the best solution for each specific problem. GrralVM Supported Runtimes GraalVM can be used standalone runtime or embedded in the context of OpenJDK, Node.JS, Oracle...