2
votes

I've recently taken a course in distributed computing where we learned about distributed algorithms for problems such as consensus, leader election, etc, and now I would like to implement some of them. These distributed algorithms are designed for a system where you have a bunch of independent processes: each one is running an instance of the given algorithm, and the processes can communicate with each other by sending messages (across the network). These messages contain some serialized data; "fancy" features like RPC aren't that interesting too me.

Are there any reasonably stable frameworks for implementing such message-passing kind of algorithms in higher level languages like Python, Haskell, Clojure etc.? (I'm aware of Cloud Haskell but it seems pretty alpha at this point.)

1
Cloud Haskell (haskell-distributed.github.io) is used in production by github.com/ps-labs - haroldcarr
For Erlang-style distributed computing there's also Erlang (erlang.org) which is very mature. For me, it's a little too easy to write bugs in Erlang since it's both impure and dynamically typed. - Cirdec

1 Answers

1
votes

Erlang is definitely the way to go. Sending messages is built directly into the language so you don't need to set up and learn any additional frameworks. I'm studying a Master in Distributed Systems and we had to implement many different algorithms in Erlang before going to Java or C with MPI.

The language is functional, with a Prolog-like syntax, which might be weird, if you know Prolog. Also it works without any problems on every platform (Windows, Linux, OS X)

The documentation on erlang.org (http://www.erlang.org/doc.html) is already very good, but if you want to have a short crash course in the syntax sugar, ... you can read a document from my supervisor: Erlang - functional programming in a concurrent world - it is a pdf with 37 slides. After that, you should be able to write your first application.