2 Star 0 Fork 0

mirrors_jsantell / 2013.cascadiajs.com

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
node-cluster-as-really-big-computer.md 1.58 KB
一键复制 编辑 原始数据 按行查看 历史
Neuman Vong 提交于 2013-08-12 18:22 . Programming Really Big Computers

#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 Processes which are automatically distributed across the cluster. Processes 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

neuman

Sr Software Engineer at Twitter, formerly at Twilio, board member at HIFY. Ideas man, Haskeller, a cynic with a bleeding heart.

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_jsantell/mirrors_jsantell_2013.cascadiajs.com.git
git@gitee.com:mirrors_jsantell/mirrors_jsantell_2013.cascadiajs.com.git
mirrors_jsantell
mirrors_jsantell_2013.cascadiajs.com
2013.cascadiajs.com
master

搜索帮助