-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: multicast #10
Comments
Interesting idea... I'd like to take a little time to think through the implications and implementation of this. Thank you for the submission. |
I'm new to Thespian but having looked into ZeroMQ in the past I had similar thoughts. I found that the Troupe concept is quite similar though. With the grain of salt that I'm not familiar with the underlying architecture, it seems like either the Troupe or the specific |
I would like to learn more about the use case(s) for this functionality. At present, each Actor has an associated Address which uniquely identifies that Actor, and therefore the message sent is processed only once. This is still true for the Troupe scenario: the Address used externally is for the Troupe Leader, which in turn chooses only one of the workers to send the message to. Additionally, some of the transport implementations in Thespian attempt to ensure delivery of the message to the target Actor (asynchronously, and unbeknownst to the Actor itself) If I understand correctly, there is interest in creating a group of Actors and using a single
It may be that this use case is better served by a "Router" Actor rather than embedding the functionality into Thespian itself. As j3hyde pointed out, the Router implementation could be similar to the Troupe model, replicating messages to all children rather than to just a single idle worker. |
As I said in my original submission, the gain if having Thespian do it is having serialization overhead of O(1) instead of O(n). I don't think the group needs to be reified as a group, it'd just be nice to have an easy way to put the same message in all their inboxes. What that means copy-wise (n copies? Or one copy with n references?) Is probably up to the transport implementation. But even n copies is faster than n serializations. |
It would be nice if
.tell()/.send()/.ask()
accepted a list for the first arg (actorAddr), meaning to send copies of that message to all of the listed destinations. I believe there's a gain in having thespian do this instead of the user/actor doing it, because thespian can re-use the message serialization.The motivation for this was pondering the implementation of some pub/sub-ish functionality in thespian.
The text was updated successfully, but these errors were encountered: