6 ms·
We 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 im
by blntechie 6y ago
We 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.
- thu2111 6y agoJava starts fast, and NodeJS uses the same sorts of techniques as HoSpot does. What you're doing here is comparing apples (large web frameworks) with oranges (languages). If you used a framework written in the same way as Spring Boot with Python, it'd also be very slow to start up.
- dragonwriter 6y ago> What you're doing here is comparing apples (large web frameworks) with oranges (languages). If you used a framework written in the same way as Spring Boot with Python, it'd also be very slow to start up. OTOH, there's at least an argument that the structure and features of languages influence the kind of frameworks that people tend to use with them. They are distinct but not necessarily causally-unrelated elements of the community/ecosystem around a language
- blntechie 6y agoNodeJS + Express starts faster than Java + Spring Boot and Java + Quarkus JVM.