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
650
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
560
HelloMoon x Orca=HelloOrca
regonn
0
140
The Challenge of Automatically Configuring Numerai Compute Environment
regonn
0
96
Federated Learning 連合学習
regonn
4
1.7k
PLATEAUをデータベースに取り込んでみた
regonn
0
1.8k
古参Numerai参加者の戯言
regonn
1
2.4k
S+ Camera Basicと似た環境をラズパイから構築してみる
regonn
0
520
衛星画像のゴルフ場写り込み判定AIモデルを作る
regonn
0
780
データラーニングギルド での活動と今後
regonn
0
170
Other Decks in Programming
See All in Programming
もうちょっといいRubyプロファイラを作りたい (2025)
osyoyu
1
460
Navigation 2 を 3 に移行する(予定)ためにやったこと
yokomii
0
350
そのAPI、誰のため? Androidライブラリ設計における利用者目線の実践テクニック
mkeeda
2
3k
Updates on MLS on Ruby (and maybe more)
sylph01
1
180
CloudflareのChat Agent Starter Kitで簡単!AIチャットボット構築
syumai
2
520
Platformに“ちょうどいい”責務ってどこ? 関心の熱さにあわせて考える、責務分担のプラクティス
estie
1
220
ユーザーも開発者も悩ませない TV アプリ開発 ~Compose の内部実装から学ぶフォーカス制御~
taked137
0
190
基礎から学ぶ大画面対応(Learning Large-Screen Support from the Ground Up)
tomoya0x00
0
4.5k
プロポーザル駆動学習 / Proposal-Driven Learning
mackey0225
2
1.3k
Android 16 × Jetpack Composeで縦書きテキストエディタを作ろう / Vertical Text Editor with Compose on Android 16
cc4966
2
270
複雑なフォームに立ち向かう Next.js の技術選定
macchiitaka
2
250
2025 年のコーディングエージェントの現在地とエンジニアの仕事の変化について
azukiazusa1
24
12k
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
530
Docker and Python
trallard
46
3.6k
Become a Pro
speakerdeck
PRO
29
5.5k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3k
How GitHub (no longer) Works
holman
315
140k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.7k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.6k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Scaling GitHub
holman
463
140k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
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