3 ms·
The thing I dislike about message passing vs async/await is that it makes it easy to understand each individual process (that send and receive messages), but ha
by justsomeuser 6y ago
The thing I dislike about message passing vs async/await is that it makes it easy to understand each individual process (that send and receive messages), but harder to understand the whole system.
Assuming your CPU load fits on a single thread, a single threaded event loop with async/await seems easier to understand the whole system because:
- Using functions to compose computations keeps the connection between functions at both write time in your IDE (jump to def), and production time with stack traces.
- With message passing systems, you only get the stack trace from when you received the message.
- Having a single thread means you are not sharing memory between threads.
- You can combine results using Promise combinators, which form an await tree.