Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why are they using multiple processes rather than multiple worker threads? IPC is much costlier than using shared memory, even if it's just passing the initial state.


Multiprocess is going to be more robust against failures, for one. While it is a bit of an apples-to-oranges comparison, I thought Chrome had shown pretty conclusively the benefits of adoption multi-process over multi-threaded


I don't think there is a browser that uses a full thread-per-tab model, so there's really nothing to compare it against. The problem with other browsers is that slow JS or in some cases flash in one tab will slow down other tabs.

Also, the tabs in a browser running many sites are much closer to traditional use of processes. Web application servers running the same codebase on each request seem like a better fit for threads. For one thing, the security model for the two uses of JS are very different.

As for robustness, if doing X will cause a crash and your code does X, then you will just have a bunch of crashing processes rather than just one. How is that better? Wouldn't the real solution be to either stop doing X or fix X so that it doesn't cause a crash?


<i>As for robustness, if doing X will cause a crash and your code does X, then you will just have a bunch of crashing processes rather than just one. How is that better? Wouldn't the real solution be to either stop doing X or fix X so that it doesn't cause a crash?</i>

Sure, but bug-free code doesn't exist and not all crashes happen 100% of the time. If you have a difficult to track down crash bug that happens for some mysterious reason once every 100,000 requests... Would you rather have that resulting in the entire server blowing up or one request-session blowing up?


I'm not sure, but I believe V8 is (or was?) not thread safe. Even web workers in Chrome get their own processes.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: