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
770
1
Share
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
More Decks by shiro seike
See All by shiro seike
AWSコミュニティ活動は顧客のクラウド推進に効くのか / Do AWS community activities help customers adopt the cloud?
seike460
PRO
0
55
テレメトリーシグナルが導くパフォーマンス最適化 / Performance Optimization Driven by Telemetry Signals
seike460
PRO
2
220
AI-DLC 入門 〜AIコーディングの本質は「コード」ではなく「構造」〜 / Introduction to AI-DLC: The Essence of AI Coding Is Not “Code” but “Structure”
seike460
PRO
0
270
今さら聞けないサーバーレスのいいところ 〜運用から解放される世界を目指して〜 / The Benefits of Serverless You Might Be Too Embarrassed to Ask About Now — Aiming for a World Free from Operational Burdens
seike460
PRO
0
15
歴史から学ぶ「Why PHP?」 PHPを書く理由を改めて理解する / Learning from History: “Why PHP?” Rediscovering the Reasons for Writing PHP
seike460
PRO
0
440
Team-First Serverless Platform Engineering Approach to PHP Applications with Laravel and Bref
seike460
PRO
1
68
地方で実現!九州、福岡近郊のAWS活用事例 / Success Stories from the Regions! AWS Use Cases in Kyushu and the Fukuoka Area
seike460
PRO
0
14
なぜ適用するか、移行して理解するClean Architecture 〜構造を超えて設計を継承する〜 / Why Apply, Migrate and Understand Clean Architecture - Inherit Design Beyond Structure
seike460
PRO
3
1k
生成AIコーディングとの向き合い方、AIと共創するという考え方 / How to deal with generative AI coding and the concept of co-creating with AI
seike460
PRO
1
500
Other Decks in Programming
See All in Programming
LM Linkで(非力な!)ノートPCでローカルLLM
seosoft
0
410
RSAが破られる前に知っておきたい 耐量子計算機暗号(PQC)入門 / Intro to PQC: Preparing for the Post-RSA Era
mackey0225
3
120
Radical Imagining - LIFT 2025-2027 Policy Agenda
lift1998
0
250
ネイティブアプリとWebフロントエンドのAPI通信ラッパーにおける共通化の勘所
suguruooki
0
250
Mastering Event Sourcing: Your Parents Holidayed in Yugoslavia
super_marek
0
150
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
340
Xdebug と IDE による デバッグ実行の仕組みを見る / Exploring-How-Debugging-Works-with-Xdebug-and-an-IDE
shin1x1
0
350
AWS re:Invent 2025の少し振り返り + DevOps AgentとBacklogを連携させてみた
satoshi256kbyte
2
150
AIと共にエンジニアとPMの “二刀流”を実現する
naruogram
0
130
Offline should be the norm: building local-first apps with CRDTs & Kotlin Multiplatform
renaudmathieu
0
150
CDK Deployのための ”反響定位”
watany
0
490
車輪の再発明をしよう!PHP で実装して学ぶ、Web サーバーの仕組みと HTTP の正体
h1r0
3
510
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.2k
Building AI with AI
inesmontani
PRO
1
870
Crafting Experiences
bethany
1
110
Building an army of robots
kneath
306
46k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
110
Navigating Weather and Climate Data
rabernat
0
160
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.1k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
110
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
330
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
200
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
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/