What is the difference between actor model and fan...
# coroutines
a
What is the difference between actor model and fan out from the guide? https://github.com/Kotlin/kotlinx.coroutines/blob/master/docs/channels.md#fan-out
o
actor
is the opposite direction, right? it receives objects, instead of sending them
a
Right - so the actors == worker coroutines from fan out model?
o
sort of, but there's only one of them -- you can't add more
r
I'd say actor is an opposite to fan-out in a sense that it can be used as a fan-in -- you send messages to it asynchronously, from different contexts, and it processes them serially.
It's basically a channel with a coroutine consuming from it attached.