Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
IoTをServerless風にテストしたい!
Search
Keita Mohri
August 22, 2018
Technology
1
1.5k
IoTをServerless風にテストしたい!
Serverless Meetup Fukuoka #2
Keita Mohri
August 22, 2018
Tweet
Share
More Decks by Keita Mohri
See All by Keita Mohri
Excelを扱うRubyGemまとめ 2022
ktam1219
0
540
モクえもんのお時間です
ktam1219
0
160
在宅ワーク中だけど会社にしかGPSマルチユニットがない?でも大丈夫!そう、mockmockがあればね。
ktam1219
0
380
IoTデバイスの疑似データ送信システムにおける サーバーレスなログ処理機構の試行錯誤
ktam1219
0
530
実写版モクえもん in Explorer ~愛・おぼえていますか~
ktam1219
0
290
エンジニアのおしごと
ktam1219
0
110
mockmockの大量のログをいい感じに捌きたい
ktam1219
0
960
Goで作る大量プロセス管理機構
ktam1219
2
3.3k
わりとゴツいKubernetesハンズオン そのあとに
ktam1219
0
580
Other Decks in Technology
See All in Technology
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
Exadata Database Service on Dedicated Infrastructure(ExaDB-D) UI スクリーン・キャプチャ集
oracle4engineer
PRO
2
3.2k
アプリエンジニアのためのGraphQL入門.pdf
spycwolf
0
100
Platform Engineering for Software Developers and Architects
syntasso
1
520
Application Development WG Intro at AppDeveloperCon
salaboy
0
190
Lambda10周年!Lambdaは何をもたらしたか
smt7174
2
110
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
190
FlutterアプリにおけるSLI/SLOを用いたユーザー体験の可視化と計測基盤構築
ostk0069
0
100
インフラとバックエンドとフロントエンドをくまなく調べて遅いアプリを早くした件
tubone24
1
430
AWS Media Services 最新サービスアップデート 2024
eijikominami
0
200
Amazon CloudWatch Network Monitor のススメ
yuki_ink
1
210
SREが投資するAIOps ~ペアーズにおけるLLM for Developerへの取り組み~
takumiogawa
1
430
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Designing for humans not robots
tammielis
250
25k
Site-Speed That Sticks
csswizardry
0
28
Designing Experiences People Love
moore
138
23k
Thoughts on Productivity
jonyablonski
67
4.3k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Navigating Team Friction
lara
183
14k
Automating Front-end Workflow
addyosmani
1366
200k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Transcript
*P5Λ 4FSWFSMFTT෩ʹςετ͍ͨ͠ʂ ໟརܒଠ 4FSWFSMFTT.FFUVQ'VLVPLB
ࣗݾհ ໟརܒଠʢ͏Γ͚͍ͨʣ 'VTJD$P -UE ൃҊऀϓϩμΫτΦʔφʔ *P5ܥͷडୗҊ݅
લ৬ ༯ոͱ͔Ͱ༗໊ͳ ήʔϜձࣾ
ࣗݾհ IUUQTRJJUBDPN,UB.JUFNTBGBBCC IUUQTHJUIVCDPN,UB.[BSV ϝʔϧʹύεϫʔυ͖[JQΛఴͯ͠ʮύεϫʔυผ్͓ૹΓ͍ͨ͠·͢ʯ ͱ͢Δ׳श͕ΊΜͲ͍͘͞ͷͰͳΜͱ͔ͨ͠ 4FSWFSMFTTతͳաڈ࡞
ຊͷ͓ ‣ *P5ͱ4FSWFSMFTT ‣ *P5ͱςετ ‣ *P5ͱ4FSWFSMFTTͱςετͱ
*P5ͱ4FSWFSMFTT
*P5ݩ *P5ݩɹ *P5ݩɹ *P5ݩɹ *P5ݩɹ ݕࡧ ݕࡧ ݕࡧ ݕࡧ
*P5ݩ *P5ݩɹ ݕࡧ ͳ͠ ‣ ͕࣌ਐΈ࢝Ί͍ͯΔ ‣ *P5ͷ͍߹Θͤ૿͖͑ͯͨ ‣ 1P$͔Βຊ։ൃͷҠߦ૿͖͑ͯͨ
‣ େنͳ*P5։ൃ͕૿͖͍͑ͯͯΔʂ
4FSWFSMFTTͰ͋ͬͯ͘Ε ࠓͲ͖4FSWFSMFTT͡Όͳ͍ͱ ࢮΜͰ͠·͏ Backend Sensor/Device
͠4FSWFSNPSF ͩͬͨΒʜ Backend Sensor/Device ো͕ى͖ͨΑʂ PS ϝϯςͯ͠Ͷʂ
͠4FSWFSNPSF ͩͬͨΒʜ Backend Sensor/Device ແ࣊൵ʹσʔλΛ ૹΓଓ͚ΔΑʂ ো͕ى͖ͨΑʂ PS ϝϯςͯ͠Ͷʂ
͠4FSWFSNPSF ͩͬͨΒʜ Backend Sensor/Device ແ࣊൵ʹσʔλΛ ૹΓଓ͚ΔΑʂ ো͕ى͖ͨΑʂ PS ϝϯςͯ͠Ͷʂ
োϝϯςʹରͯ͠ແ࣊൵
͠4FSWFSNPSF ͩͬͨΒʜ Backend Sensor/Device Ұؾʹ ૿͢Αʂ
͠4FSWFSNPSF ͩͬͨΒʜ Backend Sensor/Device Ұؾʹ ૿͢Αʂ ࠓௐࢠ͕͍͍͔Β ͨ͘͞ΜૹΔΑʂ
͠4FSWFSNPSF ͩͬͨΒʜ Backend Sensor/Device Ұؾʹ ૿͢Αʂ ࠓௐࢠ͕͍͍͔Β ͨ͘͞ΜૹΔΑʂ ϜϦϜϦϜϦ
͠4FSWFSNPSF ͩͬͨΒʜ Backend Sensor/Device ϜϦϜϦϜϦ ແ࣊൵ʹσʔλΛ ૹΓଓ͚ΔΑʂ
͠4FSWFSNPSF ͩͬͨΒʜ Backend Sensor/Device ϜϦϜϦϜϦ ແ࣊൵ʹσʔλΛ ૹΓଓ͚ΔΑʂ
εέʔϧʹରͯ͠ແ࣊൵
*P5ͷσʔλϩετ͔ͳΓࠔΔ ‣ औΓͤͳ͍ ਓؒ૬खͱҧͬͯʮ͏Ұૹͬͯʯ͕Ͱ͖ͳ͍ ͜ͱ͕ଟ͍ ‣ ࣌ܥྻͰҙຯ͕͋Δ
ͷมಈΛάϥϑͰݟ͔ͨͬͨΓ σʔλʹԠͯ͡εςʔλε͕มΘΔͷͩͬͨΓ ‣ ॏཁͳҙຯΛ࣋ͭσʔλͷ߹ ΞϥʔτͷτϦΨʔʹͳΔΑ͏ͳͷͩͬͨΒେม
*P5ͱ4FSWFSMFTT *P5ͷ൵௧ͳڣͼ োى͖ͳ͍Ͱʂ ͍͍ײ͡ʹεέʔϧͯ͠ʂ ϝϯςདྷͳ͍Ͱʂ
*P5ͱ4FSWFSMFTT *P5ͷ൵௧ͳڣͼ 4FSWFSMFTTͷแ༰ྗ োى͖ͳ͍Ͱʂ ͍͍ײ͡ʹεέʔϧͯ͠ʂ ো ΄΅ ͳ͠ εέʔϧ͕ಘҙ ͳͷ͕ଟ͍
ϝϯςདྷͳ͍Ͱʂ ϝϯς ͨͿΜ ͳ͠
*P5ͱ4FSWFSMFTT *P5ͷ൵௧ͳڣͼ 4FSWFSMFTTͷแ༰ྗ োى͖ͳ͍Ͱʂ ͍͍ײ͡ʹεέʔϧͯ͠ʂ ো ΄΅ ͳ͠ εέʔϧ͕ಘҙ ͳͷ͕ଟ͍
ϝϯςདྷͳ͍Ͱʂ ϝϯς ͨͿΜ ͳ͠
"84ᐌ͘ IUUQTXXXTMJEFTIBSFOFU"NB[PO8FC4FSWJDFT+BQBOBXTCMBDLCFMUPOMJOFTFNJOBSJPU "84#MBDL#FMU0OMJOF4FNJOBS*P5͚࠷৽ΞʔΩςΫνϟύλʔϯ
"[VSFᐌ͘ IUUQTBLBNTJPUSFGBSDIJUFDUVSF "[VSF*P53FGFSFODF"SDIJUFDUVSF(VJEF
($1ᐌ͘ IUUQTXXXZPVUVCFDPNXBUDI WLQ&U92BL "OPWFSWJFXPG$MPVE*P5$PSF (PPHMF*0
ຊͷ͓ ‣ *P5ͱ4FSWFSMFTT *P5ͷ#BDLFOE4FSWFSMFTTͰΩϚϦʂ ‣ *P5ͱςετ ‣ *P5ͱ4FSWFSMFTTͱςετͱ
*P5ͱςετ
*P5ͷςετ͕ΓͮΒ͍ ͪΌΜͱςετ͠Α͏ͱ͢Δͱ ͱͯΓͮΒ͍ Backend Sensor/Device
*P5ͷςετ͕ΓͮΒ͍ σʔλ͕དྷͳ͍ͱಈ͔ͳ͍ Backend Sensor/Device D a t a
*P5ͷςετ͕ΓͮΒ͍ ςετʹඞཁͳσʔλΛ Ͳ͔͜Βௐୡ͠Α͏ʁ Backend Sensor/Device D a t a
*P5ͷςετ͕ΓͮΒ͍ ͦͷ··࣮σόΠε͔Β σʔλΛૹΖ͏ Backend Sensor/Device D a t a
࣮σόΠε͔ΒૹΔ࡞ઓ ‣ ௐୡ ͔ͳΓ͕͔͔࣌ؒΔ ࣗࣾ։ൃ ηϯαʔͷબఆɾઃܭɾ࣮ͳͲ PSطͷߪೖ ‣
ॳظίετ ͋ͨΓͦΕͳΓͷඅ༻͕͔͔Δ ςετతͰ५ʹ༻ҙ͢Δͷඇݱ࣮త ‣ धཁʹԠͨ͡εέʔϧ ͪΖΜ͠ͳ͍
͓ʜ
͜ΕҎલզʑ͕ܾผΛਤͬͨ ʮΦϯϓϨʯతͳͭͰʁ
*P5ͷςετ͕ΓͮΒ͍ ͳΒγϛϡϨʔλʔΛ࡞ͬͯ ૹͬͯ͋͛Α͏ Backend Simulator D a t a
γϛϡϨʔλʔ͔ΒૹΔ࡞ઓ ‣ αʔόʔͷ͓ੈ Ͳ͔͜͠Βͷαʔόʔ খنͳΒϩʔΧϧʁ ͔ΒૹΒͳ͚Ε αʔόʔͷઃఆͱ͔͍Ζ͍Ζେม ‣
ΖΖಠ࣮ࣗ #BDLFOEͷଓɾೝূ ૹΔσʔλͷதσόΠεͷঢ়ଶભҠ੍ޚ Քಇঢ়گͷࢹ େྔՔಇ࣌ͷεέʔϧ ‣ ςετ༻σʔλ͕ཉ͍͚ͩ͠ͳͷʹ࡞ۀྔ͕ଟ͗͢Δ
͓ʜ
͜ΕҎલզʑ͕ܾผΛਤͬͨ ʮαʔόʔʯతͳͭͰʁ
4FSWFSMFTTతʹղܾ͠Α͏ σόΠεͷ'VODUJPOBM4BB4 Ͱ͖ͳ͍ͷ͔ʜ Backend Functional Saas? D a t a
͜Μͳײ͡ ‣ ඞཁͳͱ͖ʹ͙͢ʹௐୡͰ͖Δ ‣ αʔόʔͷଘࡏΛҙࣝͤͣʹඞཁͳ͚ͩՔಇͰ͖Δ ‣ ඞཁͳσʔλΛૹΔ͜ͱ͚ͩʹूதͰ͖Δ ‣ ϓϩάϥϜͰىಈఀࢭ੍͕ޚͰ͖Δ
ຊͷ͓ ‣ *P5ͱ4FSWFSMFTT *P5ͷ#BDLFOE4FSWFSMFTTͰΩϚϦʂ ‣ *P5ͱςετ ී௨ʹΔͱπϥ͍ɻ'VODUJPOBM4BB4ͳσόΠε͕΄͍͠ʂ ‣
*P5ͱ4FSWFSMFTTͱςετͱ
*P5ͱ4FSWFSMFTTͱςετͱ
*P5ςετ༻ԾσόΠε࡞αʔϏε ੈքॳʂ
NPDLNPDLͱʁ σόΠεʹΘͬͯ ςετ༻σʔλΛૹΔԾσόΠε Backend D a t a
ಈ࡞֓ཁ Backend ίϯιʔϧͰઃఆΛߦͳ͏ σʔλૹ৴ઌ ϓϩτίϧ σʔλੜํ๏ͷઃఆ
ঢ়ଶભҠͷઃఆ FUDʜ
ಈ࡞֓ཁ Backend NPDLΛͭ͘Δ
ಈ࡞֓ཁ Backend D a t a NPDLΛಈ͔͢
None
ରԠϓϩτίϧɾ࿈ܞαʔϏε ɹϓϥοτϑΥʔϜ ɹαʔϏε ɹϓϩτίϧ ɹಠࣗαʔόʔ ɹ ɹ)551)5514 ɹ.255.2554 ɹ"NB[PO8FC4FSWJDFT ɹɹɹ"84*P5$PSF
ɹ)5514.2554 ɹɹɹ"NB[PO,JOFTJT%BUB4USFBNT ɹ ɹ(PPHMF$MPVE1MBUGPSN ɹɹɹ$MPVE*P5$PSF ɹ.2554 ɹ.JDSPTPGU"[VSF ɹɹɹ"[VSF*P5)VC ɹ.2554 ".214 ɹ403"$0. ɹɹɹ403"$0.1MBUGPSN ɹɹɹ#FBN'VOOFM)BSWFTU ۙϦϦʔε ɹ ɹͦͷଞ ɹ͓ؾܰʹ͝૬ஊ͍ͩ͘͞
ରԠϓϩτίϧɾ࿈ܞαʔϏε ɹϓϥοτϑΥʔϜ ɹαʔϏε ɹϓϩτίϧ ɹಠࣗαʔόʔ ɹ ɹ)551)5514 ɹ.255.2554 ɹ"NB[PO8FC4FSWJDFT ɹɹɹ"84*P5$PSF
ɹ)5514.2554 ɹɹɹ"NB[PO,JOFTJT%BUB4USFBNT ɹ ɹ(PPHMF$MPVE1MBUGPSN ɹɹɹ$MPVE*P5$PSF ɹ.2554 ɹ.JDSPTPGU"[VSF ɹɹɹ"[VSF*P5)VC ɹ.2554 ".214 ɹ403"$0. ɹɹɹ403"$0.1MBUGPSN ɹɹɹ#FBN'VOOFM)BSWFTU ۙϦϦʔε ɹ ɹͦͷଞ ɹ͓ؾܰʹ͝૬ஊ͍ͩ͘͞ 4FSWFSMFTTͳ*P5#BDLFOEʹରԠʂ
"MM4FSWFSMFTT Backend D a t a 'VODUJPOBM4BB4 'VODUJPOBM4BB4 'BB4
͜͜·Ͱ͘Ε *P5ͷ&&ςετ͕ $*ͰͰ͖Δʂ
"84ͰͬͯΈͨ Thermometer Amazon Kinesis Data Streams AWS Lambda Amazon DynamoDB
{ "serial_number": "mk-00001", "timestamp": "2018-08-21T07:09:05Z", "temperatures": [ "22.8", "21.9" ] } ఆظతʹσʔλऔಘ ݅ͣͭ1VU |serial_number|timestamp |temperature01|temperature02|created_at | |-------------|-------------------|-------------|-------------|-------------------| |mk-00001 |2018/08/21 07:09:05|23.8 |25.4 |2018/08/21 07:09:06| |mk-00002 |2018/08/21 07:09:05|23.2 |24.0 |2018/08/21 07:09:06| |mk-00001 |2018/08/21 07:09:15|24.1 |25.6 |2018/08/21 07:09:17| |mk-00002 |2018/08/21 07:09:15|23.8 |24.4 |2018/08/21 07:09:18| |mk-00001 |2018/08/21 07:09:25|24.3 |25.0 |2018/08/21 07:09:26| |mk-00002 |2018/08/21 07:09:25|24.0 |23.9 |2018/08/21 07:09:27| ςετରͷΞϓϦέʔγϣϯ
σϞ
"84ͰͬͯΈͨ ᶃίʔυΛ1VTI
"84ͰͬͯΈͨ ᶃίʔυΛ1VTI ᶄ$*ىಈ
"84ͰͬͯΈͨ AWS Batch ᶃίʔυΛ1VTI ᶄ$*ىಈ ᶅ"84#BUDIͷ +PCΛૹ৴ ཧԼͷίϯϐϡʔςΟϯάڥ &$ ্Ͱ+PCΛ࣮ߦ͢Δ
&$࣮ߦ͢Δ+PCͷྔʹԠͯࣗ͡ಈͰ૿ݮͯ͘͠ΕΔ +PCίϯςφΛ࣮ͬͯߦ͢Δ େʹͬ͘͟Γݴ͑࣌ؒՔಇ͕Մೳͳ-BNCEB
"84ͰͬͯΈͨ AWS Batch EC2 instance ᶃίʔυΛ1VTI ᶄ$*ىಈ ᶅ"84#BUDIͷ +PCΛૹ৴ ᶆίϯϐϡʔςΟϯά
ڥ࡞
"84ͰͬͯΈͨ AWS Batch EC2 instance Amazon ECR Container ᶃίʔυΛ1VTI ᶄ$*ىಈ
ᶅ"84#BUDIͷ +PCΛૹ৴ ᶆίϯϐϡʔςΟϯά ڥ࡞ ᶇίϯςφىಈ
"84ͰͬͯΈͨ EC2 instance Container ᶈ$MPOF AWS SAM Test Script #!/bin/bash
git clone $CODE_REPO $CODE_DIR cd $CODE_DIR sh test/batch/run.sh
"84ͰͬͯΈͨ EC2 instance Container ᶈ$MPOF AWS SAM Test Script Amazon
Kinesis Data Streams AWS Lambda Amazon DynamoDB ᶉ%FQMPZ #!/bin/bash git clone $CODE_REPO $CODE_DIR cd $CODE_DIR sh test/batch/run.sh Cloudformation Stack
"84ͰͬͯΈͨ EC2 instance Container ᶈ$MPOF AWS SAM Test Script Amazon
Kinesis Data Streams AWS Lambda Amazon DynamoDB ᶉ%FQMPZ #!/bin/bash git clone $CODE_REPO $CODE_DIR cd $CODE_DIR sh test/batch/run.sh ᶊNPDLىಈ"1* Cloudformation Stack
"84ͰͬͯΈͨ EC2 instance Container ᶈ$MPOF AWS SAM Test Script Amazon
Kinesis Data Streams AWS Lambda Amazon DynamoDB ᶉ%FQMPZ #!/bin/bash git clone $CODE_REPO $CODE_DIR cd $CODE_DIR sh test/batch/run.sh ᶊNPDLىಈ"1* ᶋςετσʔλૹ৴ Cloudformation Stack
"84ͰͬͯΈͨ EC2 instance Container AWS SAM Test Script Amazon Kinesis
Data Streams AWS Lambda Amazon DynamoDB ᶌͨ·ͬͨσʔλΛूܭ Cloudformation Stack
"84ͰͬͯΈͨ EC2 instance Container AWS SAM Test Script Amazon Kinesis
Data Streams AWS Lambda Amazon DynamoDB ᶌͨ·ͬͨσʔλΛूܭ ᶍ4MBDLʹ݁ՌΛ௨ Cloudformation Stack
"84ͰͬͯΈͨ EC2 instance Container AWS SAM Test Script Amazon Kinesis
Data Streams AWS Lambda Amazon DynamoDB ᶌͨ·ͬͨσʔλΛूܭ ᶍ4MBDLʹ݁ՌΛ௨ ᶎ4UBDLΛআ Cloudformation Stack
"84ͰͬͯΈͨ EC2 instance Container AWS SAM Test Script Amazon Kinesis
Data Streams AWS Lambda Amazon DynamoDB ᶌͨ·ͬͨσʔλΛूܭ ᶍ4MBDLʹ݁ՌΛ௨ ᶎ4UBDLΛআ Cloudformation Stack ᶏ$POUBJOFSऴྃ
"84ͰͬͯΈͨ EC2 instance Container AWS SAM Test Script Amazon Kinesis
Data Streams AWS Lambda Amazon DynamoDB ᶌͨ·ͬͨσʔλΛूܭ ᶍ4MBDLʹ݁ՌΛ௨ ᶎ4UBDLΛআ Cloudformation Stack ᶏ$POUBJOFSऴྃ ᶐίϯϐϡʔςΟϯάڥআ
"84ͰͬͯΈͨ ‣ ຊ൪ڥͱશ͘ಉ͡ڥͰςετ͕Ͱ͖Δ ‣ ςετڥཱ͕ͭͷςετͷͱ͖͚ͩ ‣ "84#BUDIΛ͍ͬͯΔͷͰ$JSDMF$*͙͢ʹख์ͤΔ ࣌ؒɺɺिؒ୯ҐͷΤΠδϯάςετͰݱ࣮తʹՄೳ
ຊͷ͓ ‣ *P5ͱ4FSWFSMFTT *P5ͷ#BDLFOE4FSWFSMFTTͰΩϚϦʂ ‣ *P5ͱςετ ී௨ʹΔͱπϥ͍ɻ'VODUJPOBM4BB4ͳσόΠε͕΄͍͠ʂ ‣
*P5ͱ4FSWFSMFTTͱςετͱ Λ͏͜ͱͰ"MM4FSWFSMFTTʹʂ$*ճͤΔʂʂ
ͷ͜Ε͔Β ‣ ͱΓ͋͑ͣ"1*ΛϦϦʔε͢Δ ϦϦʔεͨ͠Βࠓճͷ$*͕Ͱ͖·͢ ‣ ૹ৴ͨ͠σʔλΛऔಘͰ͖ΔΑ͏ʹ͢Δʂ ཷ·ͬͨσʔλͱಥ͖߹ΘͤͨΓͰ͖ͯɺςετͷ෯͕͕Δ
·ͱΊ
ຊͷ͓ ‣ *P5ͷ#BDLFOE4FSWFSMFTT͕ελϯμʔυ ‣ *P5ͷςετී௨ʹΔͱπϥ͍ ‣ Λ͏͜ͱͰ"MM4FSWFSMFTTͰςετ͕Մೳʹ ‣ ͦͷ͍ʹͬͯ$*ճͨ͠ʂ
͝ਗ਼ௌ͋Γ͕ͱ͏ ͍͟͝·ͨ͠ʂ IUUQTNPDLNPDLDPNKB