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
62
Aizu.go
ELM&serverless
Yamashou
July 22, 2017
Tweet
Share
More Decks by Yamashou
See All by Yamashou
Go Tensorflow 思ってたこと
yamashou
0
190
Spring LT in Aizu
yamashou
0
76
学生版GoConを開催したい
yamashou
0
2.3k
会津でGo
yamashou
0
2.6k
Aizu.go second
yamashou
0
340
Go ELM
yamashou
0
130
open app lab kick off meeting 2017
yamashou
0
130
manifes2017
yamashou
1
74
Featured
See All Featured
Ruby is Unlike a Banana
tanoku
96
11k
Docker and Python
trallard
40
3.1k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Music & Morning Musume
bryan
46
6.1k
Teambox: Starting and Learning
jrom
132
8.7k
It's Worth the Effort
3n
183
27k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
46
2.1k
Thoughts on Productivity
jonyablonski
67
4.3k
Building Adaptive Systems
keathley
38
2.2k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
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ҰԠόΠτઌͰใࠂ͠ ͯΈΑ͏͔ͳ