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
Nim + Cloud Run + TerraformでGCPにNimのサーバーレス環境を作る
Search
regonn
May 04, 2021
Programming
1
630
Nim + Cloud Run + TerraformでGCPにNimのサーバーレス環境を作る
2021/05/04
@nim(ゆるい) LTイベント
regonn
May 04, 2021
Tweet
Share
More Decks by regonn
See All by regonn
Submission with Numerai Compute using GCP Batch
regonn
0
530
HelloMoon x Orca=HelloOrca
regonn
0
120
The Challenge of Automatically Configuring Numerai Compute Environment
regonn
0
89
Federated Learning 連合学習
regonn
4
1.6k
PLATEAUをデータベースに取り込んでみた
regonn
0
1.7k
古参Numerai参加者の戯言
regonn
1
2.4k
S+ Camera Basicと似た環境をラズパイから構築してみる
regonn
0
510
衛星画像のゴルフ場写り込み判定AIモデルを作る
regonn
0
750
データラーニングギルド での活動と今後
regonn
0
160
Other Decks in Programming
See All in Programming
Gleamという選択肢
comamoca
6
730
GoのGenericsによるslice操作との付き合い方
syumai
2
640
実はすごいスピードで進化しているCSS
hayato_yokoyama
0
120
Team topologies and the microservice architecture: a synergistic relationship
cer
PRO
0
750
ドメインモデリングにおける抽象の役割、tagless-finalによるDSL構築、そして型安全な最適化
knih
11
1.9k
アンドパッドの Go 勉強会「 gopher 会」とその内容の紹介
andpad
0
230
Webからモバイルへ Vue.js × Capacitor 活用事例
naokihaba
0
710
セキュリティマネジャー廃止とクラウドネイティブ型サンドボックス活用
kazumura
1
180
コード書くの好きな人向けAIコーディング活用tips #orestudy
77web
3
320
[初登壇@jAZUG]アプリ開発者が気になるGoogleCloud/Azure+wasm/wasi
asaringo
0
130
CSC307 Lecture 17
javiergs
PRO
0
120
Select API from Kotlin Coroutine
jmatsu
1
170
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.8k
Mobile First: as difficult as doing things right
swwweet
223
9.7k
How to Ace a Technical Interview
jacobian
276
23k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.1k
YesSQL, Process and Tooling at Scale
rocio
172
14k
Adopting Sorbet at Scale
ufuk
77
9.4k
What's in a price? How to price your products and services
michaelherold
245
12k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.5k
4 Signs Your Business is Dying
shpigford
184
22k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
4
190
Into the Great Unknown - MozCon
thekraken
39
1.8k
Transcript
れごん 2021/05/04 @nim(ゆるい) LTイベント Nim + Cloud Run + Terraform
で GCP に Nim の サーバーレス環境を作る
Who am I? • れごん(@regonn_haizine) • 2018年に島根県にIターンで移住 • 機械学習系のPodcast ”Regonn&Curry.fm”
やってます
Nimとの出会い Slantという海外のテック系比較 サイトでBest programming languagesで1位になっていた。 (当時はまだ1系リリース前)
今日紹介すること • Nim でサーバーレス環境構築 • Nim • CPU実行時間の従量課金のため処理速度が重要 • Cloud
Run(GCP) • Dockerをデプロイすることで好きな言語で実行可能 • Terraform • インフラ構築がコードで管理可能(Infrastructure as Code)
構成図: 毎日決まった時間に気象庁APIから天気予報を取得してDiscordに投稿 GCP内のインフラ構築はTerraformで管理 天気予報API Container Registry Cloud Run Cloud Scheduler
コード解説 https://github.com/regonn/weather-discord-bot-cloud-run-terraform
コードの応用 • 今回のAPI取得の部分を切り替えることで色々と応用可能 • 普段は仮想通貨の自動売買とかやってます • 自動売買系も高頻度取引の場合等には処理速度が重要 • Nim言語で仮想通貨取引所APIを叩くコードまとめ記事 •
https://note.com/regonn314/n/n62d5adf25308
None