Serverless で位置情報を活用する
by
uchimanajet7
Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
ͰҐஔใΛ׆༻͢Δ 4FSWFSMFTT ݄ גࣜձࣾϰΝϧݚڀॴ ాֶ "84Ͱಈ͔͍ͯ͠ΔαʔϏεͷཪଆΛ͍ͯΈΔձˏീԦࢠ
Slide 2
Slide 2 text
2 ͝ҙ ‣ 201603݄28ݱࡏͷใͰ͢ ‣ ࢿྉͷදݱจݴมߋ͞ΕΔՄೳੑ͕͋Γ ·͢ ‣ ݸਓͰͷൃද༻ͳͷͰࠓޙձ͔ࣾΒग़Δਖ਼ࣜ൛ ͱҟͳΔ߹͕͋Γ·͢ ‣ ਖ਼ࣜ൛ͱͷࠩҟ͕͋ͬͨ߹ਖ਼ࣜ൛͕ج४ͱͳ Γ·͢ͷͰྃ͝ঝ͍ͩ͘͞ ‣ ͝ҙݟ࣭͕͋͝Γ·ͨ͠Β͓ؾܰʹ͓͍ ߹Θ͍ͤͩ͘͞
Slide 3
Slide 3 text
3 ࣗݾհ ా ֶʢ͏ͪͩ ·ͳͿʣ uchimanajet7 Spot Instances AWS SDK for Go Support API Gateway
Slide 4
Slide 4 text
4 ձࣾհ ౦ژਿฒ۠ߴԁࣉ2−3−17 1976ʢত51ʣ7݄26 155໊ʢ201510݄1ݱࡏʣ
Slide 5
Slide 5 text
5 ɾαʔϏεհ
Slide 6
Slide 6 text
6 VAL Innovation Camp IUUQTZPVUVCF79)#U-F:M
Slide 7
Slide 7 text
ͰҐஔใΛ׆༻͢Δ l4LZ#SBJOz
Slide 8
Slide 8 text
8 What is SkyBrain ? ‣ Ґஔใͷ׆༻Λతͱͯ͠࡞தͷ IoT ͚αʔϏ ε ‣ ௨৴ϓϥοτϑΥʔϜ SORACOM Air Λར༻ ‣ ػثεϚʔτϑΥϯΛར༻ͯ͠ϓϩτλΠϐϯάத ‣ Ϋϥυڥ AWS Λར༻͠ॊೈ͔ͭ҆ՁͰߏங ‣ S3ɺLambdaɺAPI Gateway ͱ͍ͬͨ AWS ͷϑϧϚ ωʔδυαʔϏεΛੵۃతʹར༻͠ Serverless ʹ ‣ ߏங࣌ؒͷॖͱߏஙޙͷӡ༻ෛ୲ܰݮΛߟ͑ͯϑϧ ϚωʔδυαʔϏεΛར༻
Slide 9
Slide 9 text
9 ࣄྫհ IUUQXXXTMJEFTIBSFOFU403"$0.DPOOFDUFEUTPSBDPNCFBNJPU
Slide 10
Slide 10 text
10 Why is SkyBrain ? ‣ IoT ͚ͱݴͬͯ Things ͍࣋ͬͯͳ͍ ‣ ྻंόεͳͲͷ༌ૹʹؔ͢Δใଟগ͍࣋ͬͯΔ ‣ Trainʢྻंʣ Transportʢ༌ૹʣͳΒ͍ۙྖҬ ‣ ͜ͷྖҬͰ͋Ε͜Ε·Ͱͷݟࢿ࢈Λੜ͔ͨ͠׆༻͕Ͱ͖ ͦ͏ ‣ खܰʹ͑ͯखܰʹΊΒΕΔΫϥυͷߴ͍ΞδϦςΟͦ ͷଞͷྑ͞Λͦͷ··αʔϏεʹ׆͔͍ͨ͠ ‣ ಘҙྖҬͰͷڧΈͱΫϥυɾιϑτΣΞͷڧΈͰطଘͷαʔ ϏεͱͷࠩผԽΛਤΓ͍ͨ ‣ ਤ্ʹϚοϐϯά͢Δ͜ͱҐஔิਖ਼Λߦ͑Δٕज़Λ֫ಘ͠ ͍͖͍ͯͨ
Slide 11
Slide 11 text
11 SkyBrain $PHOJUP +BWB4DSJQU 4%, ,JOFTJT -BNCEB 4 "1*(BUFXBZ 6TFST 403"$0. "JS 403"$0. 'VOOFM -BNCEB
Slide 12
Slide 12 text
12 SkyBrain ‣ Ґஔใσʔλͷੵ SORACOM Funnel or Amazon Kinesis Ͱߦ͏ ‣ Ґஔใσʔλͷ׆༻ʹ͍ͭͯ Amazon API Gateway Λ ར༻ͯ͠ API ܦ༝Ͱߦ͏ ‣ σʔλͷੵͱ׆༻͕؆୯͔ͭ҆શɾ҆Ձʹߦ͑Δ ‣ ΄΅ϦΞϧλΠϜͳσʔλΛ׆༻Ͱ͖ΔΑ͏ʹͳΔ ‣ ϦΞϧλΠϜͳσʔλ͕ՃΘΔ͜ͱͰطଘͷσʔλ API ͕৽ͨͳՁΛ࣋ͭ ‣ Ϣʔβʔʹରͯ͠৽ͨͳՁΛఏڙ͢Δ͜ͱ͕Ͱ͖ΔΑ͏ʹ ͳΔ
Slide 13
Slide 13 text
13 SkyBrain $PHOJUP +BWB4DSJQU 4%, ,JOFTJT -BNCEB 4 "1*(BUFXBZ 6TFST 403"$0. "JS 403"$0. 'VOOFM -BNCEB ੵ
Slide 14
Slide 14 text
14 SkyBrain ‣ ੵʹॳ AWS IoT Λར༻͍ͯͨ͠ ‣ ಛతͳDevice Shadows Pub/Sub ͷSub Λར༻͢Δ Մೳੑ͕͍ ‣ Amazon Kinesis Ͱ༻݅ੑೳඞཁेͦ͏ͩͬͨ ‣ Γͳ͍෦ AWS LambdaͰิ͢Εͳͦ͞͏ ‣ SORACOM ͔Β Funnel ͱ͍͏ศརͳػೳ͕ϦϦʔε͞ Εͨ͜ͱେ͖͍ ‣ SORACOM Funnel ܦ༝Ͱ͋Εೝূ෦Λ͓ͤͰ͖Δ ͷͰؾʹͤͣʹૹ৴͢Δ͜ͱ͕Ͱ͖Δ
Slide 15
Slide 15 text
15 SkyBrain
Slide 16
Slide 16 text
16 SkyBrain ‣ Ґஔใͷऔಘʹ HTML+JavaScript Λར༻ ‣ Geolocation.watchPosition() Λར༻͍ͯ͠Δ ‣ ͜ͷͨΊ Amazon S3 ͷ੩తΣϒαΠτͷϗεςΟϯά͚ͩͰ αʔϏεΛఏڙ͢Δ͜ͱ͕Մೳ ‣ Amazon Kinesis Streams ʹ AWS Lambda ؔΛػೳɾ༻్ผʹ ෳݸՃͯ͋͠Δ ‣ ৽͍͠ػೳ༻్͕Ճʹͳͬͯ͜ͷߏͩͱඞཁʹԠͯ͡ AWS Lambda ؔΛՃ͢Εྑ͍ ‣ AWS Lambda ؔͷϦτϥΠσʔλͷอ࣋ʹؔͯ͠ Amazon Kinesis+AWS Lambda ଆ͕نఆͷൣғͰΧόʔͯ͘͠ΕΔ
Slide 17
Slide 17 text
17 SkyBrain $PHOJUP +BWB4DSJQU 4%, ,JOFTJT -BNCEB 4 "1*(BUFXBZ 6TFST 403"$0. "JS 403"$0. 'VOOFM -BNCEB ׆༻
Slide 18
Slide 18 text
18 SkyBrain ‣ ॳ Amazon API Gateway ͷλΠϜΞτ੍ݶʹΑΓར ༻Ͱ͖Δൣғ͕ݶఆతͩͬͨ ‣ ઌͷΞοϓσʔτʹΑΓλΠϜΞτ੍ݶ͕29ඵ·Ͱ৳ ͼͨͷͰར༻Ͱ͖Δൣғ͕͕ͬͨ ‣ Amazon S3 ʹσʔλΛੵ͢Δஈ֊Ͱ׆༻͢ΔଆΛҙࣝ͠ ͨߏͰੵ͢ΔΑ͏ʹ͍ͯ͠Δ ‣ Amazon API Gateway Λར༻͢Δ͜ͱʹΑΓΩϟογϡͷ ༗ޮԽεϩοτϦϯάͳͲͷػೳ͕ར༻Ͱ͖Δ ‣ ඞཁͳσʔλ͕͋Δ߹ AWS Lambda ؔΛՃ͢Δ͜ ͱͰରԠ͢Δ͜ͱ͕Ͱ͖Δ
Slide 19
Slide 19 text
19 SkyBrain
Slide 20
Slide 20 text
20 SkyBrain ‣ Ґஔใͷ׆༻ɾදࣔʹ HTML+JavaScript Λར༻ ‣ Amazon API Gateway ܦ༝Ͱऔಘͨ͠JSONΛਤαʔϏ ε্ʹදࣔ ‣ Amazon API Gateway ܦ༝Ͱ AWS Lambda ؔΛػೳɾ ༻్ผʹෳݸՃͯ͋͠Δ ‣ ৽͍͠ػೳ༻్͕Ճʹͳͬͯ͜ͷߏͩͱඞཁʹԠ͡ ͯ AWS Lambda ؔΛՃ͢Εྑ͍ ‣ API ͷཧ෦ʹؔͯ͠ Amazon API Gateway ͷػೳͰ ୲อ͞ΕΔͨΊ AWS Lambda ؔͷಈ࡞ʹྗ͢ΕΑ͍
Slide 21
Slide 21 text
·ͱΊ
Slide 22
Slide 22 text
22 ·ͱΊ ‣ SkyBrain Λల։͍ͯ͘͜͠ͱͰϦΞϧλΠϜσʔλΛ औಘɾੵͯ͠ API Ͱ׆༻Ͱ͖ΔΑ͏ʹ͍ͯ͘͠ ‣ ϦΞϧλΠϜσʔλʹΑΓطଘͷ API σʔλʹ৽ͨͳ Ձར༻༻్͕૿͑ΔՄೳੑΛࡧ͢Δ ‣ Serverless ͳߏʹͨ͜͠ͱͰ࡞ͬͨαʔϏεػೳʹ Ϋϥυͷྑ͍ͱ͜Ζ͕ͦͷ··׆͔͍ͤͯΔ ‣ AWS Lambda Λ׆༻͢ΔࡍʹϓϥΨϒϧʹͳΔΑ͏ ʹ Amazon Kinesis Amazon API Gateway ͳͲͷ αʔϏεΛҙࣝͯ͠ར༻ͨ͠ํ͕ྑ͍
Slide 23
Slide 23 text
23 ·ͱΊ ‣ ݱঢ়σϓϩΠࢹपΓ͕࣮͞Ε͍ͯͳ͍ঢ়ଶ ‣ Amazon Kinesis ͷΩϟύγςΟʹؔͯ͠࠷ݶͷߟྀ ͔͍ͯ͠͠ͳ͍ঢ়ଶ ‣ ࣮ࡍʹαʔϏεͱͯ͠ϦϦʔε͢Δࡍʹॏཁͳ෦ ‣ IoT αʔϏε͚ʹϓϩτλΠϐϯάதͳͷͰมԽʹॊ ೈʹରԠ͍ͯ͘͠ ‣ มԽͷରԠՄೳͳͱ͜Ζ͔Βૉૣ͘ΧΠθϯ͍ͯ͘͠ ‣ ݟϊϋ͕ແ͍͜ͱଟ͋͘ΔͷͰͱʹ͔͘ Tryˍ Error Λ܁Γฦ͍ͯ͘͠
Slide 24
Slide 24 text
24 ͓͍߹Θͤ IUUQXXXWBMDPKQDPOUBDU
Slide 25
Slide 25 text
25 Appendix ‣ גࣜձࣾιϥίϜ - https://soracom.jp/ ‣ Cloudcraft - Draw AWS diagrams - https://cloudcraft.co/ ‣ AWS Lambda / Amazon API Gateway Deep Dive - http://www.slideshare.net/keisuke69/aws-lambda- amazon-api-gateway-deep-dive ‣ ΞΠίϯૉࡐμϯϩʔυαΠτʮicooon-monoʯ - http://icooon-mono.com/
Slide 26
Slide 26 text
26 Appendix ‣ גࣜձࣾϰΝϧݚڀॴ - http://www.val.co.jp/ ‣ Ӻ͢ͺ͋ͱϫʔϧυ - https://ekiworld.net/ ‣ Ӻ͢ͺ͋ͱ - YouTube - https://www.youtube.com/channel/ UChsdHb4qHO5eFmSOhl0Udsw ‣ ʮӺ͢ͺ͋ͱʯͷ͋ͨΒ͍͠࿏ઢਤ - http://rosenzu.strikingly.com/
Slide 27
Slide 27 text
27 Appendix ‣ JAWS-UG தԝઢ - http://jaws-ug.jp/bc/chuoline/ ‣ JAWS-UG ژԦઢ - https://jawsug-keioline.doorkeeper.jp/ ‣ uchimanajet7 - Pixelhub.me - http://pixelhub.me/pixelhub1/index.php? user=uchimanajet7