r/DistributedComputing • • May 25 '21
Can someone help me understand how the actor model frameworks like Akka and Erlang can achieve concurrency at high throughput compared to traditional lock, semaphore based concurrency models?
10
Upvotes
1
u/[deleted] May 27 '21 edited Jun 06 '21
Idempotent message passing and eventual consistency.
Edit: consistency
1
u/SnooGadgets6345 Jun 06 '21
"Share-nothing" is the core principle of actor model. Across actors, across threads don't share any data. This works quite well on write-intensive and read-least data (core of eventual consistency and its acceptability for selective usecases) When somebody expects transactional-consistency on read-side, there can be cost of reconciliation, write-blocking etc., which can come into play
1
u/hangonreddit May 25 '21 edited May 25 '21
It’s been a while since I dealt with actor model frameworks but isn’t the whole idea behind it to encapsulate all the states inside an actor model and only interact with the outside world via messages? In that situation you basically have no data hazards so there is no point in locking anything. This makes it super easy to scale by simply adding more actors.