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
LT_Cloud_Functions.pdf
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Masaki Iino
September 08, 2017
Technology
1
580
LT_Cloud_Functions.pdf
社内LT用
Masaki Iino
September 08, 2017
Tweet
Share
More Decks by Masaki Iino
See All by Masaki Iino
GCP Composer
iinomasaki
0
250
AnyPay ChatOps
iinomasaki
0
1.2k
Istio
iinomasaki
0
1.6k
GolangでAPIドキュメント自動生成
iinomasaki
0
740
Other Decks in Technology
See All in Technology
Databricks Free Edition講座 データサイエンス編
taka_aki
0
290
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
13k
Deno・Bunの標準機能やElysiaJSを使ったWebSocketサーバー実装 / ラーメン屋を貸し切ってLT会! IoTLT 2026新年会
you
PRO
0
290
クレジットカード決済基盤を支えるSRE - 厳格な監査とSRE運用の両立 (SRE Kaigi 2026)
capytan
6
2.5k
SREじゃなかった僕らがenablingを通じて「SRE実践者」になるまでのリアル / SRE Kaigi 2026
aeonpeople
6
2.1k
プロダクト成長を支える開発基盤とスケールに伴う課題
yuu26
3
1.2k
GitLab Duo Agent Platform × AGENTS.md で実現するSpec-Driven Development / GitLab Duo Agent Platform × AGENTS.md
n11sh1
0
120
Agile Leadership Summit Keynote 2026
m_seki
1
340
CDK対応したAWS DevOps Agentを試そう_20260201
masakiokuda
1
190
2人で作ったAIダッシュボードが、開発組織の次の一手を照らした話― Cursor × SpecKit × 可視化の実践 ― Qiita AI Summit
noalisaai
1
370
レガシー共有バッチ基盤への挑戦 - SREドリブンなリアーキテクチャリングの取り組み
tatsukoni
0
200
仕様書駆動AI開発の実践: Issue→Skill→PRテンプレで 再現性を作る
knishioka
2
580
Featured
See All Featured
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
117
110k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
97
Facilitating Awesome Meetings
lara
57
6.7k
The Curse of the Amulet
leimatthew05
1
8.2k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
sira's awesome portfolio website redesign presentation
elsirapls
0
140
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
200
My Coaching Mixtape
mlcsv
0
46
Optimizing for Happiness
mojombo
379
71k
Skip the Path - Find Your Career Trail
mkilby
0
52
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
62
Accessibility Awareness
sabderemane
0
48
Transcript
Cloud Functions Masaki Iino
Cloud Functions Cloud Functions β版 βリリース時にFirebaseもサポートされた ぼちぼち、GAになるらしい
Cloud Functions • サーバレス • イベント駆動 • ステートレス • Node.js
料金体系
関数の種類 • HTTP Functions ◦ HTTPSリクエストがトリガー ◦ 同期実行 • Background
Functions ◦ Cloud Pub/Sub ◦ Cloud Storage ◦ 非同期実行
HTTP Functions Hello World するならこう 内部的にExpressを使用している exports.helloWorld = function helloWorld
(req, res) { res.send('Hello World!'); };
HTTP Functions デプロイ方法 アップロードするバケットとトリガーを指定 バケットは先に作っておく必要あり $ gcloud beta functions deploy
helloWorld \ --stage-bucket functions-helloWorld \ --trigger-http
Background Functions Hello World するならこう 最後にcallbackを呼ぶ exports.helloWorld = function helloWorld
(event, callback) { callback(); };
Background Functions デプロイ方法 アップロードするバケットとトリガーを指定 $ gcloud beta functions deploy helloWorld
\ --stage-bucket functions-helloWorld \ --trigger-bucket my-bucket $ gcloud beta functions deploy helloWorld \ --stage-bucket functions-helloWorld \ --trigger-topic my-topic
パッケージ package.jsonを記述すれば、クラウド上でnpm installされる。 "dependencies": { "request": "^2.81.0" }, const request
= require('request'); exports.helloWorld = function helloWorld (req, res) { request('http://www.google.com', (error, response, body) => { res.send('Hello World!'); } };
ログ Stackdriver Loggingに出力される(console.logを使う)
モニタリング 呼び出し回数 / 実行時間 / メモリ使用量
開発環境 公式のエミュレータがあります。(まだalpha
デモ