Websocket support #16

Open
opened 2022-04-05 20:12:17 +00:00 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
Author
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.
Author
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
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: extollo/lib#16
No description provided.