Migrating Spring Boot to Quarkus and GraalVM May 2020

GraalVM enables Serverless by providing much better startup times than Spring Boot. Quarkus is one promising emerging framework in this area. So I migrated one of my Spring Boot Micro Service Backends, namely the storage backend of Noty to Quarkus.

Starting with the results: The big plus certainly is the startup time of the application. The build time of the native compile is not really fun on my Core i7. The resulting binary is big, at least when taking into account what this micro service provides in the end.

Spring Boot Quarkus (jar compile) Quarkus (native compile)
Startup Time 11s 2,1s 0,5s
Artefact Size 43MB (jar) n/a (no uber-jar created) 82MB (linux binary)
Build Time (without tests) 4,0s 7,7s 3min 7s

The following code changes have been necessary for a successful migration:

The following just remain unchanged when migrating to Quarkus:

Overall it was only a few hours of work to have it up and running again.

Souces available on GitHub: https://github.com/micgn/noty-server-quarkus