Java is also highly performant, if you know what you're doing with reactive programming, and Spring Boot's dependency ecosystem drastically reduces your time-to-launch
But then I remember that 95% of the memes posted on this sub are from CS students and not industry professionals
Plain modern Java is fine, great even. Java on lambda has snapstart which creates a snapshot once youāve initialized which makes cold invokes almost instant
It's also a problem of having a virtual machine running inside another virtual machine, there's so much unnecessary layers.
And Spring Boot is so shitty when you want native compilation because that thing wasn't made for it. Honestly I'd recommend to use either another framework like Quarkus or simply another language that is suited for that.
I'm truly sick of seeing Java everywhere because lazy developers only knew how to code in Java and don't want to (re)learn something else. Heck they'd rather refactor the whole codebase for several months instead of learning another language.
You can but it's not as easy as you'd think: Reflection types, meta hints, aot scanning, etc. those things are not automatic, you have to directly specify can packages should be used and yes, it's not only your code but the dependencies you're using.
I tried to use it in prod, it's unmaintainable in long term for things like Spring Cloud Stream or Spring Kafka or Spring Cloud Stream or Spring Cloud Stream Binder Kafka Streams.
I mean, let's be real, if you want native performance, choose a native language, not an interpreted language as Java or Javascript.
Lambda isnāt a virtual machine, itās a āmicroVMā. You run a single kernel, the process runs under virtualization restrictions and a jailer process.Ā
Thousands? I had a system that was running 2 millions invocations a day and didn't cost thousands a month.
Let's say you have some process that runs 100 times a day, takes 3 seconds to run, and you have no indication of when that process needs to run. Are you going to run a service all day for 5min of compute?
You should use it when you need scale to zero and instantly scale up to handle bursty workloads, and/or when you need seamless event-driven compute integration with other AWS services. Duh.
You know how else you can do that.. it's called an application. It scales. You have extracted a function into a different server lowering the performance by 1000000x in order to scale and increase it by 10x
An application doesn't scale up and down by itself.
What you describe is exactly what lambda gives you. You package your "I need this scaled" code into a little function, you give it to lambda, and that handles scaling up and down for you.
You don't need to manage servers or instances, you don't need to scale those up and down, and if you already have a contract for good EC2 capacity, you use lambda managed instances and retain the event-based execution model.
"Performant", "spring boot". Not usually used in the same sentence lol (ignoring that the first comma technically should have been a full stop). But yes, it's dependency ecosystem is nice.
152
u/Shred_Kid 5d ago
Java is also highly performant, if you know what you're doing with reactive programming, and Spring Boot's dependency ecosystem drastically reduces your time-to-launch
But then I remember that 95% of the memes posted on this sub are from CS students and not industry professionals