4 ms·
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?
by ian-g 6y ago
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?
- chadcmulligan 6y agoI 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.
- knicknic 6y agoThere are, but not with as many developers as JS. And because JS has so many developers it is better in some metrics.
- mb7733 6y agoI'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.
- mercer 6y agoAgreed. I still generally prefer Python/Ruby/Elixir over Node, but comparing it to C or .NET doesn't really make sense to me.
- kube-system 6y agoI 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.
- js4ever 6y agoBefore 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/ https://vms2.terasp.net/
- richajak 6y agoVisited 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?
- js4ever 6y agoI'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/CatchAll/appconfig.json https://github.com/elestio/cloudgate/blob/master/apps/CatchA... https://github.com/elestio/cloudgate/blob/master/apps/CatchAll/API/tests/simple.js https://github.com/elestio/cloudgate/blob/master/apps/CatchA... https://github.com/elestio/cloudgate/blob/master/apps/CatchAll/API/websocket/Chat.js https://github.com/elestio/cloudgate/blob/master/apps/CatchA...
- strken 6y agoI'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.