Actors communicate with each other by sending and receiving messages.
pulsar.async.mailbox module implements the message passing layer
via a bidirectional socket connections between the
Message sending is asynchronous and safe, the message is guaranteed to eventually reach the recipient, provided that the recipient exists.
The implementation details are outlined below:
from pulsar import send async def example(): result = await send('abc', 'ping')
TcpServeraccepting connections from remote actors.
When an actor sends a message to another actor, the arbiter mailbox behaves as a proxy server by routing the message to the targeted actor.
Communication is bidirectional and there is only one connection between the arbiter and any given actor.
Messages are encoded and decoded using the unmasked websocket protocol implemented in
If, for some reasons, the connection between an actor and the arbiter get broken, the actor will eventually stop running and garbaged collected.
For the curious this is how the internal protocol is implemented