7 ms·
Thanks for the link. I guess I'm trying to figure out why there's so much excitement about a server that is not designed to spread the workload to multiple cor
by va_coder 15y ago
Thanks for the link.
I guess I'm trying to figure out why there's so much excitement about a server that is not designed to spread the workload to multiple cores for you.
- kevindication 15y agoScalable networking doesn't require multiple cores, just good use of the select/poll mechanisms at your disposal (well, and bandwidth). If you've got a CPU bound problem, you might farm that out to something else.
- mcantelon 15y agoIt doesn't do everything, but it's exciting for a number of reasons. 1) Javascript is a nice, powerful language. It's easy to find JS programmers. Bonus: you can share code between the server and browser. 2) Node provides a clean slate for server-side web dev: fresh, largely asynchronous libraries delivered via a well-designed package manager (npm) that I don't cry when I have to use. 3) It's an accessible way to program asynchronous server-side TCP/IP applications. Socket.io (WebSocket sever with multiple transports to fallback to) is an example of why this is useful. The lack of interprocess communication that would help parallelize tasks between cores is the one thing that's lacking. AFAIK there are plans to address this (although given Erlang's maturity it will likely still be superior for this use-case) but even without that Node is very, very useful to many people right now.
- ianl 15y agoYou can just start up X instances of your server for X cores. This way you have completely independent processes running and maintain data independence without getting bogged down with synchronization and other messy issues.
- simonw 15y agoNode's sweet spot is I/O bound tasks, not CPU bound tasks.