DELAPARRA
Index
Color
NL
Category: Programming paradigms

Actor Model

Explained by Updated

What is Actor Model?

Actor Model: Each actor is an isolated unit with its own private state and a mailbox. Actors never call each other's methods or touch shared memory — they only send messages, which sidesteps most race-condition and locking problems by design. The actor model is a way of structuring concurrent systems as many small, isolated actors that only talk through messages. Each actor has private state and a mailbox, and handles messages one at a time.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about Actor Model

How is Actor Model used in practice?

The main benefit is safety. Shared memory between threads is the source of most race conditions and deadlocks. Actors avoid it entirely, so you reason about one actor at a time instead of every possible interleaving.

What should you keep in mind with Actor Model?

It also scales well across machines, because sending a message to a local actor looks the same as sending one over the network. That is why telecom systems and chat platforms use it. The trade-off is that message-based flows are harder to follow than direct function calls, and you need good logging and tracing to see what happened and in which order.

At a glance

CategoryProgramming paradigms
Explained by
Updated

More Programming paradigms terms

All terms starting with A

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.