zio-http icon indicating copy to clipboard operation
zio-http copied to clipboard

WebSocket architectural & feature improvements

Open jdegoes opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe.

Ideally WebSockets would be more thoroughly integrated into ZIO HTTP, with a more comprehensive feature set (e.g. sending a message to a client before receiving one), and with fewer data types in ZIO HTTP.

Describe the solution you'd like

Unknown.

Describe alternatives you've considered

None.

jdegoes avatar Sep 19 '22 21:09 jdegoes

The current API allows sending a message without waiting for one from the client (collect on handshake event). ChannelEvents are a bit complex, but can give a lot of performance gains while doing broadcasts. I agree it's not the most elegant though. I think we can enhance it by attaching a middleware.

tusharmath avatar Sep 20 '22 04:09 tusharmath