News for hackers. Stuff that matters.
Re:Rich Hickey: STMs vs Locks [2008] by rdtsc on Wednesday November 30, 2011 @08:38PM (#3297847)
The awesome thing is that for Erlang it doesn't matter. The two are the same. Here how to send a message a local process on the same node:

    Pid ! Msg.
And here is how to send a message to a Pid located on some server farm in Japan:

    Pid ! Msg.
In general CPUs are probably not going to get faster. Networks might, both on LANs and WAN. There is the 100Gb Ethernet, optical interconnects I think will become cheaper.

On the motherboard # of cores will be increases but at some point, while we get the hang of concurrency and restructure our codebase, we'll quickly get hungry for more cores and memory than a single server can support.

What happens then Erlang program won't have to be restructured when that happens because it provides a suitable abstraction. At the lowest level it will still be Pid ! Msg. That is the beauty of it.

Re:Rich Hickey: STMs vs Locks [2008] by philwelch on Thursday December 01, 2011 @06:16AM (#3299274)
Yes, I know. And from an abstraction level, it's really cool that it works that way. But when you are operating on the same node, asynchronous message passing is sometimes an awkward and less performant solution. It's strictly weaker than synchronous message passing, which means you never have any assurance that the other process received your message. Message passing can also be less performant than properly protected usage of shared memory, which transactional memory allows.

Erlang's popularity for concurrent programming probably comes down to the fact that anything is better than manually managed locks and until recently there weren't any widely-used industrial languages that used synchronous message passing or transactional memory. I don't think it's any coincidence, though, that the designers of more recent concurrent languages like Go and Clojure have not followed the Erlang model.