#Programming a Node Cluster Like It's One Really Big Computer
##Abstract
Distributed programming is a lot easier if the abstraction makes the cluster look just like a really big computer.
I'll talk a little bit about some concepts from Cloud Haskell (and Erlang and
Akka), and how they might look ported over to Node. The main idea is to be able
to spawn many Process
es which are automatically distributed across the
cluster. Process
es communicate via message passing, inspired by Erlang's
"actor model".
One point of focus is serialization and transmission of function closures. For
example, given a function add
var add = function(x) {
return function(y) {
return x + y + 1
}
}
We should be able to partially apply it and transmit it elsewhere to have its second argument applied, then have the result returned back to us.
spawnRemote(add(1), function(err, result) {
if (err) throw err
console.log("Result computed remotely: ", result)
})
Serialization of a function closure is possible by serializing its environment (i.e. the bindings of its free variables) and a representation of its code.
##Speaker Bio
Sr Software Engineer at Twitter, formerly at Twilio, board member at HIFY. Ideas man, Haskeller, a cynic with a bleeding heart.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。