Programming language to choose for implementing distributed message passing algorithms

拥有回忆 提交于 2019-12-03 14:21:52

You could try implementing the protocols in Erlang.

  • Process communication is very elegantly baked into the language and VM. Asynchronous message passing between two elrang process whether in the same VM or across VMs in semantically equivalent.
  • Coding in the fault tolerance aspects / retry logic etc. of the algorithm is a breeze in erlang. Encapsulate everything into light weight processes and use special processes called supervisors to restart them.
  • Serializing Erlang objects are really simple. You dont have to explicitly code your Serialization logic (such as implementing Serializable in Java).
  • The Erlang distribution comes with a module called rpc which lets you invoke functions on remote VMs.
  • The Elrang shell is a real god send. You can attach a shell to any remote VM. The shell lets you profile internal tables/data structures. The VM has also extremely sophisticated debugging and tracing features which is available to you via the shell.
  • You can take a look at Riak, an open source NoSQL datastore written in Erlang modelled on Amazon's Dynamo. It implements both Consistent Hashing and the Gossip protocol.

Oh yes ! you can start Programming Erlang by looking at these:

  1. Learn You some Erlang for great good
  2. Erlang Book Part 1
  3. Orielly's Erlang Programming Text Book (Francesco Cezarini and Simon Thompson)
  4. Joe Armstrong's Programming Erlang Text Book

Those links above will provide you with resources to all the Erlang programming you may need. I however suggest that you begin with Joe Armstrongs Programming Erlang Text Book, and as you read it, use the website: Learn you some erlang for great good (reference No. 1 above) as a reference for further understanding the data structures.

You can download Erlang from here: Erlang Download official Page.

You may need other links and resources (applications, libraries e.t.c.), most of which are indexed here: Erlang/OTP .com website.

Occasionally, you can always ask any question on Stackoverflow here, or you can search for tools and libraries from sourceforge.

All of those protocols was already implemented in various Erlang projects. See Mnesia, Riak, CouchDB, Scalaris for more details (not all protocols in each project). I can't imagine more friendly environment for this kind of protocol experiments than Erlang.

Have you decided about your message passing library? If you are interested in MPI, both java and C++ editions of it are available.

MPI performs lots of jobs for you, such as broadcasting a message and retrieving the replies, which is essential in your algorithms. As a result, I recommend you to find a proper version of MPI for C++ or Java and kick off the work.

Take a look at:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!