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
550
モクえもんのお時間です
ktam1219
0
160
在宅ワーク中だけど会社にしかGPSマルチユニットがない?でも大丈夫!そう、mockmockがあればね。
ktam1219
0
380
IoTデバイスの疑似データ送信システムにおける サーバーレスなログ処理機構の試行錯誤
ktam1219
0
540
実写版モクえもん in Explorer ~愛・おぼえていますか~
ktam1219
0
290
エンジニアのおしごと
ktam1219
0
120
mockmockの大量のログをいい感じに捌きたい
ktam1219
0
970
Goで作る大量プロセス管理機構
ktam1219
2
3.3k
わりとゴツいKubernetesハンズオン そのあとに
ktam1219
0
590
Other Decks in Technology
See All in Technology
成果を出しながら成長する、アウトプット駆動のキャッチアップ術 / Output-driven catch-up techniques to grow while producing results
aiandrox
0
360
C++26 エラー性動作
faithandbrave
2
790
株式会社ログラス − エンジニア向け会社説明資料 / Loglass Comapany Deck for Engineer
loglass2019
3
32k
20241220_S3 tablesの使い方を検証してみた
handy
4
640
Oracle Cloudの生成AIサービスって実際どこまで使えるの? エンジニア目線で試してみた
minorun365
PRO
4
290
なぜCodeceptJSを選んだか
goataka
0
160
ゼロから創る横断SREチーム 挑戦と進化の軌跡
rvirus0817
2
270
社外コミュニティで学び社内に活かす共に学ぶプロジェクトの実践/backlogworld2024
nishiuma
0
270
フロントエンド設計にモブ設計を導入してみた / 20241212_cloudsign_TechFrontMeetup
bengo4com
0
1.9k
1等無人航空機操縦士一発試験 合格までの道のり ドローンミートアップ@大阪 2024/12/18
excdinc
0
170
NilAway による静的解析で「10 億ドル」を節約する #kyotogo / Kyoto Go 56th
ytaka23
3
380
新機能VPCリソースエンドポイント機能検証から得られた考察
duelist2020jp
0
230
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Why Our Code Smells
bkeepers
PRO
335
57k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Gamification - CAS2011
davidbonilla
80
5.1k
Code Review Best Practice
trishagee
65
17k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
49k
How to Think Like a Performance Engineer
csswizardry
22
1.2k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
GraphQLとの向き合い方2022年版
quramy
44
13k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
2
170
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2k
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