22

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?

rafidude
  • 4,496
  • 7
  • 27
  • 23
  • 7
    Duplicate? http://stackoverflow.com/questions/8542502/whats-the-difference-between-engine-io-and-socket-io – DashK Mar 08 '12 at 00:10

2 Answers2

20

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.

Community
  • 1
  • 1
nicholaides
  • 19,211
  • 12
  • 66
  • 82
  • Engine is a lower level lib. If you need multiplexing or reconnecting use Socket.IO instead of Engine – Julian Jun 28 '16 at 20:47
12

engine.io is the new core for socket.io, so use socket.io unless you want some other API :-) According to the author of both modules, engine will be integrated into socket.io 1.0: http://groups.google.com/group/socket_io/browse_thread/thread/6e759a508b231b4

"What's next

1.0 is right around the corner, which features our next-generation realtime core, Engine.IO. The 0.9 branch will only receive maintenance updates to ensure maximum stability. "

Mark
  • 866
  • 9
  • 18
  • 7
    I would say 0.9 is brealy usable in its current state, it just doesn't work for to many different client situations. 1.0 has been 'right around the corner' for a very long time. Time to give up and just use engine.io me thinks. – Josh Mc Oct 13 '12 at 06:26
  • At least it still seems to be in development, thought it had been abandoned. – Daniel West Mar 25 '13 at 19:56