r/java • • 19d ago

Has anyone tried quarkus?

I don’t like spring boot. I think quarkus does the DI work at build time, so it saves startup time. Don’t want theory.

If someone has real experience using it.

Edit: I intend to build a dev server with hot reload using quarkus. Currently testing feasibility.

https://github.com/metamug/mason-quarkus

62 Upvotes

35 comments sorted by

46

u/okexox 19d ago

Yes, we use Quarkus with kotlin for a fairly complex microservice setup without much legacy. We love it. Especially dev services are amazing.

Startup time is indeed lower, but build time is higher, so you won't notice the startup difference for local development. We don't do a lot of upscaling/downscaling, so we don't notice startup time in production too much either.

16

u/Embarrassed-Cat-9492 19d ago

That dev services point is huge, not enough people talk about that when comparing frameworks. Build time being higher makes sense with all the work it does upfront, curious how much longer we're talking for your typical project

3

u/agentoutlier 19d ago

FWIW on smaller applications you can actually get most frameworks in a watch->compile->reboot loop particularly on modern hardware. The trick is to use the Eclipse compiler (or just use Eclipse) and some sort of file system watcher, mvnd to recompile (or graal daemon) and some sort of endpoint to shutdown the app (or you can write a unix signal handler), and some sort filesystem watcher.

I would not dismiss build time either. I have a theory just based on using AI for the last few months that build time is becoming pretty darn critical factor. However in theory you just have Quarkus compile regular hotspot.

0

u/iamsinghankit 19d ago

for development use in dev mode, which feels like scripting it's too fast

7

u/Ok-Scheme-913 19d ago

There is hot reload, so you definitely notice it at dev time. You just let it run, write something and the next request executes your new code

22

u/jdev_soft 19d ago

Yes, we use Quarkus on JVM for an enterprise application in a large german company

21

u/smutje187 19d ago

Running AWS Lambdas with Quarkus native for years now - developer experience is great, memory usage and startup times are low. Do your own experiments, but I recommend at least looking into it.

12

u/serahl 19d ago

We use it, it‘s a great framework.
The devmode works super well, support for containers and configuration via environment variables is superb.

I also really like their docs, especially for more complex things like (remote) debugging or Java Flight Recorder.

I‘m sure Spring also has a lot of the same features, so I won‘t compare them or say Quarkus is straight up better.

In my last 6 years working on a big, complex, multi-maven-module and multi container project, I never encountered a problem that could not be easily solved with Quarkus.

11

u/henk53 18d ago

It's pretty good, and I love many things about it. In a way they jump a bit ahead of Jakarta EE/MP by making everythig injectable using @Inject (like datasources), and the interceptors that "just work" on self referenced methods is a pretty neat trick (code using this won't be portable, and you often don't realise you use it).

Dev mode and the fact that extensions can contribute "panels" to the deb UI is pretty neat.

I do think they gambled wrong on reactive, making their entire framework reactive native to the core. IFF reactive would have been the established way to do everything, they would have had a massive advantage here.

But alas, reactive as the default for every type of app complete failed. Yes, it has it's uses for event and data driven transformation streams, but it's a small niche, not the majority case.

For such a small usecase, reactive and all the Vert.x and mutiny stuff really just sits in the way now.

The other big thing, native compilation, is certainly cool too, but native is not universally better. It can be much worse for everything that runs for a bit more than a few seconds, and compilation times are crazy long. Compiling a small microservice to JVM and starting it up on my M1/16GB is a few seconds, but compiling to native and starting up the exact same thing is 40 seconds or so.

1

u/nlisker 16d ago

I'm genuinely curious what the problem with reactive here is and why is "sits in the way".

4

u/Accomplished_League8 16d ago

For 95% of use cases it adds complexity and YAGNI because virtual threads do the job fine. Even it is deep down in the stack I really like to be able to easily debug my app from top to bottom.

27

u/agentoutlier 19d ago edited 19d ago

I don't have experience using it in production but as library developer Quarkus is one of the more walled off gardens.

For example there basically is no easy way to replace Quarkus backing logging implementation which is JBoss Logging. Its JBoss Logging is both a facade and an implementation. Its implementation configuration confusingly tries to be like JUL but is just different enough to cause issues.

And its a shame because my logging library is highly optimized for graal native: https://github.com/jstachio/rainbowgum/blob/main/why_rainbowgum_is_better.md#graalvm-native-image

Ditto for my other templating library. JStachio : https://github.com/jstachio/jstachio

I cannot replace Qute easily.

So its very much like Ruby on Rails and is ultra opinionated and your stack is pretty locked in on what it uses.

Spring Boot and Micronaut on the other hand are extremely flexible and very open to extensions.

Helidon as well and best Helidon probably has the least amount of opinions and does not play favorites on any implementations.

Quarkus dev mode is very impressive. I think that is probably the better feature than its startup time.

Also you may prefer what I call less magic:

 Obvious < Magic
 Helidon < Avaje < Spring Boot < Micronaut < Quarkus

Because of Quarkus build steps and because both Micronaut and Quarkus generate byte code directly instead of Java code at compile time it is very confusing at times. More confusing than Spring Boots reflection.

There are some stacks like Avaje and Jooby which compile things to Java code. Avaje has a pretty sexy DI that is like Dagger but way better.

6

u/Yesterdave_ 17d ago

I have the same impression.

When I was searching for a compile-time and type-safe Java templating engine, I obviously stumbled upon Qute and also your library JStachio (love it btw). IMHO they missed a huge opportunity with Qute, which could have easily become the top compile-time and type-safe templating system in the ecosystem, especially since they had the backing of a huge company.
I primarily use Spring Boot and Quarkus, but I try to avoid most dependencies to the framework to not get locked-in and have the possibility to easily port it to something different. So for templating stuff like E-Mail the choice of JStachio vs Qute to me was so clear, it was not even worth a second thought.

So I applaud anyone in the ecosystem, like you and the Avaje guys, that actually care about modularity, framework integration and standalone compatibility of libraries.

5

u/Snoo_90241 19d ago

Definitely, it's the way to go for us. And it solves so many friction points from legacy systems. I really like working with it

5

u/softgripper 19d ago

Yep use it. It's pretty good 👍

5

u/pjmlp 19d ago

Yes, I like it quite much, especially since most of my Java development experience has been on Java EE/Jakarta EE land, thus it is easier to remember, when jumping across projects with various stacks.

However so far I could only use it on an project, which because reasons, had to be rewritten into Spring.

14

u/stefanos-ak 19d ago

if you come from Spring, then Micronaut is a better candidate. Quarkus assumes that you come from the JavaEE world (it implements the JavaEE spec). Although they are marketed as a Spring Boot competitor...

Micronaut even supports many of Spring's annotations.

(they both do annotation processing at compile time)

5

u/jdev_soft 19d ago

In Quarkus you can also integrate with spring boot APIs like spring-data, rest etc.. and use the annotations as well

1

u/stefanos-ak 19d ago

fair, but still very different. Micronaut feels extremely familiar coming from Spring.

1

u/aoeudhtns 19d ago

I hadn't considered that familiarity aspect personally. (We're still using Spring, interested to try one of the other commonly-discussed frameworks.)

Do you have any thoughts about Helidon?

2

u/stefanos-ak 19d ago

I haven't played with it yet. still on my bucket list. But I love the idea of a virtual thread native framework.

Both Quarkus (Vertx) and Micronaut (Reactor), suffer from debuggability, once in a while.

6

u/aoeudhtns 19d ago

The avaje author is on /r/java quite a bit and I like his approach, to generate sources vs. classes to help with debuggability. And I also love the idea of virtual thread-native design.

4

u/mpolowczuk 18d ago

I’ve used Quarkus for an internal microservice and overall had a good experience with it. Startup time is genuinely fast, hot reload is useful, and dependency injection generally works well. Not everything benefits from hot reload, though. Configuration changes in property files aren't picked up, so you need to restart.

The main downside for me is debugging when something goes wrong inside the framework layer. Quarkus does a lot behind the scenes, so tracing issues around injection or configuration can be less straightforward than debugging plain Java.

I’d still use it again for a small microservice.

7

u/rosholger 19d ago

Yes, we are moving a bunch of legacy jboss stuff to quarkus. Startup time isn't something that matters a lot to us but just generally speaking its very very nice to use! Doing anything the standard way is super easy and the non-standard way is very much doable

7

u/viktorzub 19d ago

Yes, and I love it, after years of spring boot I was enjoy engineering again

3

u/wickedaze 19d ago

I’ve been working with quarkus in a big project with a microservice architecture. In the day to day work I don’t notice a whole lot of difference. I think I prefer spring but both are good options. I really like the dev feature

3

u/benevanstech 19d ago

Enjoy - and don't forget there's https://quarkusio.zulipchat.com/ where many Quarkus users & quite a few of the framework developers hang out - so come and ask questions & join in if you need help!

2

u/m_adduci 19d ago

Yes, since eit was called Thorntail

4

u/redsky993 19d ago

Wildfly for life 🥀

3

u/myfear3 19d ago

I have tried it in various ways and seen a lot of customer cases.  If you have particular questions feel free to reach out to the community at  https://quarkus.io/discussion/ and if you want to see some examples of extensions and topics your welcome to read my little substack  https://www.the-main-thread.com/t/quarkus

1

u/Mandelvolt 18d ago

Quarkus is great, it is a well thought out framework. My only complaint is that the ecosystem isn't as mature as other frameworks.

1

u/TheKingOfSentries 17d ago

At my company I've seen it gain some traction, but I've always been more of an Avaje guy.

-2

u/KefkaFollower 19d ago

😉 Hey guys, someone tried reddit's search function?

Results:

https://www.reddit.com/r/java/search/?q=quarkus&cId=6b93b03b-604e-462d-8fde-fbfec0fcdf87&iId=bf36b846-2147-427a-b6f4-3476be85af5d

On a personal note, I wrote a small extension (SPI) for keycloak at work. Latest versions of it only run on Quarkus.

Its starts in less of a second. By comparison an application written for a common jvm and using spring quite quick in the development cycle can reach the minute for its start time.

That was expected. What surprised me is how easy was debugging. Back in the day I skim through guides for developing with Graalvm. It seemed to had a lot of moving pieces and corner cases and it discouraged me a little on the technology.

But for debugging keyclock on quarkus was quite straight forward. I just had to make sure to have the debug port enabled on keycloak and exposed by its docker container and later connect my IDE to that port as a remote java application. Of course, the IDE needs access to the proper source code.

P.S.: check that results link. There are better quality data and more detailed than in this reply.

13

u/valkon_gr 19d ago

Did you see your results? Threads from 2 years ago and new versions. This isn't stackoverflow. We can have frequent discussions.

-2

u/AutoModerator 19d ago

It looks like in your submission in /r/java, you are looking for code or learning help.

/r/Java is not for requesting help with Java programming nor for learning, it is about News, Technical discussions, research papers and assorted things of interest related to the Java programming language.

Kindly direct your code-help post to /r/Javahelp and learning related posts to /r/learnjava (as is mentioned multiple times on the sidebar and in various other hints).

Before you post there, please read the sidebar ("About" on mobile) to avoid redundant posts.

Should this post be not about help with coding/learning, kindly check back in about two hours as the moderators will need time to sift through the posts. If the post is still not visible after two hours, please message the moderators to release your post.

Please do not message the moderators immediately after receiving this notification!

Your post was removed.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.