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
570
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
71
HelloMoon x Orca=HelloOrca
regonn
0
86
The Challenge of Automatically Configuring Numerai Compute Environment
regonn
0
54
Federated Learning 連合学習
regonn
4
1.4k
PLATEAUをデータベースに取り込んでみた
regonn
0
1.6k
古参Numerai参加者の戯言
regonn
1
2.2k
S+ Camera Basicと似た環境をラズパイから構築してみる
regonn
0
440
衛星画像のゴルフ場写り込み判定AIモデルを作る
regonn
0
610
データラーニングギルド での活動と今後
regonn
0
100
Other Decks in Programming
See All in Programming
Composing an API the *right* way (Droidcon Berlin 2024)
zsmb
1
450
Findy - エンジニア向け会社紹介 / Findy Letter for Engineers
findyinc
2
81k
Rustのweb開発を助ける 便利なツール紹介
yuki0418
1
190
유연한 Composable 설계
l2hyunwoo
0
380
Architectures with Lightweight Stores: New Rules and Options
manfredsteyer
PRO
0
100
Prompt FlowによるLLMアプリケーション開発
yuto2000
1
1k
Exploring the Gradually Lost Technical Skills in the Cloud Native Era
hwchiu
2
3.9k
APIのない大学ログインWebサービスをWKWebViewとJavaScriptでアプリ化した話
akidon0000
1
330
Polarsの成長: v0.14からv1.0までの変遷と今後の展望
zerebom
1
350
生成AIをkintoneに連携してみた
hideg
0
230
CSC307 Lecture 12
javiergs
PRO
0
220
【Go言語】golangci-lintの使い方
tomo1227
0
280
Featured
See All Featured
Atom: Resistance is Futile
akmur
261
25k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
26
2.1k
Practical Orchestrator
shlominoach
185
10k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
226
52k
A better future with KSS
kneath
231
17k
Docker and Python
trallard
37
2.9k
Scaling GitHub
holman
458
140k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
26
1.8k
Optimizing for Happiness
mojombo
373
69k
How to name files
jennybc
67
96k
The Cult of Friendly URLs
andyhume
75
5.9k
Build your cross-platform service in a week with App Engine
jlugia
227
17k
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