4 ms·
The stuff you were saying about forking, IPC... it made me giggle because I just wrote a midterm on these concepts last night :) Thanks. Erlang seems interest
by ziikutv 12y ago
The stuff you were saying about forking, IPC... it made me giggle because I just wrote a midterm on these concepts last night :)
Thanks.
Erlang seems interesting, would you mind expanding on Erlang or GO?
- rubiquity 12y agoEverything in Erlang is asynchronous and non-blocking but this is almost completely transparent to the programmer. When you start an instance of the Erlang VM it spawns as many threads as you have CPUs and a thread for an event loop. Each thread can have thousands of Erlang processes (Erlang's unit of concurrency is called a process) executing. Inside of the thread is an Erlang scheduler that allocates execution time to each Erlang process using a technique known as reduction counting. Erlang also has great features for distribution. Communicating with processes that live in another Erlang VM node is also transparent. It's debated whether this is a good thing or not because some people think communicating over the network shouldn't be transparent due to partitioning, but in a lot of Erlang programer's experiences this is a wonderful feature. The result of all of this is that the Erlang code you write looks synchronous but is executing concurrently. You have both CPU concurrency and IO concurrency. The Erlang VM takes care of most of the nasty bits of asynchronous code, which is what a good language run time does for you.