What I’ve Learned While Building a To-Do App Using Quarkus

Recently I was working on a small project to build a simple browser-based app using Quarkus, JQuery, and Postgresql. The focus was more on learning Quarkus, while the others were complimentary. I was interested to get a first-hand experience on Quarkus and Graal VM. Some readers might be new with these words so let me start with a small introduction on these two projects.

Quarkus is an open source project working with a container-first philosophy to build cloud-native Java-based applications using a microservice architecture. It brings along significant improvement on app booting (a notorious area for improvement for Java-based applications) by build time meta-data processing and most importantly building standalone native images using Graal/Substrate VM. Graal VM applies a technique to statically analyze the classes to determine which classes and methods are reachable and will be used during application execution. Then it passes all this reachable code as the input to the GraalVM compiler which ahead-of-time (AOT) compiles it to the native binary. The native binary runs on a different VM (Substrate VM) that manages runtime components like de-optimizer, garbage collector, thread scheduling, etc.