News for hackers. Stuff that matters.
Re:Have the Tables Turned on NoSQL? by ian-g on Friday January 15, 2021 @09:07PM (#25799246)
It might be a silly question, but when you say you're waiting for node.js to die, do you mean node specifically or server-side JS?
Re:Have the Tables Turned on NoSQL? by chadcmulligan on Friday January 15, 2021 @09:18PM (#25799323)
I think the only reason you'd use server side JS is you don't know C or C#. I'd be hard pressed to imagine someone who knows a number of server side environments and languages choosing JS as the solution - strong typing and performance are the obvious possible problems, then multi threading performance etc.

The only reason anyone uses JS is the browser constraint, remove that and there are a lot of better solutions.

Re:Have the Tables Turned on NoSQL? by strken on Saturday January 16, 2021 @03:24AM (#25800928)
I'd recommend using JS (or TypeScript) for a while to understand how Node.js performs before making comparisons like this, because it does surprisingly well under the kind of load most web or API servers see. The standard library and the package ecosystem use asynchronous IO for nearly everything, which makes multithreading almost irrelevant, and the V8 JavaScript engine is extremely fast.

.NET makes it harder to do asynchronous IO, but easier to do traditional multithreading. I'm hesitant to say whether I think the average server running on .NET performs better than the average server running on Node.js, but I'm confident the performance difference isn't as wide as you might believe, and Node.js might even have the advantage.

Re:Have the Tables Turned on NoSQL? by mb7733 on Saturday January 16, 2021 @12:54AM (#25800409)
I'm not going to stand here and say node is the end all be all of server side languages... but you really can't think of a reason that one might choose node over C for writing the back end of a web app?

I'll reverse it and ask: Why would you want to write an app to serve some CRUD API in C? This isn't and has never been a very popular choice.

Re:Have the Tables Turned on NoSQL? by mercer on Sunday January 17, 2021 @06:55AM (#25810018)
Agreed. I still generally prefer Python/Ruby/Elixir over Node, but comparing it to C or .NET doesn't really make sense to me.
Re:Have the Tables Turned on NoSQL? by kube-system on Saturday January 16, 2021 @01:04AM (#25800452)
I keep going back to JS (and TS) because I can build more in less time. I have little to no mental switching costs between front end and back end, I can share code directly between the two layers, and JSON is native.

I can always add type checking later when and where I need it. Sure, it isn’t high performance, but it is acceptable performance for most anything that the majority of people are doing.

Re:Have the Tables Turned on NoSQL? by js4ever on Saturday January 16, 2021 @01:25AM (#25800523)
Before switching to node 3 years ago I was using C# since 2004. Main reason to switch was npm vs nuget. Second reason was performance! Yes node is multithreaded and faster than C#. I was not able to go above 25k rps with C#, check where I am with Node here: https://vms2.terasp.net/
Re:Have the Tables Turned on NoSQL? by richajak on Saturday January 16, 2021 @11:00AM (#25803038)
Visited your github page. Still not sure, what makes yours faster than vanilla nodejs? do u use standard nodejs api or binding with code written in others? enlighten me :-) can i use it for standard json rest api?
Re:Have the Tables Turned on NoSQL? by js4ever on Sunday January 17, 2021 @01:55AM (#25808759)
I'm using uWebsocket C++ library in nodejs to make it a lot faster than vanilla nodejs. Of course you can use it to create REST API, but also websocket and even serve static files all in the same process.

Please check here: https://github.com/elestio/cloudgate/blob/master/apps/CatchA... https://github.com/elestio/cloudgate/blob/master/apps/CatchA... https://github.com/elestio/cloudgate/blob/master/apps/CatchA...

Re:Have the Tables Turned on NoSQL? by knicknic on Friday January 15, 2021 @10:00PM (#25799597)
There are, but not with as many developers as JS. And because JS has so many developers it is better in some metrics.