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
510
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
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
250
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
860
実践サーバーレスパフォーマンスチューニング ~その実力に迫る~ / Practical Serverless Performance Tuning ~A Close Look at its Power~
seike460
PRO
2
320
PHPを書く理由、PHPを書いていて良い理由 / Reasons to write PHP and why it is good to write PHP
seike460
PRO
5
560
AWS CDKを用いたセキュアなCI/CDパイプラインの構築 / Build a secure CI/CD pipeline using AWS CDK
seike460
PRO
3
700
いまあるチームにフィットさせる Serverless そして Platform Engineeringへの挑戦 / Serverless Fits the Team You Have and Platform Engineering
seike460
PRO
2
1.9k
いまあるチームにフィットさせる Serverless / Serverless fits in with the team you have now.
seike460
PRO
2
170
地方こそサーバーレス! チームにフィットさせるサーバーレス / Rural areas are serverless! Serverless to Fit Your Team
seike460
PRO
1
110
AWS X-Rayを利用したサーバーレスのパフォーマンス分析 / Serverless performance analysis using AWS X-Ray
seike460
PRO
2
170
Other Decks in Programming
See All in Programming
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.1k
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
詳細解説! ArrayListの仕組みと実装
yujisoftware
0
580
最新TCAキャッチアップ
0si43
0
140
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
5
24k
Content Security Policy入門 セキュリティ設定と 違反レポートのはじめ方 / Introduction to Content Security Policy Getting Started with Security Configuration and Violation Reporting
uskey512
1
520
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
170
3rd party scriptでもReactを使いたい! Preact + Reactのハイブリッド開発
righttouch
PRO
1
600
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
2
1.1k
EventSourcingの理想と現実
wenas
6
2.3k
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
170
macOS でできる リアルタイム動画像処理
biacco42
9
2.4k
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
A Philosophy of Restraint
colly
203
16k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Ruby is Unlike a Banana
tanoku
97
11k
Producing Creativity
orderedlist
PRO
341
39k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Facilitating Awesome Meetings
lara
50
6.1k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
The Cult of Friendly URLs
andyhume
78
6k
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
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/