Re:One Year After Switching from Java to Go: Our Experiences
by gf000 on Wednesday February 19, 2025 @08:05AM
(#43101688)
Most projects won't stay a hello-world REST service, there would be no point of doing them. They will grow and most likely make use of a bunch of CRUD features, on which we have a lots of experience in various languages and frameworks can solve a good chunk of any problem that might come up (AuthN/Z, session management, endpoints, safe parsing from and to json/url/forms, etc).
Spring (besides itself being modular, so you only "pay" for what you use) will solve all of that for me, so I only have to write the small amount of business-relevant code and be on my way. Later on, some other developer who knows spring can join the project and feel ready at home.
Compare it to a buggy, slow to develop, slow to onramp home-grown half-solution, and it's quite a clear tradeoff, unless there are very specific requirements that make the usage of frameworks a no-go.
Re:One Year After Switching from Java to Go: Our Experiences
by okeuro49 on Wednesday February 19, 2025 @08:03AM
(#43101656)
> In Java, people will pull in a 300MB+ mega-framework for a hello-world REST service. Oh and another 200MB for ORM. Another 250MB+ for nailpolish, etc.
I just now used https://start.spring.io/ to generate a project using Spring web, Spring security and Spring data JPA (Hibernate).
It generated a JAR that is 52MB.
Re:One Year After Switching from Java to Go: Our Experiences
by lenkite on Wednesday February 19, 2025 @08:12AM
(#43101762)
Thanks - I haven't used the Spring Generator for several years now. However, I think one also needs to include the drivers, oauth stuff, template libraries, etc to get an accurate represention of "standard Java enterprise size". Gonna play with this offline and see how good it has got.
Re:One Year After Switching from Java to Go: Our Experiences
by gf000 on Wednesday February 19, 2025 @08:17AM
(#43101807)
You might want to check the native spring native plugin as well, which can AOT compile the whole thing to a single binary (thanks to Graal).
Re:One Year After Switching from Java to Go: Our Experiences
by ivan_gammel on Wednesday February 19, 2025 @08:41AM
(#43102041)
A real monolithic app dealing with videostreaming that I have been working recently, was based on Spring Boot and AWS SDK and it was a 82 Mb jar file. It had the drivers, oauth stuff, a couple of template engines for business reasons (Handlebars and Thymeleaf), database and queue drivers etc. It could be maintained and extended by a junior developer, because it had established design patterns and they only needed to follow some project conventions. We had multiple releases per week at engineering cost of less than 25k€ per year.
I would not be able to build something like that with that budget on Go.
In Java, people will pull in a 100MB+ mega-framework for a hello-world REST service. Oh and another 50MB for ORM. Another 25MB+ for nailpolish, etc.
The extreme difference in basic developer culture causes visible differences in performance outcomes. Can't even blame the JVM - it is a superb beast that is overloaded by Java developers putting Mount Everest atop it.