sending message to multiple actors

53 views
Skip to first unread message

ARNAB CHANDA

unread,
May 10, 2021, 8:21:43 AM5/10/21
to thespian.py
hello experts,

(I am fairly new to thespian, but have considerable working knowledge on akka.)

I am trying to send a message from an actor to all available actors in a system.
is there a way to programmatically determine the available actors for this operation, from the running actor system, similar to an akka send to all functionality?

I saw the earlier post on "broadcast", and I was hoping someone can kindly share some more details.

thanks in advance.

Kevin Quick

unread,
May 10, 2021, 11:50:46 AM5/10/21
to ARNAB CHANDA, thespian.py
Hi Arnab,

Thespian does not have an anonymous broadcast capability.  To send a message to an actor requires knowledge of the actor's address, which must be passed to the actor or obtained as the result of a self.createActor() call; an actor does not have knowledge of anonymous actors it has not obtained the address of.

The best recommendation would be to make a "Broadcaster" actor that receives and remembers the address of all actors (via explicit messaging on creation) and can then be asked to send a message to all registered actors.

Regards,
  Kevin



--
You received this message because you are subscribed to the Google Groups "thespian.py" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thespianpy+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thespianpy/333c5c59-d0b2-4150-af0f-fecf2e1bfba4n%40googlegroups.com.


--
-KQ

ARNAB CHANDA

unread,
May 10, 2021, 12:58:26 PM5/10/21
to thespian.py
Kevin,

Thank you so much for the kind and quick response. I'll pursue this.

Best.
Arnab

Erdem Eser Ekinci

unread,
May 16, 2021, 3:23:59 AM5/16/21
to thespian.py
Hi all, 

I've implemented the suggested middleman pattern for broadcasting. 
However, the middleman can't send messages that are more than a dozen. Is there a limitation to send message in an actor?

Best. 

Kevin Quick

unread,
May 17, 2021, 1:02:43 AM5/17/21
to Erdem Eser Ekinci, thespian.py
There is a flow control limit that will place an actor into transmit-only mode until the pending transmits are below a threshold, but that limit is around 1000 queued packets.  It's not entirely clear from your message where you are running into the limit, but if you can modify Arnab's sample configuration to reproduce your issue it would help me to understand what might be happening.

Regards,
  Kevin




--
-KQ
Reply all
Reply to author
Forward
0 new messages