Closed thedrow closed 8 years ago
The solution in node to handle CPU-bound tasks is to scale using separate processes - not threads, which is how hypernova is designed to be used.
We are already using Node.js' cluster
module here to achieve the same goal.
I think that Hypernova isn't opinionated on your clustering architecture so you're free to skip out on using cluster
and instead implement something that uses threads-a-gogo
.
Thanks for sharing though :) It looks like you can probably use threads and skip out on using cluster AND vms since it seems like the code is also sandboxed. I'm not sure what the performance implications would be of using this sort of thing (is this faster than VMs or not?) but it looks interesting.
Rendering is a CPU bound task which might be problematic for Node js during spikes. We could use something like https://github.com/xk/node-threads-a-gogo to create a thread pool of workers that render React components to HTML and use the event loop just for I/O.