-
Notifications
You must be signed in to change notification settings - Fork 4
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
Contributor discontinuity criteria are ambiguous re shared channels #240
Comments
This spec point requires us to implement a special behaviour to handle the fact that multiple contributors can share a channel. I have decided, instead, to make it so that each channel has precisely one lifecycle contributor. I think this is a simpler, functionally equivalent approach and have suggested it in [1]. [1] ably/specification#240
This spec point requires us to implement a special behaviour to handle the fact that multiple contributors can share a channel. I have decided, instead, to make it so that each channel has precisely one lifecycle contributor. I think this is a simpler, functionally equivalent approach and have suggested it in [1]. [1] ably/specification#240
I’ve implemented CHA-RL5a1 in Swift by making it so that contributors no longer share realtime channels; see ably/ably-chat-swift#147 |
So the logic when originally implemented is thus:
That said, I think it would be reasonable to define the lifecycle contributor on a per-channel basis, so long as those individual features can be notified of discontinuities on their channels (i.e. we still tie features to contributors in some way). The thing that this would require us to remove would be the feature attachment/detachment error codes for occupancy and presence, as they share channels with messages. Though I don't think this would necessarily be a problem. WDYT? |
Yep, what you've described is pretty much how it's implemented in Swift in the above PR (the error codes for occupancy and presence are still there but will never get thrown). |
I find the wording of CHA-RL4a2 ambiguous — is the "has-already-been-attached" state meant to be keyed by the contributor or by its underlying realtime channel?
Given that contributors might share channels, we might receive a state change for a contributor which was actually triggered by calling
attach()
on some other contributor.It makes me wonder whether it would be simpler to not allow contributors to share channels. I don't really see what it buys us, and it means that we write
but then have to introduce exceptions like
Since, as of #233, the room already now has logic to fetch each channel precisely once, how about we also create only one lifecycle contributor per realtime channel?
The text was updated successfully, but these errors were encountered: