4 ms·
You're exactly right. Some examples: - Some common patterns. E.g. actor hierachy and supervision, circuit breaker. - Persistence. The actor persists its stat
by ackfoobar 4y ago
You're exactly right.
Some examples:
- Some common patterns. E.g. actor hierachy and supervision, circuit breaker.
- Persistence. The actor persists its state (changes) and can wake up from a sleep.
- Clustering. The actor can live in another node, and you interact with it using the same API.
- ackfoobar 4y agoWell I misread and couldn't edit now. What I meant is that you can launch a co/go-routine and have a channel that only it can read. That is like 70% the power of having an actor system. --- > an actor vs a queue with workers See the sibling comment. TLDR: Actors each has their own queue. The orderings in each queue are independent. This can help with parallelization if it fits the shape of the problem.
- imtringued 4y ago>What I meant is that you can launch a co/go-routine and have a channel that only it can read. That is like 70% the power of having an actor system. You can also iterate over an array in parallel and only modify the current element and that is like 70% of the power of having an actor system. "Structured concurrency is a programming paradigm aimed at improving the clarity, quality, and development time of a computer program by using a structured approach to concurrent programming." - Wikipedia