Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Might want to check out Cluster - http://learnboost.github.com/cluster/

(won't belabor the point about node/v8's architecture and multi-cores/systems)



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.


It 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.


Node's sweet spot is I/O bound tasks, not CPU bound tasks.


You 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.


Scalable 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.


Does anybody know if it's guaranteed to spread across your cores evenly (exactly one node proc on each core)? I skimmed the source but couldn't figure it out.


No. That's up to the OS.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: