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
520
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
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
60
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
510
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
1.1k
実践サーバーレスパフォーマンスチューニング ~その実力に迫る~ / Practical Serverless Performance Tuning ~A Close Look at its Power~
seike460
PRO
2
350
PHPを書く理由、PHPを書いていて良い理由 / Reasons to write PHP and why it is good to write PHP
seike460
PRO
5
590
AWS CDKを用いたセキュアなCI/CDパイプラインの構築 / Build a secure CI/CD pipeline using AWS CDK
seike460
PRO
3
750
いまあるチームにフィットさせる Serverless そして Platform Engineeringへの挑戦 / Serverless Fits the Team You Have and Platform Engineering
seike460
PRO
2
2.1k
いまあるチームにフィットさせる Serverless / Serverless fits in with the team you have now.
seike460
PRO
2
180
地方こそサーバーレス! チームにフィットさせるサーバーレス / Rural areas are serverless! Serverless to Fit Your Team
seike460
PRO
1
120
Other Decks in Programming
See All in Programming
フロントエンドのディレクトリ構成どうしてる? Feature-Sliced Design 導入体験談
osakatechlab
8
4.1k
Effective Signals in Angular 19+: Rules and Helpers @ngbe2024
manfredsteyer
PRO
0
130
採用事例の少ないSvelteを選んだ理由と それを正解にするためにやっていること
oekazuma
2
1k
[JAWS-UG横浜 #76] イケてるアップデートを宇宙いち早く紹介するよ!
maroon1st
0
450
暇に任せてProxmoxコンソール 作ってみました
karugamo
1
710
Refactor your code - refactor yourself
xosofox
1
250
The Efficiency Paradox and How to Save Yourself and the World
hollycummins
1
440
Итераторы в Go 1.23: зачем они нужны, как использовать, и насколько они быстрые?
lamodatech
0
610
数十万行のプロジェクトを Scala 2から3に完全移行した
xuwei_k
0
260
talk-with-local-llm-with-web-streams-api
kbaba1001
0
170
Symfony Mapper Component
soyuka
2
730
Full stack testing :: basic to basic
up1
1
930
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
510
A Tale of Four Properties
chriscoyier
157
23k
Documentation Writing (for coders)
carmenintech
66
4.5k
Rails Girls Zürich Keynote
gr2m
94
13k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
Designing for Performance
lara
604
68k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Why Our Code Smells
bkeepers
PRO
335
57k
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
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/