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
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チャットボット開発で学んだ Datadog Agent Observability活用術
mkdev10
0
140
Kiro Crew で始める マルチエージェント開発
miu_crescent
PRO
0
180
Microsoft MVP プログラムを紹介するから目指す人増えてくれ
tsubakimoto_s
0
110
EMの役割で 変わったこと・変わらなかったこと
sansantech
PRO
0
120
パスキーでドライブする アカウント統合(OAuth/OIDC Numa (Immersion) Workshop 2026)
oidfj
PRO
0
280
作って理解するCoding Agent 〜フレームワークに頼らないピュア Python での実装〜
takapy
4
1.3k
RelayerというPHPのフレームワークを作った
polidog
PRO
0
140
【書籍出版記念】 10周回って、エージェント開発は RAGがすべてだった。〜RAGの歴史と開発現場で見えた実践知〜
akiratameto
20
7.5k
dbt in Microsoft Fabric
ryomaru0825
0
260
VLMで2.3万枚のPyCon JP写真を検索!
terapyon
1
510
internal/testlog で遊ぼう
rokuosan
0
220
研究開発部の紹介 / Sansan R&D Profile
sansan33
PRO
4
24k
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
77
5.5k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
The untapped power of vector embeddings
frankvandijk
2
1.8k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
360
HDC tutorial
michielstock
2
820
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
580
The agentic SEO stack - context over prompts
schlessera
0
880
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
280
Code Review Best Practice
trishagee
74
20k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.5k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
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
デモ