Cretezy / dSock

Distributed WebSocket broker
MIT License
220 stars 23 forks source link

Additional transports #16

Open afdecastro879 opened 4 years ago

afdecastro879 commented 4 years ago

This is a question regarding this websocket broker implementation.

I case of a websocket connection does not succeeds does it fallback to another type of transport? i.e. XHR-streaming, Long-Polling, etc?

If not, are there any plans to implement something like this soon?

Cretezy commented 4 years ago

Hi, sorry for the late reply.

Yes, other transports is something I would like to implement. I don't have much experience with XHR streaming or long-polling, so hard to say a clear ETA for this.

What is the use-case for non-WebSocket transport? Support for it on browsers is near-universal (https://caniuse.com/websockets) and it's commonly implemented in other environments (servers, mobile apps, etc).

I think having a lowest-common denominator alternative transport could be useful for networks where WebSockets are blocked, but I don't think those are used widely.

XHR streaming seems to have less support overall, while long-polling is usually supported everywhere but requires additional client-side support code for it to work reliably (also changes to the server-side, which can grow the complexity).