8 ms·
Quarkus 1.8.1 – Kubernetes native Java framework
- cfontes 6y agoI am currently using it for a pesonal project and so far it's been great. Expect from a few quirks here and there with new integrations and the fact that I hate hibernate and there is no other option for persistance, it's great. Super fast reload, easy to implement, good developer tools.
- happyweasel 6y agoWhat are the advantages to ... let's say ... Spring Boot?
- barrkel 6y agoBetter integration with k8s, mainly through more opinionated libraries (you're less likely to accidentally choose heavyweight thing which tend your service towards monolith), faster startup & faster reloads during development. https://github.com/spring-projects/spring-framework/issues/20906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel https://github.com/spring-projects/spring-framework/issues/2... is an open issue for Spring; the moral equivalent is closed for Quarkus. If you have DI misconfiguration, you tend to get it at build time rather than runtime.
- soco 6y agoThe equivalent would be actually Spring GraalVM Native. Not bad either but somehow for me it didn't work, so I started with Quarkus and didn't look back.
- acg62 6y agoJust about to put a substantial project into production using Quarkus. I would say the main advantages vs SB are: * mostly uses standard javax/Jakarta/Eclipse etc APIs so code is relatively portable (in ~600 classes I found 8 quarkus imports) * build time DI/weaving * best dev-mode autoreloading I have seen * in general, less Spring-y * less reliance on classpath-searching and reflection voodoo, less weird shit breaking bc of dependency version conflicts * stack traces and class names (https://gist.github.com/thom-nic/2c74ed4075569da0f80b https://gist.github.com/thom-nic/2c74ed4075569da0f80b) that fit within a human’s field of vision * less overriding feeling of death by OOP We started with Spring Boot, switched about halfway through and never looked back.
- pjmlp 6y ago> mostly uses standard javax/Jakarta/Eclipse etc APIs This is the selling point for me, never was a Spring fan.
- davnicwil 6y agoA little bit of a tangent but just out of curiosity, what would be your preferred option for persistence?
- vips7L 6y agoJPA is just starting to show it's years. The standard hasn't kept up. For me personally, I'd like to see something like EntityFramework, but in Java. No annotation hell, linq queries are amazing too. I know a lot of people are moving to just using jOOQ as well.
- thom 6y agoThis is interesting to me because on the whole I feel like I was doing way more interesting things in Hibernate 15 years ago than I see people doing with ORMs today (batching, dictionaries with entity keys, custom type serializers etc). Linq is lovely of course but I’m intrigued to hear what other ways you feel the industry has moved on in this area.
- vips7L 6y agoUpserting, typesafe queries instead of raw strings, disconnecting my domain model from jpa, disconnecting my domain model from validation etc. It's also really difficult to use an EntityManager outside of a JEE/Spring/framework container. They're not thread safe and you have to manage their lifetimes manually.
- gwittel 6y agoNot the OP, but I generally prefer JDBI for persistence in Java. Much less random glue/boilerplate vs Hibernate. It doesn't seem to have an official Quarkus integration, but you can just pull it in like any other dependency.
- cmckn 6y agoSame, I just write my own SQL and row mappers. It's not a huge deal, and then I actually know what the schema looks like (and why queries are slow ;). Hibernate has way too much magic going on under the covers. I have loved Dropwizard in the past, which encourages the use of Liquibase. Not right for every project, but it was great when it fit.
- dang 6y agoWe changed the URL from https://quarkus.io/blog/quarkus-1-8-1-final-released/ https://quarkus.io/blog/quarkus-1-8-1-final-released/ to the project home page because the project seems not to have had a significant discussion on HN before.
- blinkingled 6y agoI don't really get the need for GraalVM and especially native image part of it. JVMs now a days (incl. OpenJ9) start up fast enough on modern hardware anyways. Going through the complexity of native image generation seems like a solution in search of a problem. I am sure you lose functionality with native image as well - reflection etc. [Edit: I get the point about GraalVM itself just not the native image in the context of kubernetes. With GraalVM maybe they want to optimize better, allow various other languages to run on the JVM etc. None of that is Kuberenetes specific - not much of a memory or startup speed benefit unless I am missing something.]
- Thaxll 6y agoWell probably because no one wants to run Kubernetes sidecar with 256MB of memory because the JVM is memory hungry.
- twic 6y agoGraal doesn't reduce you application's memory requirement. If it needs 256 MB if JIT compiled, it will need 256 MB if AOT compiled.
- thu2111 6y agoActually it does. Native images use about half as much memory or less. Dynamic linking, reflection and speculative JIT compilation are expensive features, memory wise. But you get it back in runtime performance, where native images are slower.
- gunnarmorling 6y agoNot quite; AOT-compiled, your app won't need the JIT infrastructure, less memory needed for class metadata, etc. In addition, Quarkus pulls many things to build time, which classic frameworks do at runtime, e.g. processing XML metadata descriptors. This means again less classes need to be loaded (or even present) at runtime, as e.g. the XML parser classes won't be part of the native image at all. Also see the numbers on quarkus.io, e.g. 28 MB vs. 145 MB RSS for a REST + CRUD app as native binary vs. HotSpot. Disclaimer: working at Red Hat, contributing to Quarkus a bit.
- ram_rar 6y agoJust curious, have they done any comparisons with golang?
- sheeshkebab 6y agoNo self respecting java developer would use a language that doesn’t provide @magicannotations or use <> for generics.
- jacques_chester 6y agoGo is the language that taught me to be grateful for Java.
- geodel 6y agoIndeed. Considering I am upgrading a dozen or applications from Spring Boot 1.x to 2.x. A thousand line stack trace for wrong file permission is so much fun than lame single line Go errors.
- aww_dang 6y agoBlame Spring, not Java.
- winrid 6y agoPick a giant framework, you get giant stack traces.
- andor 6y agoYes, sometimes they are long, but stack traces are also extremely useful. They show exactly where an error happened, and from where the offending code was called. Something you only notice when you're working in a language that doesn't provide them - single line error messages are often not unique enough. They are also easily parseable and you can filter them to exclude framework code.
- deleted 6y ago[deleted]
- vips7L 6y agoHere are some performance tests comparing Quarkus to Python, Spring, and Payara (JEE) https://github.com/rmh78/quarkus-performance https://github.com/rmh78/quarkus-performance
- jacques_chester 6y agoThis is impressive work, thankyou. Do you know when you might add a GraalVM Native version of the Spring examples?
- vips7L 6y agoThis is not me sorry. Just something I found.
- ralala 6y agoIt's a bit unfair to compare with synchronous python. Better: FastAPI, aiohttp, Quart,....
- vips7L 6y agoBut then shouldn't we also do non-blocking Java? Vert.x, webflux, akka-http? I also didn't make the bench marks.
- funcDropShadow 6y agoAt first glance, this benchmarks seem way to short to for JIT-compiled JVMs to reach steady state. I suspect the high cpu-usage comes from the jit compiler and decreased cache effectivity. I've seen JVMs needing 20 minutes to reach a steady state under load. But then, they've inlined your log configuration throughout the code, quite impressive, imho.
- vips7L 6y agoI THINK the author meant it to show time to first request (startup) and how fast you can handle X requests from start, due to Quarkus being focused on k8s/lambda. I personally prefer the JIT over native compilation.
- jacques_chester 6y agoWhat's the definition of "Kubernetes native?" Disclosure: I work for VMware, which sponsors Spring, but I don't work on Spring itself.
- brown9-2 6y agoIt seems to mean “comes with tools for deploying to Kubernetes”, which is really a stretch: Quarkus comes with a toolchain enabling developers from live reload all the way down to deploying a Kubernetes application
- yannikyeo 6y agoMy guess it meant build for Kubernetes first, born for Kubernetes, like native Americans. I also take Cloud native to meant the same, build for Cloud first. I could be wrong.
- The_rationalist 6y agoQuarkus and micronaut really should merge, they have the same goals but yet they fragment the ecosystem because of NIH syndrome. If they cumulated their human resources spring would get a real strong contender
- scns 6y agoLet a thousa.d flowers bloom
- ohnoesjmr 6y agoWhat is this actually? FaaS for java via k8s? Read the landing page, still no clue...
- hardwaresofton 6y agoIt's basically Spring Boot with first-order support for running in the modern cloud -- so fast boot times, integration/extension with common patterns and technologies. I actually thought the landing page was informative -- the code snippet and boot-time comparisons should give it away. Not used to seeing this kind of energy from java land but it is refreshing. I'm still not going to pick java for any project ever again since better options exist IMO but this looks cool.
- pm90 6y agoJava has a reputation for being difficult to work with. But I’ve come to like it for business apps. The IDE support (eg intelliJ) is insanely good. However the build system is terrible and there seems to be a lot of magic compared to the simplicity of eg Golang. For personal projects I continue to prefer golang. For enterprise apps, I think Java still has a lot of potential.
- hardwaresofton 6y agoI agree -- I end up choosing things that larger enterprises wouldn't pick because most of my projects are specs of dust in comparison. What do you think about the angle of Go having a lot of potential (I honestly think it might replace java for large enterprises in 10-20 years?) because it's built for developer fungibility? If there's one things enterprises want to do, it's reduce the cost of employing resources, and employees are one resource that gets a lot cheaper when codebases are easier to pop in and out of, and you don't need a Java Spring MVC expert, but rather a golang dev fresh out of a coding bootcamp (or whatever actually good shorter-term switch-to-tech education trends come out in the future).
- pm90 6y ago
- hardwaresofton 6y agoGetting started guide to Quarkus: https://quarkus.io/guides/getting-started https://quarkus.io/guides/getting-started Wonderfully simple -- I always liked JAX-RS (and in particular Jersey) for it's simplicity.
- throwaway894345 6y agoAs someone who has worked extensively with containers but not with Java, what does this do to support Kubernetes? Is this just about making the runtime Docker friendly?
- deleted 6y ago[deleted]
- Traubenfuchs 6y agoThe JRE already is Docker aware and Docker friendly in regards to CPU and memory limits. And since Java 10 (March 2018), you do not need to manually configure anything for it to be that way.
- throwaway894345 6y agoSo any idea about what this does or why it talks about OpenJDK and GraalVM? Are those not alternative runtimes?
- Traubenfuchs 6y agoOthers already explained it better than I can but here I go: This is simply a new web framework (like Spring or vertx). The exciting thing about it is that it is using GraalVM / AOT magic and starts up very fast. Drawback is it requires custom libraries for stuff like Hibernate.
- victor106 6y agoOne of the big(only?) difference between Spring boot and Quarkas is native image using GraalVM. Spring Boot will also support Graal https://spring.io/blog/2020/04/09/spring-graalvm-native-0-6-0-released https://spring.io/blog/2020/04/09/spring-graalvm-native-0-6-...
- forcemajeure 6y agoWhen both are running on the JVM, there still appears to be a significant performance difference, so it should be interesting to compare after the port... https://github.com/rmh78/quarkus-performance https://github.com/rmh78/quarkus-performance
- blntechie 6y agoWe recently started building small function based REST endpoints for Lambda in Java using Quarkus. Spring Boot with JVM was slow to cold boot and its native image generation is still way behind. Quarkus provides like 60% of Spring Boot’s features and ease of doing things with bundled option to generate native image which was a win-win for us. I’m actually jumping the gun here as none of our apps are in production now but it has been a good experience to work with Quarkus so far. But one might raise a question whether you need to go through all this pain for Java in Lambda and instead use something faster already - NodeJS or Python or even Go.
- pjmlp 6y agoPerformance right from the start regarding nodejs, Python and Go, not being stuck with Java 1.0 regarding Go.
- inkeddeveloper 6y agoI know from my experience that my employer's ecosystem is entirely built around having java applications. We moved to kube and that has eased a bit; however, we're all java developers. I attempted to push the bounds of our "use the best tool for the job" policy and worked in dotnet for awhile and I was hit with a lot of pushback. First off was using spring cloud config and trying to figure out steeltoe for my application, but I powered through it. Then came getting support for a new build process with our build agents and pipelines. Just constant pushback on everything. And then there was the review process. It was hard to get PRs done because no one cared to look over "the dotnet" project. I say all that to say that moving to Go or nodeJs isn't easy because it requires a lot of personnel work to get there, for enterprises at least. They have invested a lot into having Java apps and moving to a new stack requires proving out that the investment for the move will outperform the current investment and then some.
- blntechie 6y agoCompletely agree with this. I worked on dotnet for 12 years and still do. It’s my first go to if I have to build a quick project. But my team is all Java developers and we decided to go with Java and Spring Boot few years back for all our microservices. Now that we are using Lambda a lot, the SpringBoot is long in the tooth when it comes to cold boot times and our path differed on which way to go. I built few Python + Flask functions which have cold boot time of less than a second when equivalent with Java and SpringBoot would take 8-9s. But team was not comfortable with Python. We still have few functions running in Python which are the most stablest and fastest of functions we are running in prod. We dabbled with NodeJS + Express which no one in the team liked to work on. So when it was decided that it was going to be Java, we took alternative frameworks to Spring Boot like Quarkus and Micronaut more seriously and went with Quarkus as that seemed to be the one close enough to Spring Boot in terms of familiarity and features.
- stevefan1999 6y agoIf you want a small, fast and one file, cloud native experience with familiarity to modern OOP languages like C++/C#/Java, why don't we start evaluating D?
- InTheArena 6y agoBecause it’s almost impossible to find people who can maintain it or add to code written in it. Job on the other hand has 25 years of being the top language for enterprise development. For something to replace it it Hass to be orders of magnitude better.
- pjmlp 6y agoBecause it is a tiny community and D still lacks many of the libraries and tooling that those communities have gotten in the last 40 - 25 years.
- stevefan1999 6y agoThen why shouldn't we starting to terraform it? It's a catch-22 this way
- pjmlp 6y agoBecause tango vs phobos was already damage enough, and Python 2/3 is a lesson in terraforming. Slow and steady does win some races.
- justicezyx 6y agoWhat features makes Quarkus "Kubernetes Native"? I read through the get started guide, and could not figure out those features.
- wiradikusuma 6y agoFor anyone with Quarkus experience: What's the purpose of Extensions? https://code.quarkus.io/ https://code.quarkus.io/ Don't Java folks have Gradle/Maven already? What's the difference between Quarkus' Hibernate Validator vs its vanilla version?
- acg62 6y agoThey generally have enhancements to push initialisation to build-time and/or make them native image compatible.
- gunnarmorling 6y agoExactly that. E.g. in case of Hibernate ORM, the corresponding Quarkus extension will take care of having the persistence.xml being parsed at build time, registering entity properties for reflection in native binaries, making sure all needed resources are added to native binaries, etc. They also curate the right set of matching (transitive) dependencies for each library, you just need to add the Hibernate ORM Quarkus extension, without having to think too much about versioning. Also they integrate different APIs: e.g. when having the Kafka Streams extension and the MicroProfile Metrics one, you'll automatically get metrics for your streaming pipeline. Disclaimer: Working for Red Hat, contributing to Quarkus a bit (Kafka Streams and Debezium outbox pattern extensions).
- Traubenfuchs 6y agoThe url you posted leads to a generator for a maven / gradle project. It essentially gives you a hello world quarkus project, including Dockerfiles, mavens pom.xml, etc. You can quickly select often used dependencies / libraries you want to have included. They are put in the maven / gradle dependency lists of the project you are creating. That makes it faster to start a new application. Are you confused by the wording extension here? They use it synonymously with dependency / library, in this case, maven/gradle dependencies. They are probably extensions in the sense that those dependencies / libraries are useless without quarkus. Spring provides the same: https://start.spring.io/ https://start.spring.io/
- hyperman1 6y agoWe recently migrated some code to quarkus. My experience: The good: * The quality is there. If they claim it is supported, it works. It gives reasonable error messages, etc.. * The documentation is very good, which makes the onboarding experience nice. Give a java dev the site, and they are up and running on their own in minimal time. * The support on their zulip chat is also very good. People are both friendly and have deep knowledge. Most questions are answered in an hour. * The development speed is fast. If you file a bug report, it might appear in the next version a week later The bad: * If you have (enterprise) stuff that's not yet supported, you'll suffer. The oracle jdbc database driver cost us graalvm. soap took a lot of time to get working. * cloud integration is a bit too magic for its own good. Quarkus tries to hide complexity by generating config files, executing openshift and docker commands, etc.. But if anything goes wrong, it is hard to find out what it tried to do and how it failed. The options in application.properties are only half-documented and it is hard to map them to the corresponding options of the underlying tools. Error messages are out of context. I ended up debugging maven and reading the source code. All in all, I am convinced it is a good tool. It has both an open source feel and enterprise class support, combining best of both world.
- jdelimiter 6y agoI haven't seen any discussion on GraalVM AOT and licenses. What does it mean for the classpath exception and LGPL libraries?