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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
How to build a perfect <img>
jonoalderson
1
6.1k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
Large-scale JavaScript Application Architecture
addyosmani
516
110k
How to make the Groovebox
asonas
2
2.5k
Into the Great Unknown - MozCon
thekraken
41
2.8k
Design in an AI World
tapps
1
350
Tell your own story through comics
letsgokoyo
1
1.1k
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