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

KTOR-7186 Improve the docs by showcasing broadcasting messages to WebSocket clients via SharedFlow #495

Merged
merged 9 commits into from
Jul 17, 2024

Conversation

mbakgun
Copy link
Contributor

@mbakgun mbakgun commented Jul 14, 2024

This pull request updates the WebSocket documentation to introduce a more efficient method of handling multiple WebSocket sessions using SharedFlow. The new approach offers improved scalability and concurrency management for applications dealing with numerous WebSocket connections.
Key changes:

  1. Introduces the use of SharedFlow for broadcasting messages
  2. Provides a complete code example demonstrating the implementation
  3. Explains the benefits of this approach over manual connection management

This update aims to provide Ktor users with best practices for implementing WebSocket broadcasting in a scalable manner.
Relevant links:
https://youtrack.jetbrains.com/issue/KTOR-7186

Copy link
Collaborator

@vnikolova vnikolova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, @mbakgun ! Can you address the comment and add some short instructions to the README.md file on how to test the code?

@mbakgun mbakgun requested a review from vnikolova July 15, 2024 11:26
@vnikolova vnikolova merged commit d72ff6a into ktorio:main Jul 17, 2024
@vnikolova
Copy link
Collaborator

PR merged 🎊 I renamed the sample folder, as it is no longer connected to a tutorial.
Thanks once again for the contribution @mbakgun !

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.

2 participants