是否可以在 Erlang 中实现 Pregel 而无需超级步骤?
假设我们使用 Erlang 实现 Pregel 。为什么我们实际上需要超级步骤?仅将消息从一个主管发送到代表节点的进程不是更好吗?他们可以将计算函数应用到自己身上,互相发送消息,然后向主管发送“完成”消息。
Pregel 并发 Erlang 实现中超级步骤的全部目的是什么?
Let's say we implement Pregel with Erlang. Why do we actually need supersteps? Isn't it better to just send messages from one supervisor to processes that represent nodes? They could just apply the calculation function to themselves, send messages to each other and then send a 'done' message to the supervisor.
What is the whole purpose of supersteps in concurrent Erlang implementation of Pregel?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您在问题中指定的内容(关于主管向工作人员发送计算函数并等待“完成”)绝对可以实现(尽管我不认为与 OTP 打包的当前主管可以开箱即用地执行类似的操作),但我想SuperStep 的概念只是 Pregel 模型的一个要求。另一方面,如果您正在实现类似并行映射器的东西(就像乔在他的书中实现的那样),您将不需要超级步骤/
What you specified in your question (about superisors sending worker a calculation function and waiting for a "done") can definitely be implemented (although I dont think the current supervisor packaged with OTP can do stuff like that out of the box) but I guess the concept of a SuperStep is just a requirement of a Pregel model. If on the other hand, you were implementing something like a parallel mapper (like what Joe implements in his book) you wont need supersteps/