SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
15.
16
MQTTトピック – ワイルドカード “#”
sensor/#
sensor配下すべての
トピックをsubscribe
sensor/water/room1
temp
water
door
temp water door
16.
17
MQTTトピック – ワイルドカード “+”
sensor/+/room1
room1のトピックを
subscribe
sensor/water/room1
temp
water
door
temp water
17.
18
MQTT QoS
QoS=0
At most once
QoS=1
at least once
PUBACK
PUBLISH
PUBLISH
ベストエフォート型。
メッセージの到達を保証していない。
オーバーヘッドは少ない。
保証型。
メーッセージの到達は保証。
オーバーヘッドはQoS=0に比べて
大きい。
26.
28
■シンプル&慣れた構文
・SQL文を使ったトピックのフィルタ
・オプションのWHERE句で条件を
記述することが可能
・JSONサポート
■メッセージ変換機能
・文字列操作 (正規表現サポート)
・算術計算
・コンテキストベースのヘルパー
・暗号
・UUID, Timestamp, 乱数など.
ルールエンジン
SELECT * FROM ‘things/thing-2/color’
WHERE color = ‘red’
{ “color”: “red” }
27.
29
ルールエンジン
SELECT *, clientId() as MQTTClientId
FROM 'one/rule'
WHERE
startsWith(topic(2), ’Vac123') AND
(state = ‘SWEEP' OR bin.size < 30)",
"actions":
[{
"republish": {
"topic":
"controllers/${substring(topic(3),
3, 5)}",
}]
{ “color”: “red” }
28.
30
SQLリファレンス
SELECT DATA FROM TOPIC WHERE FILTER
29.
31
SQLリファレンス
SELECT DATA FROM TOPIC WHERE FILTER
• RDBMSと同じようにメッセージを検索可能
• FromのデフォルトはMQTTトピック
• 例
FROM mqtt(‘my/topic’)
FROM mqtt(‘my/wildcard/+/topic’)
FROM (‘my/topic’)
32.
34
SQLリファレンス
SELECT DATA FROM TOPIC WHERE FILTER
演算子 意味 使用例
= Equal, comparison color = 'red'
<> Not Equal, comparison color <> 'red'
AND Logical AND color = 'red' AND siren = 'on'
OR Logical OR color = 'red' OR siren = 'on'
() Parenthesis, grouping color = 'red' AND (siren = 'on' OR isTest)
+ Addition, arithmetic 5 + 3
- Substitution, arithmetic 5 - 4
/ Division, arithmetic 8 / 2
http://docs.aws.amazon.com/ja_jp/iot/latest/developerguide/iot-rules.html
33.
35
SQLリファレンス
SELECT DATA FROM TOPIC WHERE FILTER
演算子 意味 使用例
< Less than, comparison color = 'red'
<= Less than or equal color <> 'red'
> Greater than, comparison color = 'red' AND siren = 'on'
>= Greater than or equal color = 'red' OR siren = 'on'
CASE …
WHEN …
THEN …
ELSE …
END
Case statement CASE location
WHEN 'home’
THEN 'off'
WHEN 'work’
THEN 'on' ELSE 'silent' END
http://docs.aws.amazon.com/ja_jp/iot/latest/developerguide/iot-rules.html
34.
36
ルールエンジンのアクション
RULES ENGINE
Transform messages
based on rules and
route to AWS Services
AWS Services
- - - - -
3P Services
AWS サービス
- - - - -
外部サービス
74.
77
オフィシャルのIoTスターターキット
Broadcom WICED
BCM4343W
On Threadx/Netx
Marvell
EZConnect
MW302
On FreeRTOS
Renasas RX63N
On Micrium OS
TI CC3200
On TI-RTOS
Microchip WCM
PIC32 Platform
Intel Edison
on Yocto Linux
Mediatek
LinkOne
on Linkit OS
Dragonboard
410c on
Ubuntu
Seeeduino
Arduino on
openWRT
Beaglebone
Green on
Debian
80.
83
参考資料 – re:Invent 2015(初級)
(MBL203)From Drones to Cars
http://www.slideshare.net/AmazonWebServices/mbl203-drones-to-cars-connecting-
the-devices-in-motion-to-the-cloud
https://www.youtube.com/watch?v=o1cN0KDaOf4
(MBL204)Connecting the Unconnected
http://www.slideshare.net/AmazonWebServices/mbl204-state-of-the-union-iot-
powered-by-aws
https://www.youtube.com/watch?v=0WDiSLVEkYQ
(MBL205)Everything You Want to Know About AWS IoT
http://www.slideshare.net/AmazonWebServices/mbl205-new-everything-you-want-
to-know-about-aws-iot
https://www.youtube.com/watch?v=OvoIh9ENxdM
81.
84
参考資料 – re:Invent 2015(中級)
(MBL302)Build Scalable, Serverless Mobile & IoT Back Ends with AWS Lambda
http://www.slideshare.net/AmazonWebServices/mbl302-scalable-serverless-mobile-iot-backendsporate-it-into-a-consumerfacing-device
https://www.youtube.com/watch?v=GnaO-LwdSuU
(MBL303)Build Mobile Apps for IoT Devices and IoT Apps for Mobile Devices
http://www.slideshare.net/AmazonWebServices/mbl303-build-mobile-apps-for-iot-devices-and-iot-apps-for-devices
https://www.youtube.com/watch?v=lUXFVJbDtUY
(MBL305)You Have the Data from Your Devices – Now What?
http://www.slideshare.net/AmazonWebServices/mbl305-you-have-data-from-the-devices-now-what-getting-the-value-of-the-iot
https://www.youtube.com/watch?v=2LHsfmfKLL0
(MBL311)Securey Thinging Across the Internet With AWS
http://www.slideshare.net/AmazonWebServices/mbl311-new-aws-iot-securely-building-provisioning-using-things
https://www.youtube.com/watch?v=G-kJxzd_NA8
(MBL312)AWS IoT Deep Dive – Programming the Physical World with Shadows and Rules
http://www.slideshare.net/AmazonWebServices/mbl312-new-aws-iot-programming-a-physical-world-w-shadows-rules
(MBL313)Understanding Hardware Platforms, Devices SDKs and Protocols
http://www.slideshare.net/AmazonWebServices/mbl313-new-aws-iot-understanding-hardware-kits-sdks-protocols
https://www.youtube.com/watch?v=rMiplPiU2nI