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
68
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
80
学生版GoConを開催したい
yamashou
0
2.4k
会津でGo
yamashou
0
2.6k
Aizu.go second
yamashou
0
370
Go ELM
yamashou
0
140
open app lab kick off meeting 2017
yamashou
0
140
manifes2017
yamashou
1
77
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
139
34k
The Pragmatic Product Professional
lauravandoore
36
6.8k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.2k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Done Done
chrislema
185
16k
Optimizing for Happiness
mojombo
379
70k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Bash Introduction
62gerente
614
210k
How GitHub (no longer) Works
holman
314
140k
What's in a price? How to price your products and services
michaelherold
246
12k
It's Worth the Effort
3n
185
28k
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ҰԠόΠτઌͰใࠂ͠ ͯΈΑ͏͔ͳ