编程语言选择实现分布式消息传递算法 [英] Programming language to choose for implementing distributed message passing algorithms
本文介绍了编程语言选择实现分布式消息传递算法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
基本上,我想实现以下算法,并分析如何使用这些算法构建的系统在不同的条件下运行。
Basically, I would want to implement the following algorithms and analyze how the system built using these algorithms behave under different conditions.
- Gossip协议
- 多个paxos
- 一致散列
我的兴趣在于这些算法。我基本上正在寻找一种编程语言,让我能够快速,深入地理解这些算法。
My interest here is in these algorithms. I basically am looking for a programming language that lets me write these algorithms quickly and deeply understand these algorithms.
我应该选择哪种语言?
Java,Scala,Erlang或其他任何东西。
Which language should I choose? Java, Scala, Erlang or anything else.
目前,我知道Java和C ++。
Currently, I know Java and C++.
推荐答案
您可以尝试在Erlang中实现协议。
You could try implementing the protocols in Erlang.
- 进程通信非常优雅语言和虚拟机。异步消息在两个执行过程之间传递,无论是在同一个VM中还是跨虚拟机在语义上相等。
- 在erlang中,对于算法的容错方面/重试逻辑等进行编码是一件轻而易举的事情。将所有内容封装到轻量级进程中,并使用称为主管的特殊进程来重新启动它们。
- 序列化Erlang对象非常简单。您不必显式地编码序列化逻辑(例如在Java中实现Serializable)。
- Erlang发行版附带一个名为 rpc ,它允许您调用远程虚拟机上的功能。
- Elrang shell是一个真正的上帝发送。您可以将shell附加到任何远程VM。外壳允许您配置内部表/数据结构。 VM还具有非常复杂的调试和跟踪功能,可通过shell提供。
- 您可以查看 Riak ,开源以Erlang编写的NoSQL数据存储模拟在亚马逊的Dynamo上。它实现了一致的哈希和八卦协议。
- 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.
这篇关于编程语言选择实现分布式消息传递算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文