4 ms·
> But something like "Pid ! Msg" where Pid is in the same OS process, different OS process or even different process on a different host half way across the wor
by ansible 15y ago
> But something like "Pid ! Msg" where Pid is in the same OS process, different OS process or even different process on a different host half way across the world, will become a new way to think about programming.
That's why I started learning more about ZeroMQ http://www.zeromq.org http://www.zeromq.org and structured my latest work project as multiple processes instead of multiple threads. Each process is single-threaded, and (at least so far) relatively easy to reason about.
- rdtsc 15y agoGood point. I forgot about 0MQ. Yeah not everyone will learn a new language but still want to build a distributed system. 0MQ is great for that. With Erlang, which was perhaps confusing from my post, the Pid identifies an "Erlang process". It is a very light weight unit of execution. One can have tens of thousands of them in a single OS process (which they call a node). However, if you don't need tens of thousands of processes, there is not reason why one couldn't structure their app using real OS processes and using 0QM.
- kayuri 15y agoFor anybody interested in the topic, I would also recommend to read Joe Armstrong's PhD thesis: http://www.sics.se/~joe/thesis/armstrong_thesis_2003.pdf http://www.sics.se/~joe/thesis/armstrong_thesis_2003.pdf It is a well written text on building reliable distributed systems in general, and Erlang in particular.