Note that there are some explanatory texts on larger screens.

plurals
  1. POHow/why do functional languages (specifically Erlang) scale well?
    text
    copied!<p>I have been watching the growing visibility of functional programming languages and features for a while. I looked into them and didn't see the reason for the appeal. </p> <p>Then, recently I attended Kevin Smith's "Basics of Erlang" presentation at <a href="http://codemash.org/default.aspx" rel="noreferrer">Codemash</a>. </p> <p>I enjoyed the presentation and learned that a lot of the attributes of functional programming make it much easier to avoid threading/concurrency issues. I understand the lack of state and mutability makes it impossible for multiple threads to alter the same data, but Kevin said (if I understood correctly) all communication takes place through messages and the mesages are processed synchronously (again avoiding concurrency issues). </p> <p>But I have read that Erlang is used in highly scalable applications (the whole reason Ericsson created it in the first place). How can it be efficient handling thousands of requests per second if everything is handled as a synchronously processed message? Isn't that why we started moving towards asynchronous processing - so we can take advantage of running multiple threads of operation at the same time and achieve scalability? It seems like this architecture, while safer, is a step backwards in terms of scalability. What am I missing?</p> <p>I understand the creators of Erlang intentionally avoided supporting threading to avoid concurrency problems, but I thought multi-threading was necessary to achieve scalability. </p> <p><strong>How can functional programming languages be inherently thread-safe, yet still scale?</strong></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload