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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
Oracle Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
2
1k
Azure Copilot Migration Agent / #jazug
koudaiii
1
200
22nd ACRi Webinar - NTT Kawahara-san's slide
nao_sumikawa
0
140
(技術的には)社内システムもOKなブラウザエージェントを作ってみた!
har1101
1
460
30分でわかるアーキテクチャモダナイゼーション
nwiizo
3
1.9k
私たち準委任PdEは2つのプロダクトに挑戦する ~ソフトウェア、開発支援という”二重”のプロダクトエンジニアリングの実践~ / 20260212 Naoki Takahashi
shift_evolve
PRO
3
340
OWASP Top 10:2025 リリースと 少しの日本語化にまつわる裏話
okdt
PRO
3
1.1k
マネージャー視点で考えるプロダクトエンジニアの評価 / Evaluating Product Engineers from a Manager's Perspective
hiro_torii
0
330
ランサムウェア対策としてのpnpm導入のススメ
ishikawa_satoru
0
330
SREチームをどう作り、どう育てるか ― Findy横断SREのマネジメント
rvirus0817
0
500
React 19時代のコンポーネント設計ベストプラクティス
uhyo
14
5k
AWS DevOps Agent x ECS on Fargate検証 / AWS DevOps Agent x ECS on Fargate
kinunori
3
420
Featured
See All Featured
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.2k
The Invisible Side of Design
smashingmag
302
51k
Thoughts on Productivity
jonyablonski
75
5.1k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
450
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
250
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
230
Docker and Python
trallard
47
3.7k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
71
[SF Ruby Conf 2025] Rails X
palkan
1
780
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
デモ