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
63
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
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
640
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
The SEO identity crisis: Don't let AI make you average
varn
0
590
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.2k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
570
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
890
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
550
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.8k
The Limits of Empathy - UXLibs8
cassininazir
2
720
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