DELAPARRA
Index
Color
NL
Category: Programming paradigms

Actor

Explained by Updated

What is Actor?

Actor: An independent unit of computation with private state, a mailbox, and behaviour describing how it reacts to messages. An actor is an independent unit in a concurrent program. It has its own private state, a mailbox for incoming messages, and rules for how it reacts to each message. Nothing outside can touch its state directly.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about Actor

How is Actor used in practice?

Actors communicate only by sending messages. An actor can process one message at a time, update its own state, send messages to other actors, or create new ones.

What should you keep in mind with Actor?

Because no two actors share memory, many classic concurrency problems simply do not arise. There are no locks to forget and no data changed by two threads at once. Erlang and Elixir are built around this idea, as are Akka on the JVM and Microsoft Orleans. In PHP and JavaScript you rarely write actors directly, but queue workers that each handle one job at a time follow a similar way of thinking.

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.