nicobarray / aquedux

Redux over the wire
46 stars 3 forks source link

Use engine.io #32

Open nicobarray opened 6 years ago

nicobarray commented 6 years ago

We should use engine.io for aquedux-server if their heartbeat behaviour match our needs.

chabou commented 6 years ago

Apparently, we can hook add a handler onheartbeat with SockJS. This is how Meteor uses it: https://github.com/meteor/meteor/commit/a1a6414c1a8bf222735b604c978ad438b16c5f06

Current stable sockjs protocol is 3.3.3. Features explained for 0.4.X are not yet implemented : https://github.com/sockjs/sockjs-client/issues/67 https://github.com/sockjs/sockjs-protocol/wiki/Heartbeats-and-SockJS

If it doesn't work as expected, we can temporarily use https://github.com/primus/primus to have some keepalive and reconnection out of the box.