Skip to content
This repository has been archived by the owner on Nov 16, 2020. It is now read-only.

Add raw Websocket support #17

Closed
essen opened this issue Aug 10, 2015 · 5 comments
Closed

Add raw Websocket support #17

essen opened this issue Aug 10, 2015 · 5 comments
Assignees
Milestone

Comments

@essen
Copy link
Collaborator

essen commented Aug 10, 2015

We want to add a new path, for example /ws, that would serve STOMP over raw Websocket, ie without the SockJS dependency.

Initially and by default it would serve STOMP, and later on it may be expanded to use different protocols (using Websocket's protocol header). There's however no need to take care of this until we have a second protocol to use.

The rabbitmq-web-stomp-examples plugin also needs to be updated and provide an alternative for each example for raw Websocket.

For the sake of simplicity, and to avoid duplicating code, I propose to do this in two steps:

  • First the raw Websocket handler will simply call rabbit_ws_client when needed.
  • Later on it might be worth implementing the STOMP decoding directly in the Websocket handler, if only to avoid wasting resources (there's really no need for a separate process there). It's also possible that this would be required to support STOMP hearbeats (STOMP heartbeat support #15) although that's just a guess at this point.

This ticket is about the first step.

@michaelklishin
Copy link
Member

👍 to /ws.

@essen
Copy link
Collaborator Author

essen commented Aug 10, 2015

Tasks left to do:

@essen
Copy link
Collaborator Author

essen commented Aug 10, 2015

After looking in more details, rabbit_ws_sockjs is actually little about SockJS. It's basically starting the Cowboy listeners (including /ws) and then there's about 10 lines that are SockJS-specific. If it was to be split, I would prefer to do so in a different larger refactoring PR.

@michaelklishin
Copy link
Member

@essen gotcha, lets tick that one off then and worry about it later (if at all).

@essen
Copy link
Collaborator Author

essen commented Aug 10, 2015

I think we're good now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants