DEV Community

Discussion on: Simple Chat over only HTTP without WebSocket and WebRTC, using Piping Server

Collapse
 
nwtgck profile image
Ryo Ota • Edited

Thanks for your comment. I agree that WebSocket is a suitable choice to create such kind of application, chat. And, the chat was created to provide a simple example of Piping Server in JS for Karan.

One thing I'm not sure is what the side-effect means in this context. Could you give me an example?

Collapse
 
lennartschoch profile image
Lennart Schoch • Edited

What Paulo is saying is right. While your approach will result in a working application, I strongly discourage using long polling (whenever it can be avoided) especially on the client side. It will put a lot of unnecessary load on your server and will prevent it from scaling well. There is a reason why websockets are pretty much a best practice for chat application :)