SlideShare a Scribd company logo
8
Most read
9
Most read
10
Most read
REACTPHP & SYMFONY
David Bergunder
Lead Web Developer
April, 2017
HTTP SERVER
ReactPHP as an Event-Driven, Non-Blocking I/O http
server.
ReactPHP
Your application runs inside ReactPHPs event loop.
Request -> Response pattern (Symfony!)
Acts as the http server.
• No more bootstrap and initialization of code on every
request.
• Dramatically increases performance of the application.
• Start multiple servers and balance with a proxy.
• Best used alongside nginx or properly configured apache
for static content.
Symfony
• Request -> Response Framework
• Symfony 4.x is extremely light weight (deprecated silex,
a popular lightweight PHP framework for APIs)
• Supports modern software development practices and
paradigms.
• Components can be found in most modern PHP
frameworks:
• Drupal
• Laravel
• Magento
• Wordpress haha just kidding
Caveats
• Memory Management (Symfony debug mode has a huge
memory leak due to the profiling features)
• Process manager could terminate and restart periodically
• Git gud (at memory management) scrub
• File Upload / Streaming of data can be challenging.
• Haven’t tested this myself.
• Managing Running Processes and Memory
• There are other feature rich frameworks using ReactPHP that can
manage this.
• Database Interaction
• Doctrine can be a real pain in long running processes if you aren’t
careful
Demo
• https://github.com/dbergunder/reactphp-symfony
• Symfony: v4.0.8
• ReactPHP
• event-loop: v0.5
• http: v0.8
• Symfony Bridge
• psr-http-message-bridge
• Convert React Request to Symfony Request
• zend-diactoros
• Convert Symfony Response to React Response
BENCHMARKS
73.6% of all statistics are made up.
Benchmarks – Default Symfony
Apache
PHP-FPM
No opcache
ab -c 1 -t 10 http://reactphp.icc:8080/public/
Benchmark – ReactPHP + Symfony
php bin/react
ab -c 1 -t 10 http://127.0.0.1:8081/
Disclaimers
• PHP 7.2
• No opcache – or any caching
• Local development environment
• “Hello World” is not data or operation intensive
• No database interaction
QUESTIONS?
You have to be odd to be number one.
-- Dr. Seuss

More Related Content

What's hot (20)

PDF
Python web frameworks
NEWLUG
 
PPTX
.NET Oxford Windows Subsystem for Linux v2
Stuart Leeks
 
PDF
Web Development with Python and Django
Michael Pirnat
 
PDF
Django Introduction & Tutorial
之宇 趙
 
PPTX
Trabalho de Conclusão do Módulo de Hardware TI 2012/B Senac Jundiaí
Luiz Celso Freitas - Royallogic Comunicação Visual
 
PDF
Introduction to python
Mohammed Rafi
 
PDF
7.-Bootstrap-5-report powerpoint presentation
JohnLagman3
 
PPTX
Cookie and session
Aashish Ghale
 
PPTX
PHP Cookies and Sessions
Nisa Soomro
 
ODP
Aula02 - JavaScript
Jorge Ávila Miranda
 
PPTX
Introduction to Django
Ahmed Salama
 
PPT
Django, What is it, Why is it cool?
Tom Brander
 
PPTX
Python in 30 minutes!
Fariz Darari
 
PPT
Php(report)
Yhannah
 
PDF
Angular 2
Loiane Groner
 
PDF
Git & Github for beginners
Paulo Henrique Nonaka
 
PPTX
Django Girls Tutorial
Kishimi Ibrahim Ishaq
 
PDF
Principles of MVC for Rails Developers
Edureka!
 
PPTX
Common Gateway Interface ppt
OECLIB Odisha Electronics Control Library
 
PDF
ส่วนประกอบต่างๆของ Sketchup
Nicharee Piwjan
 
Python web frameworks
NEWLUG
 
.NET Oxford Windows Subsystem for Linux v2
Stuart Leeks
 
Web Development with Python and Django
Michael Pirnat
 
Django Introduction & Tutorial
之宇 趙
 
Trabalho de Conclusão do Módulo de Hardware TI 2012/B Senac Jundiaí
Luiz Celso Freitas - Royallogic Comunicação Visual
 
Introduction to python
Mohammed Rafi
 
7.-Bootstrap-5-report powerpoint presentation
JohnLagman3
 
Cookie and session
Aashish Ghale
 
PHP Cookies and Sessions
Nisa Soomro
 
Aula02 - JavaScript
Jorge Ávila Miranda
 
Introduction to Django
Ahmed Salama
 
Django, What is it, Why is it cool?
Tom Brander
 
Python in 30 minutes!
Fariz Darari
 
Php(report)
Yhannah
 
Angular 2
Loiane Groner
 
Git & Github for beginners
Paulo Henrique Nonaka
 
Django Girls Tutorial
Kishimi Ibrahim Ishaq
 
Principles of MVC for Rails Developers
Edureka!
 
Common Gateway Interface ppt
OECLIB Odisha Electronics Control Library
 
ส่วนประกอบต่างๆของ Sketchup
Nicharee Piwjan
 

Similar to ReactPHP + Symfony (20)

PPTX
Top 10 php frameworks in 2021
MaryamAnwar10
 
PPTX
Web programming using PHP and Introduction with sample codes
DivyaKS12
 
PPTX
Introduction To Web Development & The New Digital Workplace
Jen Wei Lee
 
PPT
My cool new Slideshow!
netzwelt12345
 
PPTX
How to Supercharge your PHP Web API
Aurimas Niekis
 
PPTX
They why behind php frameworks
Kirk Madera
 
PDF
Top 7 php frameworks for startups 2019
ValueCoders
 
PPTX
Introduction to PHP.pptx
MarianJRuben
 
PPTX
Performance Comparison of PHP 5.6 vs. 7.0 vs HHVM
Jani Tarvainen
 
PDF
DrupalCampLA 2014 - Drupal backend performance and scalability
cherryhillco
 
PDF
Scaling with Symfony - PHP UK
Ricard Clau
 
PPTX
What's the "right" PHP Framework?
Barry Jones
 
PPT
Php
Ajay Kumar
 
PDF
2013 - Dustin whittle - Escalando PHP en la vida real
PHP Conference Argentina
 
PDF
Php training in bhubaneswar
litbbsr
 
PDF
Php training in bhubaneswar
litbbsr
 
PPTX
Midwest PHP - Scaling Magento
Mathew Beane
 
PDF
A look at FastCgi & Mod_PHP architecture
Aimee Maree
 
PPTX
Caching strategies with lucee
Gert Franz
 
PDF
PHP Web Development Frameworks & Advantages
AditMicrosys Australia
 
Top 10 php frameworks in 2021
MaryamAnwar10
 
Web programming using PHP and Introduction with sample codes
DivyaKS12
 
Introduction To Web Development & The New Digital Workplace
Jen Wei Lee
 
My cool new Slideshow!
netzwelt12345
 
How to Supercharge your PHP Web API
Aurimas Niekis
 
They why behind php frameworks
Kirk Madera
 
Top 7 php frameworks for startups 2019
ValueCoders
 
Introduction to PHP.pptx
MarianJRuben
 
Performance Comparison of PHP 5.6 vs. 7.0 vs HHVM
Jani Tarvainen
 
DrupalCampLA 2014 - Drupal backend performance and scalability
cherryhillco
 
Scaling with Symfony - PHP UK
Ricard Clau
 
What's the "right" PHP Framework?
Barry Jones
 
2013 - Dustin whittle - Escalando PHP en la vida real
PHP Conference Argentina
 
Php training in bhubaneswar
litbbsr
 
Php training in bhubaneswar
litbbsr
 
Midwest PHP - Scaling Magento
Mathew Beane
 
A look at FastCgi & Mod_PHP architecture
Aimee Maree
 
Caching strategies with lucee
Gert Franz
 
PHP Web Development Frameworks & Advantages
AditMicrosys Australia
 
Ad

Recently uploaded (20)

PDF
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
PDF
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
PPTX
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
PDF
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
PDF
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
PDF
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
PDF
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
 
PDF
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
PDF
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
PPTX
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
PPTX
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
PPTX
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
PDF
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
PPTX
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
PDF
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
PDF
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
PPTX
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
 
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Ad

ReactPHP + Symfony

  • 1. REACTPHP & SYMFONY David Bergunder Lead Web Developer April, 2017
  • 2. HTTP SERVER ReactPHP as an Event-Driven, Non-Blocking I/O http server.
  • 3. ReactPHP Your application runs inside ReactPHPs event loop. Request -> Response pattern (Symfony!) Acts as the http server. • No more bootstrap and initialization of code on every request. • Dramatically increases performance of the application. • Start multiple servers and balance with a proxy. • Best used alongside nginx or properly configured apache for static content.
  • 4. Symfony • Request -> Response Framework • Symfony 4.x is extremely light weight (deprecated silex, a popular lightweight PHP framework for APIs) • Supports modern software development practices and paradigms. • Components can be found in most modern PHP frameworks: • Drupal • Laravel • Magento • Wordpress haha just kidding
  • 5. Caveats • Memory Management (Symfony debug mode has a huge memory leak due to the profiling features) • Process manager could terminate and restart periodically • Git gud (at memory management) scrub • File Upload / Streaming of data can be challenging. • Haven’t tested this myself. • Managing Running Processes and Memory • There are other feature rich frameworks using ReactPHP that can manage this. • Database Interaction • Doctrine can be a real pain in long running processes if you aren’t careful
  • 6. Demo • https://github.com/dbergunder/reactphp-symfony • Symfony: v4.0.8 • ReactPHP • event-loop: v0.5 • http: v0.8 • Symfony Bridge • psr-http-message-bridge • Convert React Request to Symfony Request • zend-diactoros • Convert Symfony Response to React Response
  • 7. BENCHMARKS 73.6% of all statistics are made up.
  • 8. Benchmarks – Default Symfony Apache PHP-FPM No opcache ab -c 1 -t 10 http://reactphp.icc:8080/public/
  • 9. Benchmark – ReactPHP + Symfony php bin/react ab -c 1 -t 10 http://127.0.0.1:8081/
  • 10. Disclaimers • PHP 7.2 • No opcache – or any caching • Local development environment • “Hello World” is not data or operation intensive • No database interaction
  • 11. QUESTIONS? You have to be odd to be number one. -- Dr. Seuss