Is your feature request related to a problem? Please describe.
I'm looking at the Pub/Sub example and its pretty interesting but its just calling back to a subscriber class. If a user is running an app in a browser from a cannister it seems like it would need to poll the the subscriber function to look for updates. That's going to cost cycles and may infrequently change.
Describe the solution you'd like
I'd like to see an api where you can subscribe to an event published by an actor and an active socket connection is established. The actor could then publish a message to that event and matching subscribers would receive a message pushed from dfx through the socket in real-time.
Describe alternatives you've considered
Theoretically it could do something like support outbound webhook calls instead of requiring an active socket... that sounds worse for users behind firewalls but better for backend to backend. Maybe both would be good :)
Additional context
I'm new, maybe this already exists but I didn't see it in the docs. Pushing messages out of the system seems like a pretty important foundational piece, other systems support it in various ways.
Is your feature request related to a problem? Please describe. I'm looking at the Pub/Sub example and its pretty interesting but its just calling back to a subscriber class. If a user is running an app in a browser from a cannister it seems like it would need to poll the the subscriber function to look for updates. That's going to cost cycles and may infrequently change.
Describe the solution you'd like I'd like to see an api where you can subscribe to an event published by an actor and an active socket connection is established. The actor could then publish a message to that event and matching subscribers would receive a message pushed from dfx through the socket in real-time.
Describe alternatives you've considered Theoretically it could do something like support outbound webhook calls instead of requiring an active socket... that sounds worse for users behind firewalls but better for backend to backend. Maybe both would be good :)
Additional context I'm new, maybe this already exists but I didn't see it in the docs. Pushing messages out of the system seems like a pretty important foundational piece, other systems support it in various ways.