I suppose it depends on your convenience and tolerance of learning new things, but, of course, along the way of using WebSocket APIs for communication or even SSE is better than the traditional long polling / comet solution for many reasons - one that you mentioned - scalability, but also to use bandwidth and delay. It is also important to understand that WebSocket refers to the Internet, which is TCP for a desktop computer, for example. socket. In a desktop solution, you do not have to encode TCP; you use a client library that supports the transport protocol, such as STOMP or XMPP over TCP. You do the same when using WebSocket, choose a server for communication, for example. XMPP server and XMPP client library for communicating with the server via WebSockets.
You can see our example here , and we docs you can read here .
The thing to note is browser adoption of HTML5 WebSocket - currently in Chrome and Safari, and soon in FF and Opera. We turned to this, but if you plan to create your own server, you will have to create a solution for older versions.
Jonas source share