Introducing 

Prezi AI.

Your new presentation assistant.

Refine, enhance, and tailor your content, source relevant images, and edit visuals quicker than ever before.

Loading…
Transcript

MQTT Introduction

Features

  • IoT Message Protocol
  • On Top of TCP
  • Minimal overhead
  • Simple
  • Reliable communication

Light MQTT

MQTT

https://swf.com.tw

Heavy HTTP

HTTP

https://swf.com.tw

Simple

History

Agnostic

Quality

1999, Arlen Nipper and Andy Standford-Clark invent for monitoring oil pipeline

History

Session

Lightweight

Characteristic

  • Binary
  • Bi-direction
  • Scalable
  • Agnostic
  • Push communication
  • Heart beat mechanism

Pub / Sub

  • Space decoupling
  • Time decoupling
  • Synchronisation decoupling
  • Scalability
  • Cluster broker

Pub / Sub

Pub / Sub

https://swf.com.tw

Message Queue ?

  • Message must be consumed
  • Message could be consumed by multiple consumer
  • Easy build topic

Message Queue ?

https://www.hivemq.com/blog/mqtt-essentials-part2-publish-subscribe/

QoS

  • QoS 0: At must once (PUBLISH)
  • QoS 1: At least once (PUBLISH, PUBACK)
  • QoS 2: Exactly once (PUBLISH, PUBREC, PUBREL, PUBCOMP)

QoS

https://swf.com.tw

Client / Server

Connection Establish

Connection

Establish

  • Client - any devices using MQTT protocol connect to broker over network

  • Broker - receive / filter / dispatch messages and authentication

Client / Broker

https://www.hivemq.com/blog/mqtt-essentials-part-3-client-broker-connection-establishment/

clientId

cleanSession must be true when empty clientId

CONNECT

cleanSession

Broker doesn't store client subscribed message

CONNECT

Will Message

This message notifies other clients when a client disconnects ungracefully

https://www.hivemq.com/blog/mqtt-essentials-part-3-client-broker-connection-establishment/

keepAlive

Client send regular message to broker

sessionPresent

tell client whether boker has a persistent session available

CONNACK

https://www.hivemq.com/blog/mqtt-essentials-part-3-client-broker-connection-establishment/

returnCode

CA

generate rsa ca.key

generate ca.crt by ca.key

Security Connection

Server

generate rsa server.key

generate server.crt by CA sign server.key

Security Connection

Client

CA certificate server rsa key

https://mcuoneclipse.com/2017/04/14/introduction-to-security-and-tls-transport-security-layer/

Learn more about creating dynamic, engaging presentations with Prezi