showcase_chat
showcase_chat copied to clipboard
Discussion: Why Not Websockets?
trafficstars
Apologies in advance if this is the wrong place to put this, I dont see a discussion section in this repo.
Is there a reason this app was implemented with server sent events instead of Websockets?
edit: I think I see why now. The browser will automatically try to reconnect to SSE streams if they are disconnected, whereas Websockets can just close. Since Deno Deploy can terminate idle instances; SSE has a more simple client side implementation because the browser will attempt to restart the EventSource. It would be perfectly viable to build this application with web sockets on Deno Deploy but the client implementation would be slightly more complex. Is my assumption correct?