Websocket support #16

Open
opened 2 years ago by garrettmills · 2 comments
Owner

Introduce a websocket server to HTTPServer.

Design to hammer out:

  • defining websocket entry endpoints
  • defining socket endpoints/protocols
  • integrating routes w/ http server
  • defining client side implementation
Introduce a websocket server to `HTTPServer`. Design to hammer out: - defining websocket entry endpoints - defining socket endpoints/protocols - integrating routes w/ http server - defining client side implementation
Poster
Owner

When a socket connects to an entrypoint, create a new event bus for that connection.

Once the bus is created, optionally call some connect callback that takes the socket and bus as parameters.

Pushing an event to the socket's bus serializes the event and emits it as JSON over the socket.

Subscribing to the bus works normally.

When a message is received over the socket, it is parsed, validated, deserialized, then emitted on the bus normally.

When a socket connects to an entrypoint, create a new event bus for that connection. Once the bus is created, optionally call some connect callback that takes the socket and bus as parameters. Pushing an event to the socket's bus serializes the event and emits it as JSON over the socket. Subscribing to the bus works normally. When a message is received over the socket, it is parsed, validated, deserialized, then emitted on the bus normally.
Poster
Owner

For a client library, we need a minimal subtree of the event bus, socket implementation, and (de)serializer.

For a client library, we need a minimal subtree of the event bus, socket implementation, and (de)serializer.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: extollo/lib#16
Loading…
There is no content yet.