A chat application has become the “Hello World” of the realtime app space. But what are the challenges beyond that initial demo? How do we correctly handle reconnections, slow connections, prevent messages being sent out of order or being lost and so on? What are the best design patterns to apply? How do we scale it?

https://jsfoo.talkfunnel.com/2015/32-the-future-of-chat