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
690
1
Share
Nim + Cloud Run + TerraformでGCPにNimのサーバーレス環境を作る
2021/05/04
@nim(ゆるい) LTイベント
regonn
May 04, 2021
More Decks by regonn
See All by regonn
Submission with Numerai Compute using GCP Batch
regonn
0
660
HelloMoon x Orca=HelloOrca
regonn
0
180
The Challenge of Automatically Configuring Numerai Compute Environment
regonn
0
130
Federated Learning 連合学習
regonn
4
1.8k
PLATEAUをデータベースに取り込んでみた
regonn
0
1.8k
古参Numerai参加者の戯言
regonn
1
2.6k
S+ Camera Basicと似た環境をラズパイから構築してみる
regonn
0
560
衛星画像のゴルフ場写り込み判定AIモデルを作る
regonn
0
860
データラーニングギルド での活動と今後
regonn
0
190
Other Decks in Programming
See All in Programming
JCON - Create Agentic AI Apps, The Easy Way!
kdubois
1
100
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
500
From Formal Specification to Property Based Test
ohbarye
0
2.4k
決定論 vs 確率論:Gemini 3 FlashとTF-IDFを組み合わせた「法規判定エンジン」の構築
shukob
0
160
20年以上続くプロダクトでも使い続けられる静的解析ツールを求めて
matsuo_atsushi
0
140
ソースコード→AST→オペコード、の旅を覗いてみる
o0h
PRO
1
130
AI時代だからこそ「Bloc」を採用する価値があるのかもしれない
takuroabe
0
130
Building on Bluesky's AT Protocol with Ruby
mackuba
0
110
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
580
空間オーディオの活用
objectiveaudio
0
150
Explore CoroutineScope
tomoeng11
0
180
Structured Concurrency, Scoped Values and Joiners in the JDK 25 26 27
josepaumard
1
150
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
515
110k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
130
KATA
mclloyd
PRO
35
15k
GitHub's CSS Performance
jonrohan
1032
470k
How Software Deployment tools have changed in the past 20 years
geshan
0
33k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
How GitHub (no longer) Works
holman
316
150k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
110
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2k
A Tale of Four Properties
chriscoyier
163
24k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
500
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