4 ms·
Kubernetes might follow the sad path of spring. Perfect, complete and too complex. For big and great applications, spring if the obvious choice. It makes incr
by motoboi 6y ago
Kubernetes might follow the sad path of spring.
Perfect, complete and too complex.
For big and great applications, spring if the obvious choice. It makes incredible complex and difficult things easy.
But, unfortunately, makes simple and quick applications incredible complex and difficult.
- karmakaze 6y agoYou can't be talking of Spring Framework!? That's a 2000's solution (in particular Hibernate) trying to stay relevant.
- mixedCase 6y agoI don't disagree with your conclusion. But your comment communicates no argument against Spring and how the trade-offs it makes make it a poor option for new projects.
- karmakaze 6y agoAnyone with sufficient experience with JPQL and Hibernate will realize their limits and how poorly it works in the latency sensitive transactions we want now. Spring and Hibernate were designed to cache domain 'entities' and manage their dirty state client-side as an optimization. Any time you go want to go near the EntityManager you're hitting this impedance mismatch.
- johnnycerberus 6y agoWhat's the alternative?
- karmakaze 6y agoSeveral are mentioned in comments of this thread. Search results show too many old ones. As a short-list sampling, a Micronaut SQL guide[0] lists the following: JDBC Hibernate JAsync SQL jOOQ Jdbi Reactive MySQL Client Reactive Postgres Client I myself chose JDBI for more recent projects using Java/Kotlin. [0] https://micronaut-projects.github.io/micronaut-sql/latest/guide/ https://micronaut-projects.github.io/micronaut-sql/latest/gu...
- artwr 6y agoAsking to learn, but if you were to start a Java application in the following two scenarios: 1) Monolith with some CRUD, API, persistence to a DB + search. 2) Scalable backend with an API, persistence to a DB + some caching what would you use these days?
- karmakaze 6y agoNot in any particular order (choose what fits your team): Kotlin or Java and a lighter framework (e.g. Javalin is to Spring as Sinatra is to Rails, with JDBI), a newer big framework (e.g. Micronaut, maybe Play, others), Phoenix/Elixir, Rails/Ruby+Sorbet, Go with libraries. Edit: I just did a google search for "Java Framework" and get a lot of useless top-N lists with old content retitled "in 2020" with hits like: Hibernate (not a framework), JSF (JavaServer Faces), GWT (Google Web Toolkit), Struts (The Later Version), DropWizard (seems to have stagnated and docs are all over the place. JDBI was extracted and has a life of its own).
- johnnycerberus 6y agoCmon, you can't be serious, do you really recommend Play, Micronaut, etc. over Spring ecosystem? Also if you want the benefits of GraalVM you can stay in the ecosystem today with Spring Native, moreover if you are ideologically against Spring then you should go with Quarkus because that's the next technology by maturity/popularity. How can you not go with Spring when REST services are today a solved problem? Why do you want to turn it into a problem by adopting something else that is not battle tested? In the company that I work for, Spring is ruling the microservices layer and we have a combination of Scala and Python for data pipelines that are not related to the behavior of the business logic, they only know one thing and that is data. Hibernate has not been a problem for us, I can say that I totally recommend it when you have multiple people working on a project, rather than polluting the codebase with raw SQL. If you really want something exotic in Scala that is impossible to express in Java, Go, Ruby, Elixir etc., then take a look at the Typelevel (cats, cats-effect, http4s, doobie) ecosystem or ZIO. If purely functional programming is your cup of tea.
- 6y ago
- motoboi 6y agoSorry, I meant "was the obvious choice". But the sad path is exactly that. Great solution. Too complex. Oblivion.
- humbleMouse 6y agoThe hate against spring on hacker news is so ridiculous. Spring boot is one of the easiest lowest boilerplate ways to build anything, period. Especially if you use a type dynamic language on top, like groovy or kotlin or whatever.
- johnnycerberus 6y agoSome people are just masochistic or they just want to distract themselves by solving problems that have already been solved by Spring circa 10 years ago. Most of them don't even use the technology that they preach around here, it's borderline trolling.