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
Masaki Iino
September 08, 2017
Technology
600
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
770
Other Decks in Technology
See All in Technology
フィジカルAIの知識ゼロの僕でも AIを使えばここまでできた
tatsuya1970
0
180
Kiro WebとCloud Sessions
nagisa53
2
200
dbt と Snowflake と tag
kevinrobot34
1
250
AI時代のデータ基盤を考える問い
pacocat
0
680
英語が話せなくてもKubeConスタッフに参加した話
yusuke427
2
1.1k
AI駆動開発をチームに根付かせる - 「1行も書かない」チームがHarnessを育てた1年 -
kenichirokimura
2
290
AI駆動開発を組織で促すために
lycorptech_jp
PRO
1
2.4k
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
12
85k
[potatotips #96] Give Your AI Agent the Flutter Playbook
korodroid
0
170
OpenID for Verifiable Credentials 実装から見えた相互運用性確保までの道のり(OAuth/OIDC Numa (Immersion) Workshop 2026)
oidfj
PRO
0
280
ハッカソンで入賞した話 @ Findy LT
asari194617
0
1.5k
1.5時間を無駄にして学んだwsl2におけるaptとsnapの選択と仕組み
yosaka0123
0
450
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
46
8.2k
Designing for Timeless Needs
cassininazir
1
450
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
260
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
480
Building the Perfect Custom Keyboard
takai
2
850
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
480
Agile that works and the tools we love
rasmusluckow
331
22k
Making Projects Easy
brettharned
120
6.7k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
360
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.5k
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
デモ