Skip to content

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

Closed
@CMCDragonkai

Description

@CMCDragonkai

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)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions