[1] https://github.com/kriskowal/q [2] https://github.com/substack/stream-handbook
[1] https://github.com/kriskowal/q [2] https://github.com/substack/stream-handbook
Instead of just communicating across threads to do some async busy work, you now have to communicate across processes... along with heartbeat monitoring of those processes and endless debate over which IPC mechanism to use.
All taking away threads does is eliminate high-value optimization strategies that are available to multi-machine scalable systems that do support threads.
Threads don't dictate shared mutable state as a programming paradigm, they simply make it possible to avoid crossing expensive network and process boundaries where appropriate.
There's nothing stopping you from architecting thread-based architectures to use low-cost in-core dispatch of message within a VM, and save the high-cost serialization, IPC/network overhead for off-machine message dispatch.
And how expensive is expensive?
All of them, always. It's either expensive in terms of resource cost (requiring serialization and complex local IPC overhead), or expensive in terms of complexity (requiring shared memory and inter-process coordination).
And with that I see you are operating in the Node bubble, where "threads" will forever be stuck in 1995.
It isn't 1995 anymore.