$30 off During Our Annual Pro Sale. View Details »
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
670
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
600
HelloMoon x Orca=HelloOrca
regonn
0
150
The Challenge of Automatically Configuring Numerai Compute Environment
regonn
0
100
Federated Learning 連合学習
regonn
4
1.7k
PLATEAUをデータベースに取り込んでみた
regonn
0
1.8k
古参Numerai参加者の戯言
regonn
1
2.5k
S+ Camera Basicと似た環境をラズパイから構築してみる
regonn
0
530
衛星画像のゴルフ場写り込み判定AIモデルを作る
regonn
0
810
データラーニングギルド での活動と今後
regonn
0
170
Other Decks in Programming
See All in Programming
AIエージェントを活かすPM術 AI駆動開発の現場から
gyuta
0
210
なあ兄弟、 余白の意味を考えてから UI実装してくれ!
ktcryomm
10
11k
Building AI with AI
inesmontani
PRO
1
470
関数の挙動書き換える
takatofukui
4
760
ハイパーメディア駆動アプリケーションとIslandアーキテクチャ: htmxによるWebアプリケーション開発と動的UIの局所的適用
nowaki28
0
320
251126 TestState APIってなんだっけ?Step Functionsテストどう変わる?
east_takumi
0
290
Integrating WordPress and Symfony
alexandresalome
0
110
sbt 2
xuwei_k
0
170
TUIライブラリつくってみた / i-just-make-TUI-library
kazto
1
300
ViewファーストなRailsアプリ開発のたのしさ
sugiwe
0
370
モダンJSフレームワークのビルドプロセス 〜なぜReactは503行、Svelteは12行なのか〜
fuuki12
0
180
20 years of Symfony, what's next?
fabpot
2
300
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
54k
Testing 201, or: Great Expectations
jmmastey
46
7.8k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Faster Mobile Websites
deanohume
310
31k
Music & Morning Musume
bryan
46
7k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.1k
Designing for Performance
lara
610
69k
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