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
TypeScript入門 2026
recruitengineers
PRO
1
280
LangfuseによるLLMOps基盤の構築と活用事例
zozotech
PRO
1
280
【CEDEC2026】『ウマ娘 プリティーダービー』 英語版のキャラクターの方言や口調をローカライズするための創造的アプローチ
cygames
PRO
1
180
サイバー捜査員研修(前半)
nomizone
1
1.6k
攻撃と防御で学ぶAI時代のプロダクトセキュリティ演習
recruitengineers
PRO
1
350
ウォーターフォール開発案件のPMとしてAI活用を模索している話
hatahata021
3
310
SnowflakeCoCoでデータエンジニアリング!
foursue
0
170
AI ネイティブな組織に Gemini Enterprise Agent Platform がなぜ必要なのか
asei
1
170
Service Connect 上のサービスに ECS Service の外側から到達できなかった話
ota1022
1
120
オートロックマンションなのに、各部屋は施錠なし!? 攻撃者が組織内ネットワークで大暴れする理由 / The Front Door Is Locked, but the Rooms Are Wide Open: Why Attackers Move Freely Inside Enterprise Networks
nttcom
0
1.5k
モノリス Rails でも日中に rails db:migrate を走らせたい! / Daytime rails db:migrate on Monolithic Rails!
euglena1215
3
420
GitHub CopilotのFinOps- AI CreditのObservabilityと価値を生むためのエージェント設計
yuriemori
0
100
Featured
See All Featured
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
650
Building Applications with DynamoDB
mza
96
7.2k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
430
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
Embracing the Ebb and Flow
colly
88
5.1k
Designing Powerful Visuals for Engaging Learning
tmiket
1
470
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
210
Why Our Code Smells
bkeepers
PRO
340
58k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.8k
Fireside Chat
paigeccino
42
4k
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
デモ