Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Language preference is a big part of it these days - they're both well established (assuming Spring for Java) and can both likely do what you're asking of them.
Only other things I'd consider are library support (if you have any particularly niche libraries that may be more available in one language than another), and if for any reason you're planning on deploying it on a FaaS (serverless) style infrastructure, the high cold start time of Java may make that prohibitive. -
hack64145yIf you need performance choose java or golang. If you need performance with least cost of hardware choose golang. If you are experienced in js and dont care about performance choose node.
-
TobiSGD2815yNode is still single-threaded. So, if your backend does anything but pure CRUD I would not choose Node.
But then, since I don't like Javascript I wouldn't choose it anyway and rather use Go. -
Sumafu22425yGolang, but if I only have this two choices I‘d prefer Nodejs. Because Java is not nice and very slow in comparison.
-
mindev5365y@Sumafu while I also prefer JS, Java is actually faster. But yeah, Go seems like an awesome choice for almost anything web related.
-
@dUcKtYpEd Go is still too much of a niche, which makes it *horrendously* difficult and expensive to find & maintain a good development team.
-
mindev5365y@AlmondSauce yeah. But if you can find a job as Go dev, the pay can be amazing. Last month I had a job offer for someone woth 2 years of experience, paid the same as jobs for people with 6-7 in my country.
-
I've switched to node instead of java - i use graphql server to orchestrate all data mutations and querying with legacy backends. Works just fine and scaling is not a real problem , for more compute heavy workloads - build native node module with rust or c++.
-
mindev5365y@Coffe2Code it's a pretty fun language, low level so performance is really good. Thers more to it, but maybe someone else has more time than me now
-
muttley885yI can't say for node.js but Java is a crap solution.
Maybe it runs your destructors maybe it don't
Then the GC will kick in and dos your whole stack. -
hack64145y@Sumafu Java is slower than node? Are you serious? Did you see any benchmarks or tested them yourself? Because I tested them all (node, php, java, go, python) just for benchmarks and java was better than node because you know node is interpreted and java is kinda compiled (you know jvm thing).
-
hack64145y@dUcKtYpEd well, I tested with single db connection per request and node wasn't passing any compiled language (as expected). I didn't tested file i/o but I think most applications doesn't require file i/o. So my tests was pure request per second with single db query withouth any computation.
-
robsbobs315yI was a Java dev for years and Co-architected a multi service (microservice) platform in Java. I would chose node. Developing node is far faster because devs don't waste their time on making code overly typed with verbose generics and overly pretty patterns etc. These are fallacies which cost time especially in early days when requirements are fluid. In Node devs just think in flexible json. Json in json out. Free and fast. Java has a fairly hard scale ceiling and a memory hog. Both are good choices though.
-
@robsbobs yes that's a good point.
but I'm questioning the ability of nodejs to handle sofesticated systems and specially when devs make dirty changea on the last minute, would it be safe and sample to handle, or the messy hell is faster to come -
robsbobs315y@Coffe2Code The sophistication of a language doesn't mean it is better at handling sophisticated scenarios. I find web services don't get too complex anyway. If they do then break them up. Devs can make crap of anything without testing, review and direction. What are the skills of the team and senior devs at present. Take that into account obviously. Also look at how easy it is to attract talent
Related Rants
Java Or NodeJS for building stable and scalable backend API
question
spring?
nodejs
java