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
Aizu.go
Search
Yamashou
July 22, 2017
0
67
Aizu.go
ELM&serverless
Yamashou
July 22, 2017
Tweet
Share
More Decks by Yamashou
See All by Yamashou
Go Tensorflow 思ってたこと
yamashou
0
200
Spring LT in Aizu
yamashou
0
79
学生版GoConを開催したい
yamashou
0
2.4k
会津でGo
yamashou
0
2.6k
Aizu.go second
yamashou
0
360
Go ELM
yamashou
0
140
open app lab kick off meeting 2017
yamashou
0
140
manifes2017
yamashou
1
77
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Writing Fast Ruby
sferik
628
61k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Become a Pro
speakerdeck
PRO
28
5.4k
Gamification - CAS2011
davidbonilla
81
5.3k
RailsConf 2023
tenderlove
30
1.1k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
4 Signs Your Business is Dying
shpigford
184
22k
For a Future-Friendly Web
brad_frost
179
9.8k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
930
Transcript
Aizu.go ࢁຊଠ
ࣗݾհ ࢁຊଠ Yamashou ֶ෦3 σβΠχϜ ৭ʑͬͯ·͢
ࠓ·ͰGoͰ CLI api ࡞ʢझຯʣ εΫϨΠϐϯά Bot
͏ͪΐͬͱผͷ ͜ͱͬͯΈΑ
Go ݴޠʹΑΔELM • ػցֶश (ELM = Extreme Learning Machine) •
ಈػɿݚڀͰઌഐํ͕͍ͬͯΔ
ELMͱʁ • Extreme Learning Machine • ߴͳػցֶशΞϧΰϦζϜ (DeeplearningͷਅٯͱݴΘΕ͍ͯΔ) • ؆୯ͳ࣮
https:/ /tech.d-itlab.co.jp/ml/229/
͕ͩ…
ೋिؒલ Ұिؒલ ࡾલ ࠓ MLΖʙ &-.
ཁҼ ٖࣅٯߦྻੜ ͦͦͷߦྻԋࢉ͕͠ΜͲ͍ (github.com/gonum/matrix) ͋ͱ͏গ͠ʂͩͱࢥͬͯ͠·ͬͨ
͓ئ͍ ٖࣅٯߦྻΛٻΊΔϥΠϒϥϦ͋ͬͨΒ ڭ͍͑ͯͩ͘͞ʂʂʂ
͋ͱ͏গ͠ʂ
ͳͷͰͳΜͱ͔͢Δ
όΠτͰGo
ͳͥʁ
ࣗ ࣾһ͞Μ XX࡞ͬͯ ͳΒpython͕͍ ͍͔Ͱ͢Ͷ JSͰ͓ئ͍ Ұճ࡞ͬͨ͜ͱ͋ ΔGo͕͍͍Ͱ͢ OO࡞ͬͯʂ ૣٸʹ
ྃղͰ͢ʂ JSͰ͓ئ͍ ྃղͰ͢ʂ ZZ͓ئ͍Ͱ͖ Δʁ ྃղͰ͢ʂ JSͰ͢Ͷʂ
ཧ༝ AWS LambdaΛओʹ༻ ͕ࣗఏࣔ͢Δݴޠ͕ࣾһ͞ΜಡΊ ͳ͍͔Β ͲΜͳ࣌ͰΘΓͱແཧཧjs͕ଟ͍
AWS Lambda&API GatewayͰαʔόʔϨ εΞϓϦέʔγϣϯΛߏங͢Δπʔϧ ˞αʔόʔϨεΞʔΩςΫνϟ ϝϯςφϯεΛؾʹ͠ͳ͍ʰඇৗறܕϓϩηεʱΛΠϕϯτΛτϦΨʔ ʹ͢ΔΠϯϑϥετϥΫνϟͩͱࢥͬͯ·͢ https:/ /github.com/serverless
ͱ͍͏͜ͱͰ
ແཧཧʹ߅ ͍ͨ͠ʂ
ࢼͨ͠ͷ Apex eawsy serverless-go
Apex lambdaϏϧυ&σϓϩΠΛ؆୯ʹͰ͖Δʂ Node.js Go Python Java Rust Clojure ެࣜʹରԠ͍ͯ͠ͳ͍ͷରԠʂ http:/
/apex.run/
όΠφϦ
eawsy GoΛlambda্Ͱ࣮ߦͰ͖ΔΑ͏ʹ͢Δ جຊతʹΕΔ͜ͱApexมΘΒͳ͍ make࣮ߦ https:/ /github.com/eawsy
cgoڥ shared library zip http:/ /tdoc.info/blog/2016/11/02/eawsy_lambda.html GO C֦ு
͍͍ͱ͜Ζ ApexɿCLI͔ͩΒ࡞ɾσϓϩΠɾ࣮ߦ؆୯ eawsyɿlog͕ग़ͤΔʂɾॻ͚ͩ͘ʂɾϑϨʔϜϫʔΫରԠ
ඍົͳͱ͜Ζ Apexɿapigateway͕खಈʁ eawsyɿzipͷޙखಈʁ
eawsyਐԽ͢Δʂ
serverless-go eawasy ͷ֦ு serverless͛Δʂ
cgoڥ shared library http:/ /tdoc.info/blog/2016/11/02/eawsy_lambda.html ➕
͍͍ͱ͜Ζ makeͰserverlessͰdeploy·Ͱ ॻ͖ํී௨ͷgoͬΆ͍ʂ
eawasy Apex python ̍ճ 0.02s 0.11s 0.02s ̎ճ 0.02s 0.12s
0.02s ̏ճ 0.02s 0.09s 0.02s αΠζ 3.3MB 799.3kB 354bytes
ൺֱ Apexͷ͕Bbild͕ૣ͍ eawsyͷ͕Ϩεϙϯεૣ͍ αΠζͬͺΓຊՈ͕͍͍ײ͡
͜Ε͔Β ELMΛࢦ͢ʂʂʂʂ lambdaͰgoҰԠόΠτઌͰใࠂ͠ ͯΈΑ͏͔ͳ