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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Masaki Iino
September 08, 2017
Technology
590
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
LT_Cloud_Functions.pdf
社内LT用
Masaki Iino
September 08, 2017
More Decks by Masaki Iino
See All by Masaki Iino
GCP Composer
iinomasaki
0
260
AnyPay ChatOps
iinomasaki
0
1.2k
Istio
iinomasaki
0
1.7k
GolangでAPIドキュメント自動生成
iinomasaki
0
760
Other Decks in Technology
See All in Technology
AIソロプレナー時代に2ヶ月で20人増員した事業創造会社の開発組織の話
miyatakoji
0
680
ACE-Step-1.5で見る 音楽生成AIのしくみと“破綻だけ直す”Retake機能の開発【zennfes spring 2026 登壇資料】
personabb
1
520
Chainlitで作るお手軽チャットUI
ynt0485
0
260
200個のGitHubリポジトリを横断調査したかった
icck
0
130
現地で盛り上がった WWDC26 Keynote
zozotech
PRO
1
250
RAG を使わないという選択肢
tatsutaka
1
250
AIっぽい文章を採点して人間らしく直すアプリを作ってみた
yama3133
2
210
SONiCの統計情報を取得したい
sonic
0
190
Agent Skills設計で柔軟性と硬さのバランスが難しい話
nassy20
0
130
【2026年版】 ベクトル検索䛸 Embedding最前線
mocobeta
6
2.4k
エンジニアリング戦略の作り方 / Crafting Engineering Strategy
iwashi86
21
7k
LLMにもCAP定理があるという話
harukasakihara
0
400
Featured
See All Featured
Claude Code のすすめ
schroneko
67
230k
The Invisible Side of Design
smashingmag
302
52k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
210
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
A designer walks into a library…
pauljervisheath
211
24k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.1k
KATA
mclloyd
PRO
35
15k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Color Theory Basics | Prateek | Gurzu
gurzu
0
360
Fireside Chat
paigeccino
42
4k
Typedesign – Prime Four
hannesfritz
42
3.1k
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
デモ