Skip to content
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

Implement "asynchronously" part of CHA-RL1h5 #119

Closed
lawrence-forooghian opened this issue Nov 18, 2024 · 1 comment · Fixed by #174
Closed

Implement "asynchronously" part of CHA-RL1h5 #119

lawrence-forooghian opened this issue Nov 18, 2024 · 1 comment · Fixed by #174
Assignees
Labels
enhancement New feature or improved functionality. room-lifecycle Related to room lifecycle (temporary label).

Comments

@lawrence-forooghian
Copy link
Collaborator

lawrence-forooghian commented Nov 18, 2024

Split from #28

CHA-RL1h5 says that the detaching of all non-failed channels should happen "asynchronously with respect to CHA-RL1h4" (in my current implementation, it happens as part of the ATTACH operation, thus not fulfilling this spec point)

┆Issue is synchronized with this Jira Story by Unito

@lawrence-forooghian lawrence-forooghian added enhancement New feature or improved functionality. room-lifecycle Related to room lifecycle (temporary label). labels Nov 18, 2024
@lawrence-forooghian lawrence-forooghian self-assigned this Nov 18, 2024
@lawrence-forooghian
Copy link
Collaborator Author

Awaiting input on spec from @AndyTWF in ably/specification#253.

lawrence-forooghian added a commit that referenced this issue Dec 4, 2024
This implementation reflects my suggested spec changes [1] which aim to
preserve lifecycle operation atomicity by introducing a new RUNDOWN
operation:

> The `ATTACH` operation ends in CHA-RL1h4, implying that the CHA-RL1h5
> asynchronous detach happens _outside of any room lifecycle operation_.
> This means that another room lifecycle operation could run at the same
> time as this detach operation, which doesn't seem intentional.
>
> I looked at the JS implementation [2] and it seems that it keeps the
> lifecycle manager’s mutex locked during this "rundown" (as it calls the
> CHA-RL1h5 detach operation). But this is not implied in the spec. I
> think that to translate this behaviour to the spec, which implements
> mutual exclusion through lifecycle operations, we should do something
> analogous to the `RETRY` operation; that is, define a new internal-only
> room lifecycle operation (I’ll call it `RUNDOWN` for want of a better
> term), which is scheduled by CHA-RL1h5 and which:
>
> - performs the detach-all-non-`FAILED`-contributors behaviour of CHA-RL1h5
> - implements the retry behaviour of CHA-RL1h6

Resolves #119.

[1] ably/specification#253
[2] https://github.com/ably/ably-chat-js/blob/e8380583424a83f7151405cc0716e01302295eb6/src/core/room-lifecycle-manager.ts#L506-L509
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improved functionality. room-lifecycle Related to room lifecycle (temporary label).
Development

Successfully merging a pull request may close this issue.

1 participant