Replies: 1 comment 2 replies
-
There is no built-in feature for that. Presence tracking is beyond AnyCable's scope. The solution from the link is a very rough sketch and it has an important caveat: A better solution would be to periodically ping server and use some data structure with expiration. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am migrating a Rails project to AnyCable. One of the issues I am facing is subscription management: I want to know which users unsubscribed from a "global" channel and did not subscribe back within a few minutes. I am thinking of using Redis and a job scheduler for this.
Is there a better way to do this with ActionCable? Can I get all the users subscribed to a channel?
I found an excellent suggestion by @palkan in a similar "problem": link
In the last sentence of this very nice idea, @palkan mentioned that we need to take care of race conditions in Redis. Since all Redis ops are atomic (and I cannot see any series of Redis ops that need wrapping into a transaction) is locking of Redis ops necessary?
Beta Was this translation helpful? Give feedback.
All reactions