Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How is engine.io different from socket.io?

Tags:

LearnBoost seems to have a new project called engine.io that in theory seems to be similar to socket.io. 1) Under what scenarios would you use one versus the other? 2) For new projects that require HTML5 sockets based communication over node.js, should we use engine.io and NOT socket.io?

like image 268
rafidude Avatar asked Mar 07 '12 23:03

rafidude


1 Answers

From https://github.com/LearnBoost/engine.io

The main goal of Engine is ensuring the most reliable realtime communication. Unlike the previous socket.io core, it always establishes a long-polling connection first, then tries to upgrade to better transports that are "tested" on the side.

During the lifetime of the socket.io projects, we've found countless drawbacks to relying on HTML5 WebSocket or Flash Socket as the first connection mechanisms.

Both are clearly the right way of establishing a bidirectional communication, with HTML5 WebSocket being the way of the future. However, to answer most business needs, alternative traditional HTTP 1.1 mechanisms are just as good as delivering the same solution.

like image 53
nicholaides Avatar answered Oct 11 '22 22:10

nicholaides