I have two noob questions:
1) Why is node.js running on the same thread? why not just use the process itself? OR What are the benefits of running it in a thread instead of a process?
2) What happens if the thread crashes in the process (I know that an exception without processing will cause the process to exit), but what happens if it is correctly caught? or with exceptions, such as floating point exceptions. will the process crash?
, , "" . Node.js .
Node.js , JavaScript, . . , concurrency, , .
, , , , , , , , . , , , , , .
- . . . Node.js .
, , . , - . , .
The disadvantage of transmitting messages is that it is slower than transmitting information through memory. The advantage is that you do not need to talk about the mutable state of objects in your memory and how to ensure that these objects do not become contradictory.