http://tdoc.info/blog/2014/01/27/mqtt.html Features of the protocol • Light weight publish/subscribe protocol over TCP/IP • A small transport overhead • the fixed-length header is just 2 bytes • QoS - Three qualities of service for message delivery. Qos 0:”At most once”, QoS 1: ”At least once”, QoS 2: ”Exactly once”. • A mechanism to notify interested parties to an abnormal disconnection of a client using the Last Will and Testament feature
Fit for M2M (IoT) These characteristics make it ideal for use in constrained environments, for example, but not limited to: ! • Where the network is expensive, has low bandwidth or is unreliable • When run on an embedded device with limited processor or memory resources
MQTT.IO MQTT over Socket.IO
What is MQTT.IO? MQTT.IO is a porting “MQTT over WebSocket” to the Socket.IO. Currently just experimental project. ! Socket.IO 1.0 supports Binary streaming, so we can do it now! Thanks Guillermo!
Advantage of MQTT.IO vs WebSocket We can use MQTT anywhere! ! Many MQTT broker support WebSocket, but some of load-balancer/reverse-proxy like Amazon ELB cannot allow WebSocket connection (> <)
Flow of MQTT.IO MQTT Broker ArrayBuﬀer Buﬀer and Just Bytes (UInt8Array) DuplexStream All Binary Stream