-
Notifications
You must be signed in to change notification settings - Fork 119
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
Actor subscribe to event stream #66
Comments
@noahsilverman Do you mean that you want the event stream to be available on every actor magically, without subscribing to it first? |
@anthdm Not magically. I Just thought it would be nice if there was an easy (or direct) way for any actor to subscribe or publish to eventStream. When I've built actor-based systems in Erlang, I always had some kind of global notification process running. So, any actor could publish "announcement", and any actor could optionally listen for global events. Subscribing, during the actor.Started message, works. But feels a bit awkward. |
@noahsilverman I understand what you are saying. Let me think of a good way to handle that. |
Please let me know if I can help |
@noahsilverman I just did a major refactor on how event stream is going to work in the future. Its already merged in master. Still need to write documentation about it, though. Keep an eye on the docs. Will leave this issue open until that is done. |
I have a resonably good grip on this. I'll make sure it is documented. |
@noahsilverman could you review the PR mentioned above and see if you think I've hit the spot? |
It would be awesome if any actor could subscribe to the global event stream This could become a nice broadcast/signalling channel for all running children.
The challenge is: how to access it.
In the eventStream example, the code subscribes directly to the event stream by calling a function of the engine. However, a child only knows its own PID, and does not have direct access to the engine.
One awkward way would be to subscribe when the Receiver gets a
started
message:Is this good enough, or do we want something more specific?
The text was updated successfully, but these errors were encountered: