Erlang / Erlang Basics Interview questions
What is the actor model in Erlang?
The actor model treats every concurrent unit as an actor: an isolated entity that has its own state, receives messages one at a time from a mailbox, and reacts by updating its own state, sending messages to other actors, or spawning new ones. Erlang's process model is a direct, production-grade implementation of this idea.
Three properties make it work in practice:
- Isolation — no shared mutable state between actors
- Asynchronous messaging — sends never block the sender
- Location transparency — sending to a PID looks the same whether the actor is local or on another node
Because there's no shared memory to lock, there are no mutexes or deadlocks between actors — the classic concurrency bugs of thread-and-lock programming simply don't apply at this level.
More Related questions...