Quarkus
I joined Ripple in June 2022 as a backend developer, even though I worked as a frontend developer for many years.
One of the things that I had to re-learn was the Java programming language. I learned it in college and even got a certification in 2012, but I never used Java until now.
Initially, Java seemed dull to me after working with trendier or hipster programming languages such as Scala, Go, and ReScript. These programming languages were cool back then, but it was difficult to find programmers who knew or were willing to learn them. Anyway, this is a story for another time.
So here I was, navigating the Java and Spring documentation. And, holy molly, Java is actually great! It’s straightforward, stable, secure, and battle-tested. Not to mention it gets better and better. My team is very excited about the recently released virtual threads, for example.
I had the task of creating a new Java application. All our applications are written in Java and Spring, and while most are optimized, the JVM can be a memory hog. Yes, it can be tweaked to perform better, but the JVM still requires some memory.
Can we do better? Yes, Quarkus!
Quarkus is marketed as “Supersonic Subatomic Java”, what the 🦆?
Quarkus is a full-stack, Kubernetes-native Java framework made for Java virtual machines (JVMs) and native compilation, optimizing Java specifically for containers and enabling it to become an effective platform for serverless, and Kubernetes environments.
Quarkus can help run your apps more efficiently, it provides faster hot reloads (I was missing this from the frontend development), and you can build native executables, so the JVM is not required.
Native images allow compiling your applications to binaries and are OS-specific (i.e. a universal binary for Mac or an .exe binary for Windows). The executables are small, fast, and dependency-free, all of which make them an excellent fit for container-based deployments.
I wrote two small microservices that are hosted on Github. I’m still experimenting with it, but it’s solid so far.
I don’t want to go into more details, but if you are interested in boosting your Java applications, you should check Quarkus out. The official docs contains great guides for anything you might need.
There are other alternatives like Micronaut or Spring Native.