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

Improper use of EventEmitter [violation of RTC10] #413

Open
sacOO7 opened this issue Jun 20, 2024 · 1 comment
Open

Improper use of EventEmitter [violation of RTC10] #413

sacOO7 opened this issue Jun 20, 2024 · 1 comment

Comments

@sacOO7
Copy link
Contributor

sacOO7 commented Jun 20, 2024

  • As per RTC10, library must not register any listeners for internal use.
  • At most of the places, ably-ruby uses emitter callbacks to detect state changes and execute internal code.
  • This is causing problems in order of code execution with respect to internal and external code. Same is being reflected in flaky behaviour of the tests. To mitigate this flaky test behaviour, usage of EventMachine.next_tick can be found in the emitter callbacks. But, this is not a proper solution for apps running in production.
  • We have fixed one of the similar issue as a part of a3d9746.
  • Aim of this issue is to find and implement code without emitter callback registrations.

┆Issue is synchronized with this Jira Task by Unito

@sacOO7
Copy link
Contributor Author

sacOO7 commented Jun 29, 2024

One of the solution would be to use internalEmitter that's specific to internal library.
We use the same in case of ably-go
https://github.com/ably/ably-go/blob/0885021e9c92c9895dfbeb644e71fa45936cd4ae/ably/realtime_conn.go#L1016 and
https://github.com/ably/ably-go/blob/0885021e9c92c9895dfbeb644e71fa45936cd4ae/ably/realtime_channel.go#L1028

@sacOO7 sacOO7 mentioned this issue Jul 8, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant