$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
アクアシャッターf IoT異常通報システム開発記 〜 AWSとSORACOMとmockmock
Search
Y_uuu
April 27, 2021
Programming
1
780
アクアシャッターf IoT異常通報システム開発記 〜 AWSとSORACOMとmockmock
2021-04-27(Tue) 19:00〜
Fusic Tech Live Vol.1:AWS 活用事例 にて発表
https://fusic.connpass.com/event/206957/
Y_uuu
April 27, 2021
Tweet
Share
More Decks by Y_uuu
See All by Y_uuu
Porting filesystem-fat to Another Microcontroller: ESP32
yuuu
2
88
Porting PicoRuby to Another Microcontroller: ESP32
yuuu
4
880
RubyKaigi 2025でプロポーザルが初めて採択されるまでにやったこと
yuuu
1
580
地方企業の強みを活かす!AWSを活用したIoTシステムの開発事例とその裏側
yuuu
0
130
あの重機は今どこにある?- 重機管理IoTプロダクトのバックエンドをAWSで構築した話 -
yuuu
0
1k
mruby-esp32におけるペリフェラルAPIの実装検討
yuuu
1
820
育成力 - エンジニアの才能を引き出す環境とチューターの立ち回り -
yuuu
4
4.8k
committee-railsとOpenAPI Generatorでスキーマ駆動なAPI開発をする
yuuu
0
970
mrubyでマイコンの世界に足を踏み入れる
yuuu
2
2.1k
Other Decks in Programming
See All in Programming
React Native New Architecture 移行実践報告
taminif
1
120
[SF Ruby Conf 2025] Rails X
palkan
0
390
複数人でのCLI/Infrastructure as Codeの暮らしを良くする
shmokmt
5
1.8k
WebRTC と Rust と8K 60fps
tnoho
2
1.1k
Google Antigravity and Vibe Coding: Agentic Development Guide
mickey_kubo
2
110
CSC305 Lecture 14
javiergs
PRO
0
330
Duke on CRaC with Jakarta EE
ivargrimstad
0
340
All(?) About Point Sets
hole
0
230
Evolving NEWT’s TypeScript Backend for the AI-Driven Era
xpromx
0
210
【レイトレ合宿11】kagayaki_v4
runningoutrate
0
150
テストやOSS開発に役立つSetup PHP Action
matsuo_atsushi
0
110
Herb to ReActionView: A New Foundation for the View Layer @ San Francisco Ruby Conference 2025
marcoroth
0
210
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
135
9.6k
Music & Morning Musume
bryan
46
7k
Navigating Team Friction
lara
190
16k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.3k
Being A Developer After 40
akosma
91
590k
We Have a Design System, Now What?
morganepeng
54
7.9k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.2k
A Modern Web Designer's Workflow
chriscoyier
697
190k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
990
KATA
mclloyd
PRO
32
15k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.8k
Optimizing for Happiness
mojombo
379
70k
Transcript
ΞΫΞγϟολʔ̵ IoTҟৗ௨ใγεςϜ։ൃه ʙ AWSͱSORACOMͱmockmock 2021-04-27(Tue ) Fusic Tech Live Vol.1ɿAWS
׆༻ࣄྫ ઌਐٕज़෦ IoTνʔϜ Ԭቌ ༤ฏ 1
ࣗݾհ Ԭቌ ༤ฏ Okazaki Yuhei ‣ I D - @yuuu
@Y_uuu ‣ ࣗݾհ • FusicͷIoTΫϥυΤϯδχΞ • ݩɾࠐΈΤϯδχΞ(2018͔ΒWebܥ ) • ࠷ۙͷ͓ࣄઐΒAzure ‣ Skil l 2 image ʘNewʗ
IoTΫϥυΤϯδχΞͷ͓ࣄ 3 ‣ IoT=ITͷ૯߹֨ಆٕ
IoTΫϥυΤϯδχΞͷ͓ࣄ 4 ‣ σόΠεҎ֎ͷ෦(IoTʹ͓͚ΔΫϥυ)ͷ։ൃɾςετɾӡ༻Λ୲
࣍ 5 0. ΞΠεϒϨΠΫ ʙ IoTϓϩμΫτࠓͷΠνΦγ 1. γεςϜ֓ཁ 2. ΞʔΩςΫνϟ
ʙ SORACO M 3. ΞʔΩςΫνϟ ʙ AW S 4. mockmockΛͬͨςετ 5. ·ͱΊ
ΞΠεϒϨΠΫ: IoTϓϩμΫτࠓͷΠνΦγ 6 ‣ εϚϗ͕ʮ伴ʯʹͳΔ ‣ Ոʹۙͮ͘ͱࣗಈղৣɺࣗಈࢪৣ(ΦʔτϩοΫ ) ‣ APIެ։͞Ε͍ͯΔͷͰ͍Ζ͍Ζ༡Δ
ηαϛεϚʔτϩοΫ
ΞΠεϒϨΠΫ: IoTϓϩμΫτࠓͷΠνΦγ 7 ‣ Ո͔ΒΕ͍ͯͯՈͷঢ়ଶ͕Θ͔Δ - ʮ伴ดΊ͚ͨͬʁʯͱෆ҆ʹͳΔ͜ͱ͕ͳ͘ͳͬͨ - Ո͕༧ఆ௨ΓͷߦಈΛ͍ͯ͠Δ͔ɺՄࢹԽ ‣
ԕִʹ͋ΔϞϊͷঢ়ଶΛՄࢹԽ - ҙ֎ͱخ͍͠ - ࠓ͓͢ΔγεςϜʮԕִࢹʯ͕ςʔϚͰ͢ ղৣ࣌ɾࢪৣ࣌ʹεϚϗʹ௨͕དྷΔ
ʘ͔͜͜ΒຊͰ͢ʗ 📣 ΞΫΞγϟολʔ̵ IoTҟৗ௨ใγεςϜ։ൃه 8
1. γεςϜ֓ཁ 9
લఏ: ։ൃʹ͓͚ΔεςʔΫϗϧμʔ 10 ɾγεςϜͷൃݩɺϢʔβʔ ɾSORACOM SIMͷൃɾཧ ɾσόΠεͷઃܭɾ։ൃɾςετ ɾγεςϜͷઃܭɾ։ൃɾςετ ɾAWSͷٻߦ σόΠεൃ
σόΠεೲ γεςϜൃ γεςϜೲ ࿈ܞͯ͠։ൃ
ຊհ͢ΔγεςϜ 11 ΞΫΞγϟολʔ̵ IoTҟৗ௨ใγεςϜ
ΞΫΞγϟολʔ̵ͱ 12 ‣ גࣜձࣾӉࠜమॴ͕ɾൢച ‣ େӍɾߑਫ࣌ʹݐઃඋͷਁਫΛ͙ਫ൘ ‣ ʮ24࣌ؒɺແಈྗɾແૢ࡞ʯΛചΓʹ͍ͯ͠Δ
ΞΫΞγϟολʔ̵ͱ 13
ΞΫΞγϟολʔ̵๊͕͑Δ՝ 14 ‣ ແಈྗɾແૢ࡞ͷͨΊɺಈ࡞ϩά͕Βͳ͍ - ࣮ࡍʹਁਫ͕ൃੜͯ͠ɺ࡞ಈͨ͠ͷ͔Θ͔Βͳ͍ - ൶ʹॏྔ͕͍ͬͯͯɺ࡞ಈෆೳʹͳ͍ͬͯͯؾ͔ͳ͍
IoTҟৗ௨ใγεςϜͷػೳ༷ 15 ‣ ʹσόΠε(+ηϯαʔ)Λޙ͢Δ͜ͱͰɺ ൶ىཱɾ൶෬ͱ͍ͬͨঢ়ଶΛγεςϜ্Ͱ֬ೝͰ͖ΔΑ͏ʹ͢Δ ‣ ͕࡞ಈͨ͜͠ͱΛࢦఆͨ͠Ѽઌ௨͢Δ ‣ σόΠεͷࢮ׆ࢹΛ͢Δ
શମΞʔΩςΫνϟ 16
2. ΞʔΩςΫνϟ ʙ SORACOM 17
SORACOMΛ࠾༻ͨ͠ཧ༝ 18 ‣ SIMΛ͏͜ͱͰ֎Ͱͷ௨৴Λ࣮ݱ ‣ SIMΛ1ຕ͔ΒൃՄೳ ‣ σόΠεͱΫϥυ͕γʔϜϨεʹ௨৴Ͱ͖Δ
IoT։ൃʹ͓͚ΔσόΠεͱΫϥυͷΪϟοϓ 19 σόΠε Ϋϥυ ϓϩτίϧ ϑΥʔϚοτ ೝূ ‣ σʔλͷૹड৴ʹؔͯ͠େ͖ͳΪϟοϓ͕͋Δ ϨΠϠͷ͍ϓϩτίϧ
(ྫ: TCP, UDP) ϨΠϠͷߴ͍ϓϩτίϧ (ྫ: HTTPS, MQTTS) όΠφϦͰߏԽͨ͠ σʔλ͕ѻ͍͍͢ ςΩετԽ͞Εͨσʔλ͕ ѻ͍͍͢(ྫ: JSON) ߴͳೝূίετ͕͔͔Δ ෆਖ਼ͳσόΠε͔Βͷ ΞΫηεΛ͙ͨΊೝূ͕ඞཁ
όΠφϦύʔαʔ+FunnelͰΪϟοϓΛຒΊΔ 20 ‣ ϓϩτίϧ: TCP→HTTPSʹม ‣ ϑΥʔϚοτ: όΠφϦˠJSONʹม ‣ IoT
CoreͷೝূFunnelͰҰݩԽ
όΠφϦύʔαʔ+FunnelͰΪϟοϓΛຒΊΔ 21 ‣ ϓϩτίϧ: TCP→HTTPSʹม ‣ ϑΥʔϚοτ: όΠφϦˠJSONʹม ‣ IoT
CoreͷೝূFunnelͰҰݩԽ ‣ σόΠεɾΫϥυͦΕͧΕ։ൃ͍͢͠
3. ΞʔΩςΫνϟ ʙ AWS 22
AWS 23 ‣ IoT Core͕ड৴ͨ͠σʔλΛSQSPU T
AWS 24 ‣ Webଆࢸͬͯී௨ͷWebγεςϜ
AWS 25 ‣ Worker͕SQS͔ΒGE T ‣ RDS֨ೲ ‣ ඞཁʹԠͯ͡ϝʔϧ௨(SES)
SQSΛͬͯσʔλΛEC2Ͱॲཧ 26 ‣ SQS→EC2Α͋͘Δઃܭ ‣ SQSͷલஈʹSNSΛڬΉͱ͜Ζ͕ϙΠϯτ - SQS͕σόοά͠ʹ͍͘ͷͰSNSΛڬΉ͜ͱͰɺσʔλͷ֬ೝΛ༰қʹ͢Δ - SQSҎ֎ͷૹ৴ઌ͕ඞཁʹͳͬͨͱ͖ʹରԠ͍͢͠
SQSΛͬͯσʔλΛEC2→RDSʹ֨ೲ 27 ‣ ࠓͳΒEvent BridgeΛͬͨํ͕ྑͦ͞͏ʁ - IoT Core→Event Bridge͕ະରԠ -
SNSΛڬΜͩσʔλૹ৴·ͩ·ͩ༗ޮ(ࠓޙʹظ)
αʔόϨεΞʔΩςΫνϟˠIaaSΞϯνύλʔϯʁ 28 ‣ ඞͣͦ͠͏ͱݴ͑ͳ͍ɺέʔεόΠέʔε - ϝϦοτ: WebγεςϜ͔ΒΞΫηεɾूܭ͍͢͠ - σϝϦοτ: εέʔϧ͠ʹ͍͘
‣ ࠓճن͕ͦ͜·Ͱେ͖͘ͳ͘ɺٸܹͳεέʔϧͷՄೳੑ͍ͱஅ - σόΠεͷଓ: ͓͓Αͦ100 - ௨৴ස: 1ճ/ɾ
αʔόϨεΞʔΩςΫνϟ+IaaSΞϯνύλʔϯʁ 29 ‣ ࠓͳΒLambda→RDS-Proxyͱ͍͏બࢶΞϦ
αʔόϨεΞʔΩςΫνϟ+IaaSΞϯνύλʔϯʁ 30 ‣ ࠓͳΒLambda→RDS-Proxyͱ͍͏બࢶΞϦ
αʔόϨεΞʔΩςΫνϟ+IaaSΞϯνύλʔϯʁ 31 ‣ ࠓͳΒLambda→RDS-Proxyͱ͍͏બࢶΞϦ
4. mockmockΛͬͨςετ 32
IoTͷςετ͍͠ 33 ‣ ͳΜΒ͔ͷํ๏ͰσʔλΛૹ৴͠ͳ͍ͱɺಈ࡞Λ֬ೝͰ͖ͳ͍ σόΠε͔Βͷ σʔλૹ৴͕ ͯ͢ͷ͡·Γ
ཧܗ: mockmock͕ΘΓʹσʔλΛૹ৴ 34 ಈ࡞Λ֬ೝͰ͖Δ
mockmock 35 ‣ ࣌SORACOM࿈ܞ͕ະϩʔϯν - E2EͰ֬ೝͰ͖ͳ͍ͱ͋·Γҙຯ͕ແ͍ͱߟ͑ͨ ‣ ༧͞ΕΔΫϥυଆͷෛՙ͕খ͍͞ - σόΠε͕গͳ͘ɺૹ৴ස͍ͷͰ
ຊ։ൃͰ͋·Γ׆༻͕Ͱ͖ͳ͔ͬͨ
ݱ࣮: ຊ։ൃͰͷςετ 36 ಈ࡞Λ֬ೝͰ͖Δ ‣ όοΫΤϯυͷςετ SORACOM Funnel͔Βͷ σʔλૹ৴Λٖ(ճ)
ݱ࣮: ຊ։ൃͰͷςετ 37 ‣ όοΫΤϯυͷςετ SORACOM Funnel͔Βͷ σʔλૹ৴Λٖ(ճ) ‣ E2Eςετ
σόΠε͔Βͷσʔλૹ৴ ಈ࡞Λ֬ೝͰ͖Δ
σόΠεͱΫϥυΛଓͨ͠ࡍʹൃੜ 38 ‣ ϝοηʔδΛ࿈ଓૹ৴ͨ͠ࡍͷঢ়ଶભҠʹ͋Γ
σόΠεͱΫϥυΛଓͨ͠ࡍʹൃੜ 39 ‣ ϝοηʔδΛ࿈ଓૹ৴ͨ͠ࡍͷঢ়ଶભҠʹ͋Γ
σόΠεͱΫϥυΛଓͨ͠ࡍʹൃੜ 40 ‣ ϝοηʔδΛ࿈ଓૹ৴ͨ͠ࡍͷঢ়ଶભҠʹ͋Γ
ཧܗ: mockmock͕ΘΓʹσʔλΛૹ৴ 41 ಈ࡞Λ֬ೝͰ͖Δ
ཧܗ: mockmock͕ΘΓʹσʔλΛૹ৴ 42 ಈ࡞Λ֬ೝͰ͖Δ ࠓͳΒΕΔʂ
5. ·ͱΊ 43
·ͱΊ 44 ‣ SORACOM SIMͰσόΠεͱΫϥυΛγʔϜϨεʹଓͰ͖Δ ‣ AWSͰड৴ͨ͠σʔλΛWebΞϓϦʹड͚ͤΔ ‣ mockmockΛ͑σόΠεͱΫϥυΛඇಉظͰ։ൃɾςετͰ͖Δ
45 ͝ਗ਼ௌ͍͖ͨͩ͋Γ͕ͱ͏͍͟͝·ͨ͠ Thank You We are Hiring ! https://recruit.fusic.co.jp/