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

Real-time communication support #59

Open
jvyden opened this issue Oct 30, 2023 · 0 comments
Open

Real-time communication support #59

jvyden opened this issue Oct 30, 2023 · 0 comments

Comments

@jvyden
Copy link
Member

jvyden commented Oct 30, 2023

This will require a lot of thinking - and there's two approaches I can see us taking.

First, we can just let the user manage everything. Pass them a raw socket/stream and let them handle the rest - however this can be a lot of code for simple operations.

The method I want to proceed with is writing a whole API for real-time protocols, like our current API for request protocols.

  • Should this be a separate package? Most of our concepts that apply to a request server do not apply to generic real-time protocols.
  • How do we store and manage connections?
  • How do we manage authentication?
  • How will this tie into Bunkum in general? In other words, how will the request server (Bunkum in its current form) hand off a connection to the real-time server?

Example use-cases that need to be filled by this:

  • Real-time activity stream and notifications in Refresh via WebSockets
  • A chat application that sends/receives messages and events through a WebSocket
  • A custom server for osu! that uses binary data over TCP to communicate

If we end up making the API, we should try to generalize this so the same code can be re-used for multiple protocols, similar to how we manage protocols for the request server.

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

1 participant