For years, Spring Boot was my go-to for Java microservices. It worked, so I didn't question it. But as we started moving more services to Kubernetes and AWS Lambda, the problems became impossible to ignore.
Cold starts taking 5-10 seconds.
Containers eating up 800MB+ of memory.
Wasting money just to keep services alive.
Then I found Quarkus. It starts in ~0.01 seconds as a native image and runs on a fraction of the memory. It was a game-changer.
So I wrote a book about it.
*π The Book: Practical Quarkus: From Zero to Native
*
It is a hands-on guide for Java developers who want to build cloud-native microservices that actually work. Every command and code block in the book has been tested on a real machine. No fluff. No copy-paste errors.
You can find it here on Amazon: Practical Quarkus: From Zero to Native
But I am not here to just ask you to buy a book. I am here to give you something useful first.
π Your Free Chapter: "Why Quarkus?"
Since the first 10% of the book is free on Amazon as the "Look Inside" sample, I want to share exactly what you will learn in Chapter 1. It answers the most important question: "Should I even care about Quarkus?"
Here is a taste.
π Build Your First Quarkus Endpoint (In Under 10 Minutes)
This is the exact code from Chapter 1. You can run it on your laptop right now.
- Create a new Quarkus project using Maven:
mvn io.quarkus.platform:quarkus-maven-plugin:3.14.0:create \
-DprojectGroupId=org.example \
-DprojectArtifactId=code-with-quarkus \
-Dextensions=resteasy-reactive
cd code-with-quarkus
./mvnw quarkus:dev
*2. Add a REST endpoint:
*
Create the file src/main/java/org/example/GreetingResource.java:
`package org.example;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;
@path("/hello")
public class GreetingResource {
@GET
@Produces(MediaType.TEXT_PLAIN)
public String hello() {
return "Hello from Quarkus. Spring Boot took 3 seconds. I took 0.3.";
}
}`
3. See it works:
Open your browser to http://localhost:8080/hello
You will see the message: Hello from Quarkus. Spring Boot took 3 seconds. I took 0.3.
That is it. You just ran your first Quarkus app. The dev mode even supports hot reloadβchange the message and save the file, and it updates instantly. No restart.
Use Quarkus if... Stick with Spring Boot if...
Startup time under 1 second matters: Startup time doesn't matter (long-running servers)
Running on Lambda, Fargate, or Knative: Running on traditional EC2 or dedicated servers
Memory is expensive (< 200MB per pod): You have plenty of RAM (2GB+ per pod)
You want native compilation with GraalVM: You rely on heavy reflection or dynamic proxies
Building 20+ microservices: Building one monolithic application
*π What's Next in the Book?
*
If you found this useful, the book goes much further. The first four chapters (available now) cover:
Chapter 2: Full CRUD with PostgreSQL and Panache (20 lines of code)
Chapter 3: Validation and proper HTTP error handling (404, 400)
Chapter 4: Logging and configuration for dev/prod environments
The book is 31% complete. When you buy it now, you pay once and get all future chapters (including the one on native executables) for free.
π Get the Book & Code
Amazon (Live Now):[Practical Quarkus: From Zero to Native](https://www.amazon.com/dp/B0H2JR9DLD)
GitHub (All code examples): (github.com/unnivm/practical-quarkus)
*β Questions?
*
Ask me anything in the comments below. I will answer every one.
If you pick up the book, please leave a review on Amazon. It helps other Java developers find it.
Happy coding.
Top comments (0)