-
Notifications
You must be signed in to change notification settings - Fork 7
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
Monitor channel connection/disconnect #47
Comments
Hi @abeloha thanks for raising the issue! |
Since this is a ride sharing app like uber I can give some architectural suggestions. You should create a rest API, that returns list of nearby zip codes based on given user location. User can be both rider or driver.
You should authorize users on presence channels by sending right metadata back as per https://laravel.com/docs/11.x/broadcasting#authorizing-presence-channels
Also refer to https://github.com/ably-labs/laravel-broadcast-app for more information. Specifically channels.php |
@abeloha let me know if you have more questions, otherwise we can close the issue |
Thanks @sacOO7 for the architectural suggestions. When a ride request comes, I want to send only to channel that is active. If there is no user in channel 'room.{zipcode}', I want do not want to send to that channel. The way I currently went around it is to periodically synchronize presence information directly from Ably using a scheduled task. |
I don't think you need a scheduled task for this. You should rather use list to store active channels for all zipcodes
|
Let me know if you are facing any other issues. Otherwise we can close the issue |
Since, issue is not laravel-broadcaster specific, I will close the issue. If you need help in the future, please raise new issue. |
I have a ride sharing application where users join private channel and the app push data such as ride requests for drivers or driver response to riders.
The frontend connects to channel "user.{ID}" where the ID is the user id. E.g user 1 would connect to user.1, while user 300 would connect to user.300.
The set up works fine. Now, I want the application to monitor active connections such that no rider requests goes to drivers who are not active.
Any suggestions on how this can be accomplished?
┆Issue is synchronized with this Jira Task by Unito
The text was updated successfully, but these errors were encountered: