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
620
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
480
HelloMoon x Orca=HelloOrca
regonn
0
110
The Challenge of Automatically Configuring Numerai Compute Environment
regonn
0
77
Federated Learning 連合学習
regonn
4
1.6k
PLATEAUをデータベースに取り込んでみた
regonn
0
1.7k
古参Numerai参加者の戯言
regonn
1
2.4k
S+ Camera Basicと似た環境をラズパイから構築してみる
regonn
0
500
衛星画像のゴルフ場写り込み判定AIモデルを作る
regonn
0
720
データラーニングギルド での活動と今後
regonn
0
150
Other Decks in Programming
See All in Programming
Sharing features among Android applications: experience feedback
jbvincey
0
110
Bedrock×MCPで社内ブログ執筆文化を育てたい!
har1101
6
1k
設計の本質:コード、システム、そして組織へ / The Essence of Design: To Code, Systems, and Organizations
nrslib
4
610
AIコーディングワークフローの試行 〜AIエージェント×ワークフローでの自動化を目指して〜
rkaga
3
3.7k
Amazon CloudWatchの地味だけど強力な機能紹介!
itotsum
0
170
MCP調べてみました! / Exploring MCP
uhzz
2
2.3k
一緒に働きたくなるプログラマの思想 #QiitaConference
mu_zaru
38
9.1k
Make Parsers Compatible Using Automata Learning
makenowjust
1
5.1k
On-the-fly Suggestions of Rewriting Method Deprecations
ohbarye
1
2.8k
複雑なフォームの jotai 設計 / Designing jotai(state) for Complex Forms #layerx_frontend
izumin5210
4
1.1k
スモールスタートで始めるためのLambda×モノリス(Lambdalith)
akihisaikeda
2
290
The Efficiency Paradox and How to Save Yourself and the World
hollycummins
0
110
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
5
550
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.8k
The World Runs on Bad Software
bkeepers
PRO
67
11k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
390
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
670
Raft: Consensus for Rubyists
vanstee
137
6.9k
Writing Fast Ruby
sferik
628
61k
BBQ
matthewcrist
88
9.6k
The Language of Interfaces
destraynor
157
25k
GraphQLとの向き合い方2022年版
quramy
46
14k
How to train your dragon (web standard)
notwaldorf
90
6k
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