Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ZeroMQ vs socket.io

I want major difference between ZeroMQ and socket.io

  1. Performance. ( Is it faster? Scalable? )
  2. Applications. ( Is it used for real time services? )
  3. Browsers Support. ( Which browsers are supported? )
like image 921
3ppps Avatar asked Apr 06 '15 09:04

3ppps


1 Answers

Although there are some situations where the two might be used interchangeably, you're comparing apples and oranges.

Socket.io
is a javascript library, composed of two parts- a client-side part meant to run in any browser that supports Web sockets, and a server-side part which runs on NodeJS. It's used to build real-time web applications, meaning you're expecting a lot of back and fourth communication between the client and server (and possibly multiple clients- eg. chat).

ZeroMQ
is a networking library, used to build distributed applications. It's meant to run on the backend. The idea is to enable communication between any combination of different threads or processes, be it on a single machine or a distributed network (which means it uses different transport means for different purposes- and it does so seamlessly). There are usage examples plenty of popular programming languages (PHP, Python, C++, C#, CL, Delphi, Erlang, F#, Felix, Haskell, Java, Objective-C, Ruby, Ada, Basic, Clojure, Go, Haxe, Node.js, ooc, Perl, and Scala), so it is not tied to NodeJS, or any server framework for that matter.

You should read the first couple of pages of the respective docs:
socket.io
ZeroMQ guide

In short:
ZeroMQ doesn't run inside a browser, and isn't necessarily tied to NodeJS or JavaScript- it facilitates communication between different "programs". Socket.io is written in JS, is a browser script and an npm package used when you want real time communication between NodeJS server and the client.

like image 187
programstinator Avatar answered Oct 19 '22 11:10

programstinator