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
Serverless PHPの中身に迫る Brefの中身を覗いてみよう / A look in...
Search
shiro seike
PRO
September 16, 2023
Programming
1
570
Serverless PHPの中身に迫る Brefの中身を覗いてみよう / A look inside Serverless PHP Take a peek inside Bref
PHPカンファレンス沖縄2023
https://phpcon.okinawa.jp/
shiro seike
PRO
September 16, 2023
Tweet
Share
More Decks by shiro seike
See All by shiro seike
Amazon Q Developer Proで効率化するAPI開発入門
seike460
PRO
0
120
(再)ひとり技術広報からの脱却 / Re:Breaking away from one-man technical public relations
seike460
PRO
1
140
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
890
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
260
AWS reInvent 2024サービスアップデートデモ / AWS reInvent 2024 Service Update Demo
seike460
PRO
0
44
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
620
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
1.2k
実践サーバーレスパフォーマンスチューニング ~その実力に迫る~ / Practical Serverless Performance Tuning ~A Close Look at its Power~
seike460
PRO
2
390
PHPを書く理由、PHPを書いていて良い理由 / Reasons to write PHP and why it is good to write PHP
seike460
PRO
5
660
Other Decks in Programming
See All in Programming
Djangoアプリケーション 運用のリアル 〜問題発生から可視化、最適化への道〜 #pyconshizu
kashewnuts
1
250
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
180
新宿駅構内を三人称視点で探索してみる
satoshi7190
2
110
責務と認知負荷を整える! 抽象レベルを意識した関心の分離
yahiru
8
1.2k
Amazon S3 TablesとAmazon S3 Metadataを触ってみた / 20250201-jawsug-tochigi-s3tables-s3metadata
kasacchiful
0
180
Pythonでもちょっとリッチな見た目のアプリを設計してみる
ueponx
1
590
Visual StudioのGitHub Copilotでいろいろやってみる
tomokusaba
1
180
Honoのおもしろいミドルウェアをみてみよう
yusukebe
1
210
WebDriver BiDiとは何なのか
yotahada3
1
150
.NET Frameworkでも汎用ホストが使いたい!
tomokusaba
0
170
Writing documentation can be fun with plugin system
okuramasafumi
0
120
『GO』アプリ バックエンドサーバのコスト削減
mot_techtalk
0
150
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.3k
Become a Pro
speakerdeck
PRO
26
5.1k
GraphQLとの向き合い方2022年版
quramy
44
13k
Building Your Own Lightsaber
phodgson
104
6.2k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
Building Adaptive Systems
keathley
40
2.4k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
175
52k
Typedesign – Prime Four
hannesfritz
40
2.5k
The Invisible Side of Design
smashingmag
299
50k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
Transcript
Serverless PHP Bref PHP 2023 2 0 23 .
9 . 16 @seike 4 60 1
@seike 46 0 - - @seike 46 0 - AWS
Community Builder Serverless - Fusic - / - / - - PHP - PHP - PHP - - 055538A - B 2 2
Agenda 1 .Serverless PHP 2 .Bref 3 .OSS 4 .Bref
5 . 3
01 Serverless PHP
Cloud Native Computing Foundation CNCF Serverless Whitepaper
v 1 . 0 https://github.com/cncf/wg-serverless/tree/master/whitepapers/serverless-overview 5
FaaS 6 FaaS(Function as a Service) AWS AWS Lambda Azure
Azure Functions GCP Google Cloud Functions Google Cloud Run AWS Lamnda PHP
02 Bref
Bref Bref PHP OSS AWS Lambda PHP AWS Lambda PHP
PHP PHP Bref PHP PHP AWS Lambda Laravel Symfony PHP CLI 8
Developer Community AWS Lambda PHP PHP Deploy
PHPer Bref 9 service: app-phpcon-okinawa provider: name: aws region: ap-northeast- 1 plugins: - ./vendor/bref/bref functions: api: handler: index.php description: '' runtime: php- 8 2 -fpm timeout: 28 # in seconds (API Gateway has a timeout of 29 seconds) events: - httpApi: '*' # Exclude files from deployment package: patterns: - '!node_modules/**' - '!tests/**' $ composer require bref/bref $ vendor/bin/bref init
10 HTTP Bref Pull PHP Bref
03 OSS
OSS 12 Bref OSS OSS OSS Bref GitHub Class
04 Bref
runtime 14
Runtime README 15
brefphp/aws-lambda-layers runtime php- 83 16
Dockerfile bootstrap bootstrap AWS Lambda 17
bootstrap RUNTIME_CLASS Class run 18
GitHub php-fpm 19
run() php-fpm processNextEvent Php-fpm Event 20
Invoke HTTP Invoke HTTP 21
HTTP Handler HTTP Handler handle 22
Response HTTP Request Object Request handling response API Gateway
Response 23
HTTP Request Event QueryString header 24
toApiGatewayFormat API Gateway ⾒ Cookie header Body 25
26 Bref AWS Lambda API Gateway Bref AWS
Lambda AWS APIGatewayV 2 HTTPEvent Bref Lambda
Coverage by Bref 27 Bref AWS
04
29 Bref PHP Point 1 Bref Event PHP Point 2
AWS Point 3 Point 4
Thank You We are Hiring ! https://recruit.fusic.co.jp/