News for hackers. Stuff that matters.
Re:Concurrency Is Not Parallelism (2013) by rubiquity on Monday April 27, 2015 @10:40PM (#9450334)
Erlang has schedulers (one per CPU) that schedules when code gets run. If an Erlang process (Erlang's unit of computation/concurrency) is tied up doing IO, the scheduler simply jumps to another Erlang process. In Node.js you write out callbacks/promises/soup du jour that get run after some specified thing completes. In Erlang your code looks completely sequential.
Re:Concurrency Is Not Parallelism (2013) by dietrichepp on Tuesday April 28, 2015 @02:49AM (#9450795)
And on Node.js, whatever thing you run probably gets put into a bog-standard thread pool. So all that's really happening is that your IO requests are getting sent to a limited number of long-running threads. Run enough operations at the same time and you can tie up the thread pool, which most people don't even know exists. In some ways, it's the worst of both worlds: it has the limitations of a thread pool with the API complexity of a callback system.