Skip to content

Instantly share code, notes, and snippets.

@3rd-Eden
Created August 7, 2013 18:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 3rd-Eden/6176927 to your computer and use it in GitHub Desktop.
Save 3rd-Eden/6176927 to your computer and use it in GitHub Desktop.
Why you should use Primus instead of engine.io

The advantages of Primus over a plain Engine.IO server:

  1. Stream compatible interface for the client and the server
  • You can pipe data from the server the client
  • It uses the same data events you're used to with streams
  1. Build in reconnect, this one just works. Uses exponential backoff (randomized) to reduce server stress.
  2. Automatically runs your messages through the specified parser
  • JSON by default, but extendable by developers
  1. Comes with a plugin system as Primus was designed to say out of your way and developers all the freedom they need.
  • There are already community added plugins for EventEmitters, Rooms and Namespaces.
  1. It fixes various of real-time bugs that I commonly talk about during presentations (crashing websockets etc)
  2. You can effortless switch between Engine.IO, SockJS, Socket.IO, BrowserChannel and WebSocket with one line of code
  3. Normalizes IP addresses, even when you're behind a reverse proxy.
  4. It's built with love <3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment