> Erlang processes are not green threads. Green threads can share memory while Erlang processes cannot, they are strictly forbidden to do it.
So message passing is the only way to communicate between proccesses? I guess that makes sense with elixir being a fp language. This was not clear in the article:
> Lunatic takes the same approach as Go, Erlang and the earlier implementation of Rust based on green threads.
> So message passing is the only way to communicate between proccesses?
There are escape hatches. Obviously, you can do something really heavy like open a network port or open a file descriptor, but it also provides you with use ets, which is basically "really fast redis for intra-vm stuff" and you can transact over shared memory if you drop down to FFI.
Basically only message passing. As another poited out, you can use FFI calls and Erlang Term Storage, possibly some other means to communicate, but the central feature is that each process has an ID, and then you send() a message to it.
each process also has a receive() block where you essentially listen to everything that ends up in your mailbox and pattern match on it to take action.
So message passing is the only way to communicate between proccesses? I guess that makes sense with elixir being a fp language. This was not clear in the article:
> Lunatic takes the same approach as Go, Erlang and the earlier implementation of Rust based on green threads.