News for hackers. Stuff that matters.
Re:Ask HN: Why hasn't the JavaScript event loop model scaled... by idontwantthis on Monday November 18, 2024 @04:05PM (#42177030)
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.

Re:Ask HN: Why hasn't the JavaScript event loop model scaled... by wkyleg on Monday November 18, 2024 @04:23PM (#42177210)
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

Re:Ask HN: Why hasn't the JavaScript event loop model scaled... by idontwantthis on Monday November 18, 2024 @04:28PM (#42177254)
Can you point me to what you’re talking about in Deno? That’s really interesting.
Re:Ask HN: Why hasn't the JavaScript event loop model scaled... by wkyleg on Monday November 18, 2024 @04:33PM (#42177322)
Deno doesn't implements this differently, it's just an alternative server side run time. It has some better defaults compared to node though
Re:Ask HN: Why hasn't the JavaScript event loop model scaled... by idontwantthis on Monday November 18, 2024 @04:38PM (#42177377)
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.