Go is perhaps the simplest language to learn there is. It's almost impossible to not get it to work because it has so few things you can actually do.
And nodejs only preforms well in hello world benchmarks, real world applications are nothing like that. Once you start having to manipulate large arrays or do any large amount of math nodejs preformance goes into the dumpster.
> Once you start having to manipulate large arrays or do any large amount of math nodejs preformance goes into the dumpster.
We’re talking about web applications, no? You probably shouldn’t be manipulating large arrays or doing large amounts of math directly in your web application server. That should be isolated in some type of service or worker, which could be written in another language. Or maybe there’s a NumPy-like package for Node.js, I haven’t looked.
The question then is where do you draw that line of using another language? It probably depends on your application, but I think Node.js is perfectly suitable for typical web applications backends.
Can you give an example? I just think that no matter what programming language or framework you're using, if you are querying for giant arrays through an ORM and passing them through an API result to a web app, it's going to be slow.
There are other kinds of solutions for this problem like breaking up the data into chunks and only returning the necessary data. Maybe it's a DB optimization where you can add indexes. Or caching the result of your ORM query.
I've never seen any web app written with any tech that was snappy while making requests for large amounts of data and waiting for it to come back in one big honkin array.
> Web apps deal with fairly big data structures, if nothing due to orms.
Perhaps due to using ORMs unnecessarily and/or inefficiently and failing to drop down to SQL when needed.
It's hard to think about an example, this is very application specific. But there are background jobs and that's where a big array could be manipulated
Probably still need to stream or chunk the data instead of dealing with giant arrays to get decent performance. That's not a language/platform issue.
I recently had to process and aggregate metrics for 5 million rows of user data (a few GBs) on my MacBook with Node.js. By streaming / iterating over the items without loading them all at once it chewed through them all in a few seconds. ¯\_(ツ)_/¯ And it's single-threaded (except for I/O offloaded to threads -- I'm talking about the calculations).
And nodejs only preforms well in hello world benchmarks, real world applications are nothing like that. Once you start having to manipulate large arrays or do any large amount of math nodejs preformance goes into the dumpster.