![](https://s.togetter.com/static/web/img/placeholder.gif)
お互い譲り合い、助け合いが大事だよね……! 二人で生きていくこと(マルチプロセス)の問題を考える。 #nodefest #nodefestB
![](https://s.togetter.com/static/web/img/placeholder.gif)
そうだよなー,プロセスモデルだと全部スケジューリングがビジネスロジックから隠れるけど,JSだと場合によっては(setImmediate/nextTickなどで) ビジネスロジックに入り込んでくるからなぁ #nodefestB
2016-11-13 17:01:23![](https://s.togetter.com/static/web/img/placeholder.gif)
setInterval,setTimeout ,setImmediateを利用した明示的な処理時間の移譲 #nodefest #nodefestB
2016-11-13 17:01:32![](https://s.togetter.com/static/web/img/placeholder.gif)
昔は Windows もコオペレーティブ(ノンプリエンプティブ)マルチタスクという仕組みで動いてましてね…w #nodefestB
2016-11-13 17:02:04![](https://s.togetter.com/static/web/img/placeholder.gif)
nextTick/setImmediateだけでは対応しきれない場合にマルチスレッディングを使う #nodefestB
2016-11-13 17:03:07![](https://s.togetter.com/static/web/img/placeholder.gif)
1つのには限界がある→マルチスレッドプログラミングを使う(Workerを使う) #nodefest #nodefestB
2016-11-13 17:03:13![](https://s.togetter.com/static/web/img/placeholder.gif)
乖離性ミリオンアーサーのPC版、UnityのWebGLエクスポートだと思ってたけど、JSで自前で書き直したって意味だろうか。 #nodefest #nodefestB
2016-11-13 17:03:15![](https://s.togetter.com/static/web/img/placeholder.gif)
ServiceWorkerがbrowser/Server間でinterceptionすると考えればOK。#nodefest
2016-11-13 17:03:41![](https://s.togetter.com/static/web/img/placeholder.gif)
web worker ではスレッド間のデータの受け渡しはコピー #nodefest #nodefestB
2016-11-13 17:05:53![](https://s.togetter.com/static/web/img/placeholder.gif)
node.jsの場合はシングルスレッドモデルだから,スレッドがなくてサブプロセスなんだよな.だからこういう事が起きる. #nodefestB
2016-11-13 17:06:27![](https://s.togetter.com/static/web/img/placeholder.gif)
workerスレッドとメインスレッドでのオブジェクト共有はコピーなので、メモリが勿体無いし、つらい。 #nodefestB
2016-11-13 17:06:39![](https://s.togetter.com/static/web/img/placeholder.gif)
メッセージを通じて渡されるオブジェクトはコピーされる。コピーはコンピューターにとって負荷が高い。メモリの圧迫、GCが走ったり、 #nodefest #nodefestB
2016-11-13 17:06:48