Hacker News new | ask | show | jobs
by idontwantthis 584 days ago
I think if you want that, JavaScript isn’t the right tool. The single threaded simplicity is a big part of why it is a useful tool. You can always spin up external processes from within your app, or use a load balancer or queue to share work with multiple identical processes.

The idea of just horizontally scaling up a node process wouldn’t make a lot of sense. How would you share scope between the different processes for example? You would need a whole new construct, at which point you’re really throwing away the advantages you had and you should probably be using a different language.

1 comments

Agreed, I realize it would need to be effectively another language, or at least a very different implementation.

This isn't to far off from what new projects like Deno and Bun are doing though, apart from also needing to spread the event loop implementation horizontally

Can you point me to what you’re talking about in Deno? That’s really interesting.
Deno doesn't implements this differently, it's just an alternative server side run time. It has some better defaults compared to node though
Oh I thought you meant they were working on horizontal scaling. I think this is very far off from what they are doing. It’s still Javascript, and you can take for granted that it follows the Ecmascript spec even if its runtime is different.