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
Testing 201, or: Great Expectations
jmmastey
38
7.1k
How GitHub (no longer) Works
holman
310
140k
Designing Experiences People Love
moore
138
23k
Music & Morning Musume
bryan
46
6.2k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Optimizing for Happiness
mojombo
376
70k
Fireside Chat
paigeccino
34
3k
Being A Developer After 40
akosma
86
590k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Statistics for Hackers
jakevdp
796
220k
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ҰԠόΠτઌͰใࠂ͠ ͯΈΑ͏͔ͳ