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

Extract src/websockets from Polykey to js-ws #1

Closed
CMCDragonkai opened this issue Aug 11, 2023 · 3 comments · Fixed by #5
Closed

Extract src/websockets from Polykey to js-ws #1

CMCDragonkai opened this issue Aug 11, 2023 · 3 comments · Fixed by #5
Assignees
Labels
development Standard development r&d:polykey:core activity 1 Secret Vault Sharing and Secret History Management r&d:polykey:supporting activity Supporting core activity

Comments

@CMCDragonkai
Copy link
Member

CMCDragonkai commented Aug 11, 2023

Specification

The websockets domain in Polykey can be extracted out in order to be re-used inside PKE.

Initial usage will just wrap around ws. So no runtimeless support yet. We would later extract the functionality of ws to have runtimeless support.

Proper runtimeless support would need to support TLS too. This is also where we can investigate how to unify the TLS between all the IO libraries. It's possible that the entire state machine can be done in pure JS without involving Rust/C++, it might be fast enough. Doing this would a be separate thing.

Additional context

Tasks

  1. Extract out src/websockets to js-ws
  2. Implement the WebSocketStream muxing/demuxing on top of WebSocket connection
  3. Ensure that library works in browser and also on nodejs.
  4. Plan out the roadmap to support runtimeless operation (without ws)
  5. Plan out the roadmap for unified TLS support - assuming runtimeless state machine is pure JS, then TLS operations would have to be exposed via JS routines too (this is necessary to support WSS)
@CMCDragonkai
Copy link
Member Author

@CMCDragonkai
Copy link
Member Author

The js-ws should have similar structure to https://github.com/MatrixAI/js-quic/tree/staging/src.

@CMCDragonkai
Copy link
Member Author

There are pending changes in MatrixAI/Polykey#535 that affect WS. These should be extracted as well (or if it is merged by @tegefaulkes tomorrow).

@CMCDragonkai CMCDragonkai added r&d:polykey:supporting activity Supporting core activity r&d:polykey:core activity 1 Secret Vault Sharing and Secret History Management labels Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Standard development r&d:polykey:core activity 1 Secret Vault Sharing and Secret History Management r&d:polykey:supporting activity Supporting core activity
Development

Successfully merging a pull request may close this issue.

2 participants