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
570
HelloMoon x Orca=HelloOrca
regonn
0
140
The Challenge of Automatically Configuring Numerai Compute Environment
regonn
0
97
Federated Learning 連合学習
regonn
4
1.7k
PLATEAUをデータベースに取り込んでみた
regonn
0
1.8k
古参Numerai参加者の戯言
regonn
1
2.5k
S+ Camera Basicと似た環境をラズパイから構築してみる
regonn
0
520
衛星画像のゴルフ場写り込み判定AIモデルを作る
regonn
0
780
データラーニングギルド での活動と今後
regonn
0
170
Other Decks in Programming
See All in Programming
CSC509 Lecture 04
javiergs
PRO
0
300
CSC305 Lecture 04
javiergs
PRO
0
250
ABEMAモバイルアプリが Kotlin Multiplatformと歩んだ5年 ─ 導入と運用、成功と課題 / iOSDC 2025
akkyie
0
330
Your Perfect Project Setup for Angular @BASTA! 2025 in Mainz
manfredsteyer
PRO
0
130
詳しくない分野でのVibe Codingで困ったことと学び/vibe-coding-in-unfamiliar-area
shibayu36
3
4.4k
GraphQL×Railsアプリのデータベース負荷分散 - 月間3,000万人利用サービスを無停止で
koxya
1
1.1k
Serena MCPのすすめ
wadakatu
4
900
XP, Testing and ninja testing ZOZ5
m_seki
2
300
Чего вы не знали о строках в Python – Василий Рябов, PythoNN
sobolevn
0
160
CSC509 Lecture 05
javiergs
PRO
0
300
AIで開発生産性を上げる個人とチームの取り組み
taniigo
0
130
AIエージェント時代における TypeScriptスキーマ駆動開発の新たな役割
bicstone
4
1.5k
Featured
See All Featured
Six Lessons from altMBA
skipperchong
28
4k
GraphQLとの向き合い方2022年版
quramy
49
14k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Embracing the Ebb and Flow
colly
88
4.8k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.6k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
188
55k
Building an army of robots
kneath
306
46k
Testing 201, or: Great Expectations
jmmastey
45
7.7k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Reflections from 52 weeks, 52 projects
jeffersonlam
352
21k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.2k
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