Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Actor Troupe, async asks and exception handling. #2
First of all, thanks for sharing the awesome package.
Three things threw me off a little although I am getting used to them.
One is the blocking nature of ask.
Second is Actor Troupe.
Third is Exception handling.
Thank you for the supportive feedback; it is always nice to know when people find Thespian to be useful.
To answer your specific questions:
Thanks again for the feedback, and feel free to follow up on any other questions or concerns; there is also a mailing list (info at http://thespianpy.com/#outline-container-sec-5) for discussions.
Thank you for the quick turn around and detailed explanations.
I think I understand although I will have to try things out more to get a full grasp on tell() + listen(). The use case we have is where the we have limited number of threads that serves user requests. If we have one thread waiting for each of the job served by the actors, we might run out of threads pretty quickly and start to block user requests.
I will be waiting for Actor Troupe. :) Currently I am creating a list of actors and sending messages to each in a round robin manner. (Where each actor is essentially copying a portion of a table)
Thanks for the pointer on PoisonMessage - this makes a lot of sense.
My apologies for the delay on handling this issue, but at this point I have uploaded a provisional implementation of the troupe functionality, with an example showing how it is used (https://github.com/godaddy/Thespian/tree/master/examples/fibtroupe).
This is provisional at this time because I would like to get feedback on the usefulness and possible changes needed before formally adding this to the supported Thespian implementation (with associated documentation). There were many possible approaches, but the current implementation (which is similar to the approach that parkx408 describes) seems to be a good balance of simplicity, functionality, flow-management, and ease-of-use. Please try it out and post any feedback you have.
Actor Troupe support is now officially part of the 3.4.0 release (https://github.com/godaddy/Thespian/releases/tag/thespian-3.4.0).