# Actors for stateful work

When a task is the wrong shape: keeping an expensive object alive across many calls.

Source: https://university.eugo.io/videos/actors-for-stateful-work

---

- Level: Advanced
- Duration: 7m
- Topics: distributed-compute, sdk-api
- Status: not yet recorded — the transcript below covers the same material

## What this video covers

Tasks are stateless. Every call starts fresh, which is the right model most of the time. It is the wrong model when the setup is expensive (loading a large model or opening a connection) and you need it across many calls. Decorating a class instead of a function gives you an actor: a long-lived object on a specific node that holds its state between method calls. Construct it once, call methods on it many times.
