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
NilAway による静的解析で「10 億ドル」を節約する #kyotogo / Kyoto Go 56th
ytaka23
3
380
終了の危機にあった15年続くWebサービスを全力で存続させる - phpcon2024
yositosi
2
2.4k
どちらを使う?GitHub or Azure DevOps Ver. 24H2
kkamegawa
0
720
podman_update_2024-12
orimanabu
1
270
サービスでLLMを採用したばっかりに振り回され続けたこの一年のあれやこれや
segavvy
2
410
kargoの魅力について伝える
magisystem0408
0
200
権威ドキュメントで振り返る2024 #年忘れセキュリティ2024
hirotomotaguchi
2
740
Oracle Cloudの生成AIサービスって実際どこまで使えるの? エンジニア目線で試してみた
minorun365
PRO
4
280
PHPからGoへのマイグレーション for DMMアフィリエイト
yabakokobayashi
1
170
Amazon Kendra GenAI Index 登場でどう変わる? 評価から学ぶ最適なRAG構成
naoki_0531
0
110
コンテナセキュリティのためのLandlock入門
nullpo_head
2
320
複雑性の高いオブジェクト編集に向き合う: プラガブルなReactフォーム設計
righttouch
PRO
0
110
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
95
5.2k
Unsuck your backbone
ammeep
669
57k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
290
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Six Lessons from altMBA
skipperchong
27
3.5k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Docker and Python
trallard
42
3.1k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
The Language of Interfaces
destraynor
154
24k
KATA
mclloyd
29
14k
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