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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
regonn
May 04, 2021
Programming
1
690
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
640
HelloMoon x Orca=HelloOrca
regonn
0
170
The Challenge of Automatically Configuring Numerai Compute Environment
regonn
0
120
Federated Learning 連合学習
regonn
4
1.8k
PLATEAUをデータベースに取り込んでみた
regonn
0
1.8k
古参Numerai参加者の戯言
regonn
1
2.5k
S+ Camera Basicと似た環境をラズパイから構築してみる
regonn
0
550
衛星画像のゴルフ場写り込み判定AIモデルを作る
regonn
0
840
データラーニングギルド での活動と今後
regonn
0
180
Other Decks in Programming
See All in Programming
Ruby and LLM Ecosystem 2nd
koic
1
1k
車輪の再発明をしよう!PHP で実装して学ぶ、Web サーバーの仕組みと HTTP の正体
h1r0
0
120
技術検証結果の整理と解析をAIに任せよう!
keisukeikeda
0
130
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
300
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
670
[PHPerKaigi 2026]PHPerKaigi2025の企画CodeGolfが最高すぎて社内で内製して半年運営して得た内製と運営の知見
ikezoemakoto
0
140
Go 1.26でのsliceのメモリアロケーション最適化 / Go 1.26 リリースパーティ #go126party
mazrean
1
420
AI Assistants for Your Angular Solutions
manfredsteyer
PRO
0
150
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
150
AWS Infrastructure as Code の新機能 2025 総まとめ 〜SA 4人による怒涛のデモ祭り〜
konokenj
10
3.4k
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
270
Redox OS でのネームスペース管理と chroot の実現
isanethen
0
230
Featured
See All Featured
SEO for Brand Visibility & Recognition
aleyda
0
4.4k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
88
Measuring & Analyzing Core Web Vitals
bluesmoon
9
790
Making the Leap to Tech Lead
cromwellryan
135
9.8k
Code Review Best Practice
trishagee
74
20k
The Cult of Friendly URLs
andyhume
79
6.8k
Everyday Curiosity
cassininazir
0
170
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.1k
Building Applications with DynamoDB
mza
96
7k
What's in a price? How to price your products and services
michaelherold
247
13k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
Raft: Consensus for Rubyists
vanstee
141
7.4k
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