multiaddr icon indicating copy to clipboard operation
multiaddr copied to clipboard

Adding MQTT protocol

Open ConsciousCode opened this issue 5 years ago • 5 comments

IoT seems to be a good use-case of libp2p in general, so support should be added for IoT protocols like MQTT. Luckily it already has a path-like addressing syntax, so it could be considered a (restricted) type of path protocol, eg /mqtt/stat/tasmota/POWER. This can then be combined with host resolution protocols, eg /mdns/mqtt.local/tcp/1883/tls/sni/mqtt/stat/tasmota/POWER

ConsciousCode avatar Mar 11 '20 20:03 ConsciousCode

It looks like MMQT is a protocol that could run over libp2p, but it doesn't look like it would work as a libp2p transport.

Stebalien avatar Mar 11 '20 20:03 Stebalien

I bet @mcollina has some ideas about this ;)

mikeal avatar Mar 11 '20 20:03 mikeal

I don't know if I'm stretching the definition of "transport", but topics can be thought of as producing/consuming short strings and thus addressing resources, like in the example provided which addresses an IoT device's power status

ConsciousCode avatar Mar 11 '20 21:03 ConsciousCode

Regardless of whether MQTT is a good use-case for libp2p, I think it should be added as a terminator protocol to the multiaddr protocol list.

ntninja avatar Sep 01 '20 15:09 ntninja

MQTT is based on a client-server logic. You can run mqtt from a client to a server on any duplex connection. Originally it was run even on RS232.

On the JS side, it can run on any Node.js Duplex (even on browsers).

mcollina avatar Sep 03 '20 12:09 mcollina