What is the purpose of ZeroMQ + WebSockets?

Consider these two kinds of code:

1) When you hit a button on a page containing several input fields (the page is not a form), all the infos are retrieved and sent to the server. The server then performs several tasks with that data, such as:

a) ulpoad a provided image b) register a new row in database according to info ...and so on.

after completing each of these steps, the server sends a message to the client to inform about which process is currently being carried out on the server-side.

To do all of this, I used WebSockets.

2) Next, I want to make a simple chat application, real-time, similar as Whatsapp, Telegram, etc. To do so, I also want to use WebSockets, but in this context, I came across ZeroMQ, and I don't really understand its purpose, no matter how many guides I read / videos I watch.

From what I understood so far is that ZeroMQ would allow the WebSocket communication to flow across a separate TCP connection, while the actual website would keep running its habitual HTTP requests across another one. Is that the only difference? In other words, is it an absolute MUST to use ZeroMQ when building chat applications with WebSockets (Consider that I run the both the WebSocket Server script as well as the website on the same server).

Start a personal dev blog on your domain for free and grow your readership.

3.4K+ developers have started their personal blogs on Hashnode in the last one month.

Write in Markdown 路 Publish articles on custom domain 路 Gain readership on day zero 路 Automatic GitHub backup and more

No Comments Yet