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

Use of stream for manage game sessions and communication to and from users #1

Open
mrkrash opened this issue Apr 21, 2023 · 3 comments

Comments

@mrkrash
Copy link
Owner

mrkrash commented Apr 21, 2023

No description provided.

@JonnyMe
Copy link
Collaborator

JonnyMe commented Apr 27, 2023

Here some thoughts on this topic, strictly connected to the chat example provided by Rocket.

Rocket chat example makes use of async streams, in detail it uses EventStream.

The endpoint associated to this stream is then consumed by the client using the js EventSource interface.

This is a good starting point to work on. However, to make the application scalable, we cannot rely on the fact that the service we are querying knows anything about the current room and the state of the match. Thus, we should think about how to manage the retrieval of those informations.

@JonnyMe
Copy link
Collaborator

JonnyMe commented Apr 27, 2023

Regarding managed state in Rocket here is a good issue involving Arc and Mutex:
rwf2/Rocket#2043

@JonnyMe
Copy link
Collaborator

JonnyMe commented May 4, 2023

Here some documentation about channels with tokio alongside an interestisting example:
https://tokio.rs/tokio/tutorial/channels
https://github.com/tokio-rs/website/blob/master/tutorial-code/channels/src/main.rs

Repository owner deleted a comment from bajarang-agarwal1 Jan 9, 2024
Repository owner deleted a comment from marynavoitenko Feb 23, 2024
Repository owner deleted a comment from mt4110 Feb 26, 2024
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

No branches or pull requests

2 participants