Hey guys. My friend Declan and I were chatting on our forum’s Babble chat and we got curious how the chat plugin updates clients when a new message is sent in chat. I said “It probably uses the same code behind-the-scenes that Discourse uses to tell you ‘hey, there is a new/unread post’ without needing to refresh the page.”
First of all, am I wrong to say that? If so, how does Babble propagate messages across clients? And how does Discourse send those sorts of “new post” notifications out without refreshing? Declan did some inspection out of curiosity and didn’t see any sort of websockets going to the server.
My idea is that Discourse uses something similar to web sockets but doesn’t actually use true websockets. Like its own implementation. Either that or it uses something like SignalR in the ASP.NET world. What’s really going on behind the scenes? I’m really interested in those sorts of things and I’m really curious now.