3 ms·
> The real beauty of Elixir/Erlang is being able to run hundreds of thousands of concurrent "threads" Erlang's units of concurrency are processes, not (green)
by rlander 9y ago
> The real beauty of Elixir/Erlang is being able to run hundreds of thousands of concurrent "threads"
Erlang's units of concurrency are processes, not (green) threads. Unlike threads, they are completely isolated from each other.
> (co-operative in userspace, not OS-level).
Erlang's scheduler is preemptive, which means it has the ability to context switch between tasks without cooperation at any time.
> etc... for dealing with concurrent processing. This is literally what Erlang was designed to do, and Elixir makes it user friendly.
What exactly is user unfriendly in Erlang's concurrency model? You only need to understand 3 concepts, spawn, receive and send in order to perform any concurrent task. I'm not familiar with Elixir, what does it do differently?
- jmcgough 9y agoElixir is a lot more readable for newbies (especially people with a Ruby background), which is what I assume they mean by "user friendly". Elixir also has some nice libraries as well... one I've been digging into recently is GenStage, which gives you a way to organize process communication sort of like a conveyor belt, except that processes request more work from producers, allowing you to build a system that isn't going to break down as processes get overwhelmed. Check out Jose's talk on it: https://www.youtube.com/watch?v=XPlXNUXmcgE https://www.youtube.com/watch?v=XPlXNUXmcgE