Top Banner
MQTT QUIT BOTHERING THE SERVER EVERY 30 SECONDS
12
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: MQTT

MQTTQUIT BOTHERING THE SERVER EVERY 30 SECONDS

Page 2: MQTT

What is it?

• Binary pub-sub protocol

• Constrained networks

• Constrained clients

• Many clients

• Diverse payloads

Page 3: MQTT

How does it work?• Publisher, broker, subscriber

• Broker is the server and handles accepting and delivering messages

• Clients can both publish and subscribe

• These publications and subscriptions are scoped to topics

Page 4: MQTT

How does it work?

• Topics are namespaced and look like URI paths

• Users/EvanOwen/Faces/Duck

• Wildcards are supported, e.g. Users/EvanOwen/Faces/# or Users/+/Faces/Duck

Page 5: MQTT

How does it work?

• Three Quality of Service levels

• Sessions can be durable

• Publications can be retained

Page 6: MQTT

Why do we care?

• Low-latency push delivery

• Much less overhead than HTTP

• This enables us to do things we can’t right now

Page 7: MQTT

Like this

Page 8: MQTT

So how will it fit into our infrastructure?

Page 9: MQTT

Things we care about• Authentication

• Authorization

• SSL

• Horizontal scalability

• HTTP fallback

Page 10: MQTT

Things we don’t care about

• Noisiness

• Durable subscriptions

• Guaranteed delivery

Page 11: MQTT

How it might work • Single publish and subscribe endpoints for each

user

• Broker connected to Homebase, asks Homebase for permission information

• App uses HTTP to sync state of the world, MQTT to receive events while connected

• App can fall back on HTTP connection if MQTT is unavailable

Page 12: MQTT

That’s it!