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

fallback broadcast channel #19

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

tuna1207
Copy link

@tuna1207 tuna1207 commented Oct 2, 2024

Motivation and Context

This PR add new AdaptiveBroadcastChannel class with fallback strategy for sending message

Jira Link: https://toruslabs.atlassian.net/browse/PD-3692?atlOrigin=eyJpIjoiZjU3ZWRjYjU1MWJjNGE1NDllNGU4MGJiMWVjNzc3NmMiLCJwIjoiaiJ9

Description

  • The AdaptiveBroadcastChannel class is designed to add fallback during channel post message and synchronization issues between senders and receivers in a broadcast communication scenario. It achieves this by:
  • Creating a separate channel for each communication method, allowing all methods to listen simultaneously.
  • Implementing adaptive listening, where all instances listen on all channels but primarily use the current active method for sending.
  • Enabling seamless method switching, allowing receivers to automatically adapt to the sender's method changes without manual intervention.
  • This AdaptiveBroadcastChannel can be opt in by the user of the package

How has this been tested?

added browser test to test cases

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project. (run lint)
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant