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
700
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Nim + Cloud Run + TerraformでGCPにNimのサーバーレス環境を作る
2021/05/04
@nim(ゆるい) LTイベント
regonn
May 04, 2021
More Decks by regonn
See All by regonn
Allora Network が実現する 「予測の経済圏」
regonn
0
33
Submission with Numerai Compute using GCP Batch
regonn
0
690
HelloMoon x Orca=HelloOrca
regonn
0
180
The Challenge of Automatically Configuring Numerai Compute Environment
regonn
0
150
Federated Learning 連合学習
regonn
3
1.9k
PLATEAUをデータベースに取り込んでみた
regonn
0
1.8k
古参Numerai参加者の戯言
regonn
1
2.6k
S+ Camera Basicと似た環境をラズパイから構築してみる
regonn
0
570
衛星画像のゴルフ場写り込み判定AIモデルを作る
regonn
0
900
Other Decks in Programming
See All in Programming
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
500
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
220
20260722_microCMSで考える、AI時代のコンテンツ運用設計
yosh1
0
440
変わらないものが、変わるものを決める — 意図駆動開発 × イベントソーシング × イミュータブル | What Doesn't Change Decides What Can — IDD × Event Sourcing × Immutability
tomohisa
0
1.8k
進化を続けるGo toolsの現在地 / The Current State of Ever-Evolving Go Tools
hond0413
0
240
freee が目指す データ マネジメント戦略 AI-Ready 時代を支える 攻めのガバナンスとは
freee
PRO
0
440
リアルな遅延を測る仕様
kota_yata
1
120
FastAPI の並行処理モデルを完全に理解する
hoto17296
1
220
in-process GraphQL のすすめ #ginzajs
izumin5210
4
1.4k
Jindong: Introducing Declarative Haptics in Compose Multiplatform
l2hyunwoo
0
120
実装をデザインガイドラインに追従させるための取り組み / 260731-dip-mosh-design-system
dachi023
0
6.1k
琵琶湖の水は止められてもNet--HTTPのリトライは止められない / You might be able to stop the water flow of Lake Biwa but you can't stop Net::HTTP retries
luccafort
PRO
0
820
Featured
See All Featured
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
700
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
480
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
620
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.3k
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
Believing is Seeing
oripsolob
1
190
[SF Ruby Conf 2025] Rails X
palkan
2
1.3k
Side Projects
sachag
455
43k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.7k
How to make the Groovebox
asonas
2
2.3k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
260
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