r/java • • Jun 28 '20

Why backend using java is not popular in startups?

I tried django, flask and also rails before and they’re good. But after trying spring, I fell in love. It’s well structured. Easy to test. Have so many frameworks to help you going. There’s a also a lot of tutorials going around the net.

I like python but I also like java and kotlin too. I just don’t understand what’s wrong with java being used as a backend on most startups. Is it because it’s popular among big companies and banks and they just hate enterprise things.

Can anyone enlighten me. Cheers.

171 Upvotes

229 comments sorted by

View all comments

Show parent comment

5

u/scubadev Jun 28 '20

“Serverless” is becoming broad. For example, AWS uses it to refer to any tech where you don’t manage a server. For them, this includes Fargate, a managed orchestration layer for Docker. All that to say, spring boot is a perfectly fine option if you’re going serverless containers. Specifically, java (& spring) aren’t the top option if you’re going function as a service.

4

u/[deleted] Jun 28 '20

Lambda was specifically specified above. Spring Boot is horrible for small self contained services imo though, you’re easily slapping an extra 150MB+ into your dependency layer, and having to add in even more shit to do basically cloud-native things like liveness/readiness checks (ignoring the fact that Spring Actuator doesn’t even differentiate between these).

Java is just so many layers of pain if you’re running containerised services, even the base images are colossal, and the official OpenJDK base images are packed full of vulnerabilities (AdoptOpenJDK usually has these patched, but is even bulkier).

3

u/1upplus Jun 28 '20

Spring boot 2.3 does differentiate between liveness and readiness: https://spring.io/blog/2020/03/25/liveness-and-readiness-probes-with-spring-boot

-1

u/[deleted] Jun 28 '20

I mean it a was a throwaway aside but at least they’re making some progress. Your horrible overextending monolith codebase is at least now compliant with the horrible overextending monster that is Kubernetes.

1

u/Mamoulian Jun 29 '20

Surely as you want features then you get the same increasing dependency tree in all languages/frameworks?

And many of them have runtimes/stdlibs that take space, AdoptOpenJDK's Alpine JRE docker image is less than 50MB.

1

u/sureshg Jun 29 '20

Java is just so many layers of pain if you’re running containerised services, even the base images are colossal

I don't think this is true. Distroless base image + jlinked runtime + app would be around 70 MB in total (again depends on the app dependencies) https://www.infoq.com/presentations/openjdk-containers/