engine.io icon indicating copy to clipboard operation
engine.io copied to clipboard

MQTT over TCP as an optional transport

Open truongsinh opened this issue 8 years ago • 5 comments

You want to:

  • [ ] report a bug
  • [x] request a feature

Status quo

"Transport" only supports ['polling', 'websocket']

Expected implementation

"Transport" supports ['polling', 'websocket', 'mqtt']

Rationale

When developing mobile apps (aka non-web), MQTT over TCP performs much better than HTTP (polling, websocket, or MQTT over websocket), however, like the adoption of websocket, MQTT over TCP might be stopped by firewall. In an ideal scenario, app developers should not care about the transportation, but focus on the logic. Transportation layer should gracefully chooses the best method, given the conditions. Ref https://www.quora.com/Is-MQTT-better-than-HTTP-for-mobile-app-iOS-Android-etc-client-server-communication

Other information:

  • If this issue is approved, I can research how to optionally use https://github.com/mqttjs/MQTT.js as one of the transport method, e.g ['polling', 'websocket', require('mqtt-engine')]

truongsinh avatar Dec 14 '16 18:12 truongsinh

Related to https://github.com/socketio/engine.io/issues/366

truongsinh avatar Dec 14 '16 18:12 truongsinh

Hi @truongsinh, sorry for the delay! That indeed looks promising, I'll be happy to merge your pull request for that feature.

I'm afraid you'll have to dig a bit into engine.io internals though :muscle:

darrachequesne avatar Dec 22 '16 07:12 darrachequesne

hey any update on this?

hearsh avatar Aug 20 '18 19:08 hearsh

@hearsh I'm afraid no work has been done on our side yet, I don't know if @truongsinh has had some time to dedicate to it.

darrachequesne avatar Aug 21 '18 11:08 darrachequesne

add MQTT transport over TCP is not possible (this version of engine.io depends on HTTP(request, URL))

but look at my idea : 1 - serve MQTT broker (Mosca, etc) with node js or any server 2 - implement MQTT transport in engine.io as an independent module 3 - in MQTT transport req data will be emulated

mrfelfel avatar Jan 23 '21 13:01 mrfelfel