4 ms·
I feel woefully inadequate among present company, but nonetheless offer my 2 cents: There is a fundamental performance tradeoff between sequential vs concurren
by Floegipoky 7y ago
I feel woefully inadequate among present company, but nonetheless offer my 2 cents:
There is a fundamental performance tradeoff between sequential vs concurrent computation, because concurrency always requires some form of communication. Locks are difficult to reason about, but allow for shared resources. I've found the actor model to be so useful because it allows me to trade the ability to share resources for a more intuitive form of communication, message passing.
Regarding your 1st point:
Each actor is itself a sequential computer. You can't share an actor between threads any more than you could share a Turing Machine between threads. When designing actor systems I imagine a 1:1 mapping between threads and processors. The concurrency is happening in userspace.
Regarding your 2nd point:
It's my feeling that current actor model implementations are only suited to a narrow range of problems characterized by massive concurrency, a lack of shared state, and flexible time requirements. If any of those aspects are missing, I've learned to look elsewhere for a solution.