Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Super beginners for MQTT
Search
kamontia
March 30, 2019
62
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Super beginners for MQTT
kamontia
March 30, 2019
More Decks by kamontia
See All by kamontia
14日間でサクサクっとOSSをリリースした話 / Talking of releasing OSS in 14 days
kamontia
2
470
Featured
See All Featured
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
5
770
Unsuck your backbone
ammeep
672
58k
Paper Plane (Part 1)
katiecoart
PRO
2
11k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
730
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
350
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
430
Docker and Python
trallard
47
4.2k
Optimising Largest Contentful Paint
csswizardry
37
4k
The Curious Case for Waylosing
cassininazir
1
550
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
30 Presentation Tips
portentint
PRO
1
420
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
Transcript
MQTT 入門 2019/3/27 @kamontia 1
自己紹介 2 Name Tatsuya Kamohara Work 車載AUTOSAR Classic&Adaptive OTA(Over the
Air) Hobby ダーツ レーティング7付近(3投に1投真ん中くらい) Other 子供が生まれました(11ヶ月)
MQTT聞いたことある人? 3
ペイロード(送りたいデータ)が 小さいときに有効なプロトコル 4
それだけ知ってもらえれば もう大丈夫です Facebook Messenger でも使われているらしい 5
MQTTって ペイロードに対するオーバーヘッドが少ない 最小ヘッダサイズ:2バイト (HTTP GET: 26バイト) 結果的に消費電力効果も非常に大きい 6 MQTTの通信は本当に軽いのか? https://www.ydc.co.jp/column/0002/20170630.html
MQTTって Message Queuing Telemetry Transport メッセージ指向: 1 対 N(Pub/Sub) 7
Publisher Broker Subscriber Subscriber Subscriber TOPIC≒ ・ home/living/light1 ・ home/bedroom/light1 TOPICに対して メッセージを発行 TOPIC単位でサブスクライブして メッセージを購読 PublisherはBrokerだけを意識すればいい SubscriberはBrokerだけを意識すればいい Brokerが頑張ってくれるので 疎結合を維持しやすい
MQTTの仕様 概要がわかりやすく載っています(すみません) http://devcenter.magellanic- clouds.com/learning/mqtt-spec.html ・ TOPIC は正規表現が使えて、1回の送信でより効率的 にマッチするSubscriberに送信できる ・ QoSも規定されている
・ Subscriberが意図しない 8
9 2017年 GoogleHomeを購入したボク
家電操作に使ってみた(REST) • アーキテクチャ 10 和室の電気消して OFF RESTサーバ BAD ・ サーバとして待ち受けるのでルータの設定が必要
→ 万人に向かない、ルータ変わるとめんどい ・ トリガー側が全ての宛先情報を持っておかなければならない ・ TOPICの概念が無いので設計の配置が柔軟にできない RasberryPI と赤外線送受信もジュール
11 2019年 MQTTなんかいいじゃんと思ったボク
家電操作に使ってみた(MQTT) • アーキテクチャ 12 和室の電気消して Publisher Broker(home/light) Subscriber API Call
OFF RasberryPI と赤外線送受信もジュール BrokerはOSSで公開されている SaaSとしても提供されており、今回は無償のBeebotteを利用 Subscriberが1台だと有り難みが少ないが 数十台~数万台になると威力を発揮
13 Thank you