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

Possibility to forward a change to a subset of clients (conditional broadcast) #1207

Closed
3 tasks
FlorianJacta opened this issue Apr 19, 2024 · 5 comments · Fixed by #1441
Closed
3 tasks

Possibility to forward a change to a subset of clients (conditional broadcast) #1207

FlorianJacta opened this issue Apr 19, 2024 · 5 comments · Fixed by #1441
Assignees
Labels
💬 Discussion Requires some discussion and decision 🖰 GUI Related to GUI 📈 Improvement Improvement of a feature. ✨New feature 🟨 Priority: Medium Not blocking but should be addressed 🔒 Staff only Can only be assigned to the Taipy R&D team

Comments

@FlorianJacta
Copy link
Member

Description
Being able to broadcast variables not to all the clients but only a subset. A user variable or filter function defines this subset.

Acceptance Criteria

  • Ensure new code is unit tested, and check code coverage is at least 90%
  • Propagate any change on the demos and run all of them to ensure there is no breaking change
  • Ensure any change is well documented
@FlorianJacta
Copy link
Member Author

I think we have internally a _broadcast function that broadcasts to a list of clients. Is it true?

@dinhlongviolin1 dinhlongviolin1 self-assigned this May 17, 2024
Copy link
Contributor

This issue has been labelled as "🥶Waiting for contributor" because it has been inactive for more than 14 days. If you would like to continue working on this issue, please add another comment or create a PR that links to this issue. If a PR has already been created which refers to this issue, then you should explicitly mention this issue in the relevant PR. Otherwise, you will be unassigned in 14 days. For more information please refer to the contributing guidelines.

@github-actions github-actions bot added the 🥶Waiting for contributor Issues or PRs waiting for a long time label May 31, 2024
@FabienLelaquais
Copy link
Member

A great use case is a Chat application: not all clients should receive a message sent to a subset of connected users.

@jrobinAV jrobinAV added ✨New feature and removed 🥶Waiting for contributor Issues or PRs waiting for a long time labels Jun 7, 2024
@jrobinAV jrobinAV changed the title Possibility to broadcast to a subset of clients (conditional broadcast) Possibility to forward a change to a subset of clients (conditional broadcast) Jun 7, 2024
@jrobinAV jrobinAV added the 🔒 Staff only Can only be assigned to the Taipy R&D team label Jun 7, 2024
@jrobinAV jrobinAV added the 💬 Discussion Requires some discussion and decision label Jun 17, 2024
@jrobinAV
Copy link
Member

A use case is in this issue: Avaiga/taipy-doc#941

@FredLL-Avaiga FredLL-Avaiga self-assigned this Jun 20, 2024
@FredLL-Avaiga
Copy link
Member

Conditional broadcast is achieved via callback:
broadcast_callback is called on every State with parameters and the callback can modify (or not) each state.

FredLL-Avaiga pushed a commit that referenced this issue Jun 21, 2024
@FabienLelaquais FabienLelaquais self-assigned this Jun 25, 2024
namnguyen20999 pushed a commit that referenced this issue Jul 8, 2024
* broadcast callback on non shared variables
resolves #1207

* update example

* remove shared from the broadcast example

* - remove broadcast_callback_on_shared
- add state to global ctx  to allow use of state in function call used as bound value

* remove broadcast_callback_on_shared

* some of Fab's comments

* some of Fab's comments

* Merci les tests

* Expose invoke_callback() and broadcast_callback() as Gui methods.

* Added Gui.broadcast_change() and gui.broadcast_changes()

* Fix Gui.broadcast_changes()

* Group shared/broadcast tests

* Fix tests

* Spelling

* Fix mypy

* Update doc examples

* Linter

* More linters

* Fix tests and make linters even more happy

* Fix test [2]

* Re-re-re-re-re-fix tests

* avoid impact of invoke callback on current state

---------

Co-authored-by: Fred Lefévère-Laoide <[email protected]>
Co-authored-by: Fabien Lelaquais <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💬 Discussion Requires some discussion and decision 🖰 GUI Related to GUI 📈 Improvement Improvement of a feature. ✨New feature 🟨 Priority: Medium Not blocking but should be addressed 🔒 Staff only Can only be assigned to the Taipy R&D team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants