SlideShare a Scribd company logo
Accelerating
                                      PHP
                                      Applications




                                       Errazudin Ishak




www.mimos.my   © 2009 MIMOS Berhad. All Rights Reserved.
Agenda

        Who Am I
        PHP Center of Excellence
        The Curious Case of Enterprise PHP
        Summary




www.mimos.my       © 2011 MIMOS Berhad. All Rights Reserved.
Me
        Senior engineer @ Mimos Berhad
        Focuses on web application development,
          deployment, performance and stability.

        2009 : foss.my , MyGOSSCON
        2010 : Entp. PHP Techtalk, BarcampKL, PHP
          Meetup, MOSC2010, PHPNW UK, PHP20102010,
          MyGOSSCON




www.mimos.my          © 2011 MIMOS Berhad. All Rights Reserved.
Agenda

        Who Am I
        PHP Centre of Excellence
        The Curious Case of Enterprise PHP
        Summary




www.mimos.my       © 2011 MIMOS Berhad. All Rights Reserved.
phpcoe.mimos.my




www.mimos.my   © 2011 MIMOS Berhad. All Rights Reserved.
phpcoe.mimos.my

        Top goals;
        • increasing the maturity of the PHP application life cycle,
        • showcasing the best practice of enterprise PHP
          development
        • contributing to/supporting PHP open source projects
        • supporting PHP user groups/communities
        • organizing conferences/seminar
        • developing localized training material
        • forming and maintaining partnerships with the
          communities and developing professional services.



www.mimos.my              © 2011 MIMOS Berhad. All Rights Reserved.
Events : Enterprise PHP Tech talk




  www.mimos.my    © 2011 MIMOS Berhad. All Rights Reserved.
Events : Facebook Developer Garage




  www.mimos.my   © 2011 MIMOS Berhad. All Rights Reserved.
Events : PHP Malaysia Meetup




  www.mimos.my   © 2011 MIMOS Berhad. All Rights Reserved.
Events : PHP Northwest, UK




  www.mimos.my   © 2011 MIMOS Berhad. All Rights Reserved.
http://goo.gl/EbTI




               Accelerating PHP Application




www.mimos.my     © 2011 MIMOS Berhad. All Rights Reserved.
The News




www.mimos.my   © 2011 MIMOS Berhad. All Rights Reserved.
iSDP
                                  Intelligent Service
                                   Delivery Platform

www.mimos.my   © 2011 MIMOS Berhad. All Rights Reserved.
The struggle begins..




www.mimos.my   © 2011 MIMOS Berhad. All Rights Reserved.
Agenda

        Who Am I
        PHP Center of Excellence
        The Curious Case of Enterprise PHP
          (How actually we makes PHP apps fly)
        Summary




www.mimos.my       © 2011 MIMOS Berhad. All Rights Reserved.
Enterprise == ?


www.mimos.my         © 2011 MIMOS Berhad. All Rights Reserved.
DBA
                                                                              Enterprise PHP
                                                                                        Designer
TEAM                   Sys. Ad
                                               Tester                        PHP Geek




                   PM
                                               Project Lead                       BA




  www.mimos.my                   © 2011 MIMOS Berhad. All Rights Reserved.
Enterprise PHP
TEAM
Requirement
 •Customer need this …
 •User want that …
 •My boss add this …
 •My BA... more headache …




   www.mimos.my         © 2011 MIMOS Berhad. All Rights Reserved.
"Faster sites create happy users”
– Google, April 9, 2010




  www.mimos.my       © 2011 MIMOS Berhad. All Rights Reserved.   http://www.flickr.com/photos/36230948@N05/
Web Application Lifecycle

        • Planning
               o Requirement Analysis
               o Design
        • Execution
               o Code
               o Test
        • Deployment
               o Sys Adm nightmare?

www.mimos.my            © 2011 MIMOS Berhad. All Rights Reserved.
Web Application Lifecycle

        • Planning
               o Requirement Analysis
               o Design
        • Execution
               o Code
               o Test
        • Deployment
               o Sys Adm nightmare?

www.mimos.my             © 2011 MIMOS Berhad. All Rights Reserved.
Web Application Lifecycle

        • Planning
               o Requirement Analysis
               o Design
        • Execution
               o Code
               o Test
        • Deployment
               o Sys Adm nightmare?

www.mimos.my             © 2011 MIMOS Berhad. All Rights Reserved.
Enterprise PHP
TEAM
Requirement
Architecture
 •Design Diagrams (Technical )
 •HLD
 •Blueprint




    www.mimos.my          © 2011 MIMOS Berhad. All Rights Reserved.
"Real performance is architecture-driven”
               - R.Lerdorf

www.mimos.my         © 2011 MIMOS Berhad. All Rights Reserved.   http://goo.gl/abCVp
"PHP is rarely the bottleneck”

                   -R.Lerdorf




  www.mimos.my       © 2011 MIMOS Berhad. All Rights Reserved.
Front End




               Back End




www.mimos.my         © 2011 MIMOS Berhad. All Rights Reserved.
Front End

               nginx                                               Zend Server




www.mimos.my           © 2011 MIMOS Berhad. All Rights Reserved.
Zend Server




               Back End
                                                                 MySQL




www.mimos.my         © 2011 MIMOS Berhad. All Rights Reserved.
Enterprise PHP
TEAM
Requirement
Architecture
Tools
 •Planning
 •Development
 •Deployment




    www.mimos.my        © 2011 MIMOS Berhad. All Rights Reserved.
Enterprise PHP
TEAM
Requirement
Architecture
Tools
Foundation
 •Stable?
 •Framework vs No-Framework
 •On Your Own Frame to-do work




    www.mimos.my        © 2011 MIMOS Berhad. All Rights Reserved.
Enterprise PHP

TEAM
Requirement
Architecture
Tools
Foundation
Design patterns
 •Best practice of solving probs.
 •MVC?




   www.mimos.my            © 2011 MIMOS Berhad. All Rights Reserved.
Enterprise PHP
TEAM
Requirement
Architecture
Tools
Foundation
Design patterns
Testing
 •Developer, Unit, Functional,
 Performance, Integration,
 Usability




    www.mimos.my          © 2011 MIMOS Berhad. All Rights Reserved.
Enterprise PHP
TEAM
Requirement
Architecture
Tools
Foundation
Design patterns
Testing
Optimization
 •They want it fast
 •We need
     •Accelerator (eAccelerator, Alternative PHP Cache, ionCube
     PHP Accelerator,Turck MMCache,XCache,Nusphere
     PhpExpress,Zend Optimizer+,Zend Platform
     •Cache (Smarty, Zend_Cache, Memcached)



    www.mimos.my                    © 2011 MIMOS Berhad. All Rights Reserved.
"Premature
                                                     optimization is the
                                                     root of all evil ”
                                                     - Donald Knuth




www.mimos.my   © 2011 MIMOS Berhad. All Rights Reserved.         http://goo.gl/twTea
Where to start

        • System calls
           o web server processes
           o Index
           o Web server config
           o Include
        o S-L-D-Ktrace / truss




www.mimos.my         © 2011 MIMOS Berhad. All Rights Reserved.
Find the culprit

        • Include hierachy > redundancy
           o Tools > pecl/inclued
           o include_once/require_once
           o Graph




www.mimos.my         © 2011 MIMOS Berhad. All Rights Reserved.
"Profile your code to pinpoint bottlenecks”

         - Eric Higgins
www.mimos.my              © 2011 MIMOS Berhad. All Rights Reserved.
Areas

        •      Code
        •      Network
        •      DB
        •      System




www.mimos.my             © 2011 MIMOS Berhad. All Rights Reserved.
Profiling Tools

        •      xdebug
        •      valgrind.org
        •      Xhprof
        •      Zend Studio/Server




www.mimos.my             © 2011 MIMOS Berhad. All Rights Reserved.
Enterprise PHP
TEAM
Requirement
Architecture
Tools
Foundation
Design patterns
Testing
Optimization
Security
 •Prevention of harmful event(s)
 •Real Risk
 •Severe consequences


    www.mimos.my         © 2011 MIMOS Berhad. All Rights Reserved.   http://goo.gl/nPgwj
Enterprise PHP
TEAM
Requirement
Architecture
Tools
Foundation
Design patterns
Testing
Optimization
Security
Deployment
 •Develop, Test, Deploy (Test, Live)
 •Simple XAMPP to HA, Scalable architecture


    www.mimos.my         © 2011 MIMOS Berhad. All Rights Reserved.
“Every nanoseconds count!” - My Big Boss
               (your boss also)
                                                                              http://geekonfilm.files.wordpress.com/2009/09/vader.jpg
www.mimos.my                      © 2011 MIMOS Berhad. All Rights Reserved.
Layers

        • Design
               o Algorithm used
               o Architecture
               o Special tricks
        • Code
               o Avoid ‘slowdowns’
        • Deploy
               o “it works on my dev machine!”



www.mimos.my              © 2011 MIMOS Berhad. All Rights Reserved.
Performance Enhancement

        •      Measure
        •      Benchmark
        •      Analyse
        •      (Loop?)




www.mimos.my               © 2011 MIMOS Berhad. All Rights Reserved.
Key Points

        • Avoid Premature Optimization
        • Measuring Performance
               o Memory and CPU Measurement
               o Requests Per Second
        •      Pinpointing The Cause Of Poor Performance
        •      Code Profiling
        •      Database Operations Analysis
        •      General PHP Optimisation
               o Opcode Caching
               o Realpath Cache
www.mimos.my             © 2011 MIMOS Berhad. All Rights Reserved.
Key Points

        • General Zend Framework Optimization
               o Class Loading Optimisation
               o Configuring Default Caches
               o Cache At The Right Level
               o Minimising Include Paths
        • HTTP Server Optimization
               o Optimising Apache's Configuration
               o Avoiding Apache Completely



www.mimos.my              © 2011 MIMOS Berhad. All Rights Reserved.
Enterprise PHP
TEAM
Requirement
Architecture
Tools
Foundation
Design patterns
Testing
Optimization
Security
Deployment
Operation
 •Helpdesk
 •Monitoring
 •Root cause analysis
 •Change management
    www.mimos.my        © 2011 MIMOS Berhad. All Rights Reserved.
Enterprise PHP
TEAM
Requirement
Architecture
Tools
Foundation
Design patterns
Testing
Optimization
Security
Deployment
Operation




www.mimos.my      © 2011 MIMOS Berhad. All Rights Reserved.
Agenda

        Who Am I
        PHP Center of Excellence
        The Curious Case of Enterprise PHP
        Summary




www.mimos.my       © 2011 MIMOS Berhad. All Rights Reserved.
Checklist

        •      Objectives & constraints
        •      What is the Problems
        •      Don’t make assumptions (VNV it)
        •      Right tools (but tools is just a tools)
        •      Use profiler with benchmarks
        •      Resources are limited (monitor them)




www.mimos.my              © 2011 MIMOS Berhad. All Rights Reserved.
Ready to make your web apps fly?




www.mimos.my   © 2011 MIMOS Berhad. All Rights Reserved.   http://goo.gl/abCVp
Resources

• Eric Higgins, Google Webmaster
  code.google.com/speed/articles/optimizing-php.html
• Rasmus’s talk at Hacker Dojo http://talks.php.net/show/digg/
• code.google.com/speed/page-speed
• developer.yahoo.com/performance/rules.html
• www.zend.com/en/products/server
• www.nginx.net
• www.survivethedeepend.com
• pecl.php.net/package/xhprof
• github.com/facebook/xhprof



 www.mimos.my          © 2011 MIMOS Berhad. All Rights Reserved.
THANK YOU

                                                                                                     @errazudin
                                                                                      errazudin.ishak@mimos.my


* All images, logos and data are the copyright of
their respective owners
     www.mimos.my                                   © 2009 MIMOS Berhad. All Rights Reserved.

More Related Content

Similar to Accelarating PHP Applications at INTAN Sabah Technology Updates 2011

DA with Wa - Desktop Apps With Web Apps
DA with Wa - Desktop Apps With Web AppsDA with Wa - Desktop Apps With Web Apps
DA with Wa - Desktop Apps With Web Apps
phptechtalk
 
Making Joomla! site fly with nginx : Joomla! day Malaysia 2011
Making Joomla! site fly with nginx : Joomla! day Malaysia 2011Making Joomla! site fly with nginx : Joomla! day Malaysia 2011
Making Joomla! site fly with nginx : Joomla! day Malaysia 2011phptechtalk
 
Hire Professional PHP Developer
Hire Professional PHP DeveloperHire Professional PHP Developer
Hire Professional PHP Developer
developeronrents
 
turbocharge your php with nginx - errazudin - phpnw2010
turbocharge your php with nginx - errazudin - phpnw2010turbocharge your php with nginx - errazudin - phpnw2010
turbocharge your php with nginx - errazudin - phpnw2010
Errazudin Ishak
 
Open sourcetechnologiessuccessstory allcountry_ver1.0
Open sourcetechnologiessuccessstory allcountry_ver1.0Open sourcetechnologiessuccessstory allcountry_ver1.0
Open sourcetechnologiessuccessstory allcountry_ver1.0GeoTech Informatics
 
Profile final
Profile finalProfile final
Profile finalorisys
 
Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...
Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...
Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...
jaxLondonConference
 
Are hypermedia API's Just Hype?
Are hypermedia API's Just Hype?Are hypermedia API's Just Hype?
Are hypermedia API's Just Hype?Daniel Feist
 
Web 2.0 Services
Web 2.0 ServicesWeb 2.0 Services
Web 2.0 Services
Michael Moir
 
Micro Everything - Our Road to Scale
Micro Everything - Our Road to ScaleMicro Everything - Our Road to Scale
Micro Everything - Our Road to Scale
Ahmad Assaf
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
Nguyen Tung
 
Osource Company Profile
Osource Company ProfileOsource Company Profile
Osource Company Profile
Shakhawat Shakhawat
 
Synectiks Microservice Platform
Synectiks Microservice PlatformSynectiks Microservice Platform
Synectiks Microservice Platform
Papu Bhattacharya
 
Legacy to industry leader: a modernization case study
Legacy to industry leader: a modernization case studyLegacy to industry leader: a modernization case study
Legacy to industry leader: a modernization case study
OSSCube
 
Corporate Presentation V4
Corporate Presentation V4Corporate Presentation V4
Corporate Presentation V4Nitiesh Bargav
 
Monitoring Application Attack Surface to Integrate Security into DevOps Pipel...
Monitoring Application Attack Surface to Integrate Security into DevOps Pipel...Monitoring Application Attack Surface to Integrate Security into DevOps Pipel...
Monitoring Application Attack Surface to Integrate Security into DevOps Pipel...
Denim Group
 
A Tale of Two Toolkits
A Tale of Two ToolkitsA Tale of Two Toolkits
A Tale of Two Toolkits
Zend by Rogue Wave Software
 
Android Development: Approach for Agile Teams
Android Development: Approach for Agile TeamsAndroid Development: Approach for Agile Teams
Android Development: Approach for Agile Teams
Anay Kamat
 
Rain Creatives
Rain CreativesRain Creatives
Rain Creatives
PoojaRC
 

Similar to Accelarating PHP Applications at INTAN Sabah Technology Updates 2011 (20)

DA with Wa - Desktop Apps With Web Apps
DA with Wa - Desktop Apps With Web AppsDA with Wa - Desktop Apps With Web Apps
DA with Wa - Desktop Apps With Web Apps
 
Making Joomla! site fly with nginx : Joomla! day Malaysia 2011
Making Joomla! site fly with nginx : Joomla! day Malaysia 2011Making Joomla! site fly with nginx : Joomla! day Malaysia 2011
Making Joomla! site fly with nginx : Joomla! day Malaysia 2011
 
Hire Professional PHP Developer
Hire Professional PHP DeveloperHire Professional PHP Developer
Hire Professional PHP Developer
 
turbocharge your php with nginx - errazudin - phpnw2010
turbocharge your php with nginx - errazudin - phpnw2010turbocharge your php with nginx - errazudin - phpnw2010
turbocharge your php with nginx - errazudin - phpnw2010
 
Open sourcetechnologiessuccessstory allcountry_ver1.0
Open sourcetechnologiessuccessstory allcountry_ver1.0Open sourcetechnologiessuccessstory allcountry_ver1.0
Open sourcetechnologiessuccessstory allcountry_ver1.0
 
Profile final
Profile finalProfile final
Profile final
 
Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...
Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...
Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...
 
Are hypermedia API's Just Hype?
Are hypermedia API's Just Hype?Are hypermedia API's Just Hype?
Are hypermedia API's Just Hype?
 
Technical trainings
Technical trainingsTechnical trainings
Technical trainings
 
Web 2.0 Services
Web 2.0 ServicesWeb 2.0 Services
Web 2.0 Services
 
Micro Everything - Our Road to Scale
Micro Everything - Our Road to ScaleMicro Everything - Our Road to Scale
Micro Everything - Our Road to Scale
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
 
Osource Company Profile
Osource Company ProfileOsource Company Profile
Osource Company Profile
 
Synectiks Microservice Platform
Synectiks Microservice PlatformSynectiks Microservice Platform
Synectiks Microservice Platform
 
Legacy to industry leader: a modernization case study
Legacy to industry leader: a modernization case studyLegacy to industry leader: a modernization case study
Legacy to industry leader: a modernization case study
 
Corporate Presentation V4
Corporate Presentation V4Corporate Presentation V4
Corporate Presentation V4
 
Monitoring Application Attack Surface to Integrate Security into DevOps Pipel...
Monitoring Application Attack Surface to Integrate Security into DevOps Pipel...Monitoring Application Attack Surface to Integrate Security into DevOps Pipel...
Monitoring Application Attack Surface to Integrate Security into DevOps Pipel...
 
A Tale of Two Toolkits
A Tale of Two ToolkitsA Tale of Two Toolkits
A Tale of Two Toolkits
 
Android Development: Approach for Agile Teams
Android Development: Approach for Agile TeamsAndroid Development: Approach for Agile Teams
Android Development: Approach for Agile Teams
 
Rain Creatives
Rain CreativesRain Creatives
Rain Creatives
 

More from phptechtalk

Errazudin - REST in pieces (with frapi) - Malaysia Open Source Conference 2011
Errazudin - REST in pieces (with frapi) - Malaysia Open Source Conference 2011Errazudin - REST in pieces (with frapi) - Malaysia Open Source Conference 2011
Errazudin - REST in pieces (with frapi) - Malaysia Open Source Conference 2011
phptechtalk
 
Slipstream Rapid Application Design
Slipstream Rapid Application DesignSlipstream Rapid Application Design
Slipstream Rapid Application Design
phptechtalk
 
Zend In The Cloud
Zend In The CloudZend In The Cloud
Zend In The Cloud
phptechtalk
 
Php In The Enterprise 01 24 2010
Php In The Enterprise 01 24 2010Php In The Enterprise 01 24 2010
Php In The Enterprise 01 24 2010
phptechtalk
 
P Hundamental Security Coding Secure With Php Lamp
P Hundamental Security Coding Secure With Php LampP Hundamental Security Coding Secure With Php Lamp
P Hundamental Security Coding Secure With Php Lamp
phptechtalk
 
Zend Solutions For Operational Maturity 01 21 2010
Zend Solutions For Operational Maturity 01 21 2010Zend Solutions For Operational Maturity 01 21 2010
Zend Solutions For Operational Maturity 01 21 2010
phptechtalk
 
Enabling The Enterprise With Php
Enabling The Enterprise With PhpEnabling The Enterprise With Php
Enabling The Enterprise With Php
phptechtalk
 

More from phptechtalk (7)

Errazudin - REST in pieces (with frapi) - Malaysia Open Source Conference 2011
Errazudin - REST in pieces (with frapi) - Malaysia Open Source Conference 2011Errazudin - REST in pieces (with frapi) - Malaysia Open Source Conference 2011
Errazudin - REST in pieces (with frapi) - Malaysia Open Source Conference 2011
 
Slipstream Rapid Application Design
Slipstream Rapid Application DesignSlipstream Rapid Application Design
Slipstream Rapid Application Design
 
Zend In The Cloud
Zend In The CloudZend In The Cloud
Zend In The Cloud
 
Php In The Enterprise 01 24 2010
Php In The Enterprise 01 24 2010Php In The Enterprise 01 24 2010
Php In The Enterprise 01 24 2010
 
P Hundamental Security Coding Secure With Php Lamp
P Hundamental Security Coding Secure With Php LampP Hundamental Security Coding Secure With Php Lamp
P Hundamental Security Coding Secure With Php Lamp
 
Zend Solutions For Operational Maturity 01 21 2010
Zend Solutions For Operational Maturity 01 21 2010Zend Solutions For Operational Maturity 01 21 2010
Zend Solutions For Operational Maturity 01 21 2010
 
Enabling The Enterprise With Php
Enabling The Enterprise With PhpEnabling The Enterprise With Php
Enabling The Enterprise With Php
 

Recently uploaded

Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 

Recently uploaded (20)

Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 

Accelarating PHP Applications at INTAN Sabah Technology Updates 2011

  • 1. Accelerating PHP Applications Errazudin Ishak www.mimos.my © 2009 MIMOS Berhad. All Rights Reserved.
  • 2. Agenda Who Am I PHP Center of Excellence The Curious Case of Enterprise PHP Summary www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 3. Me Senior engineer @ Mimos Berhad Focuses on web application development, deployment, performance and stability. 2009 : foss.my , MyGOSSCON 2010 : Entp. PHP Techtalk, BarcampKL, PHP Meetup, MOSC2010, PHPNW UK, PHP20102010, MyGOSSCON www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 4. Agenda Who Am I PHP Centre of Excellence The Curious Case of Enterprise PHP Summary www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 5. phpcoe.mimos.my www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 6. phpcoe.mimos.my Top goals; • increasing the maturity of the PHP application life cycle, • showcasing the best practice of enterprise PHP development • contributing to/supporting PHP open source projects • supporting PHP user groups/communities • organizing conferences/seminar • developing localized training material • forming and maintaining partnerships with the communities and developing professional services. www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 7. Events : Enterprise PHP Tech talk www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 8. Events : Facebook Developer Garage www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 9. Events : PHP Malaysia Meetup www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 10. Events : PHP Northwest, UK www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 11. http://goo.gl/EbTI Accelerating PHP Application www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 12. The News www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 13. iSDP Intelligent Service Delivery Platform www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 14. The struggle begins.. www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 15. Agenda Who Am I PHP Center of Excellence The Curious Case of Enterprise PHP (How actually we makes PHP apps fly) Summary www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 16. Enterprise == ? www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 17. DBA Enterprise PHP Designer TEAM Sys. Ad Tester PHP Geek PM Project Lead BA www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 18. Enterprise PHP TEAM Requirement •Customer need this … •User want that … •My boss add this … •My BA... more headache … www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 19. "Faster sites create happy users” – Google, April 9, 2010 www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved. http://www.flickr.com/photos/36230948@N05/
  • 20. Web Application Lifecycle • Planning o Requirement Analysis o Design • Execution o Code o Test • Deployment o Sys Adm nightmare? www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 21. Web Application Lifecycle • Planning o Requirement Analysis o Design • Execution o Code o Test • Deployment o Sys Adm nightmare? www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 22. Web Application Lifecycle • Planning o Requirement Analysis o Design • Execution o Code o Test • Deployment o Sys Adm nightmare? www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 23. Enterprise PHP TEAM Requirement Architecture •Design Diagrams (Technical ) •HLD •Blueprint www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 24. "Real performance is architecture-driven” - R.Lerdorf www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved. http://goo.gl/abCVp
  • 25. "PHP is rarely the bottleneck” -R.Lerdorf www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 26. Front End Back End www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 27. Front End nginx Zend Server www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 28. Zend Server Back End MySQL www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 29. Enterprise PHP TEAM Requirement Architecture Tools •Planning •Development •Deployment www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 30. Enterprise PHP TEAM Requirement Architecture Tools Foundation •Stable? •Framework vs No-Framework •On Your Own Frame to-do work www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 31. Enterprise PHP TEAM Requirement Architecture Tools Foundation Design patterns •Best practice of solving probs. •MVC? www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 32. Enterprise PHP TEAM Requirement Architecture Tools Foundation Design patterns Testing •Developer, Unit, Functional, Performance, Integration, Usability www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 33. Enterprise PHP TEAM Requirement Architecture Tools Foundation Design patterns Testing Optimization •They want it fast •We need •Accelerator (eAccelerator, Alternative PHP Cache, ionCube PHP Accelerator,Turck MMCache,XCache,Nusphere PhpExpress,Zend Optimizer+,Zend Platform •Cache (Smarty, Zend_Cache, Memcached) www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 34. "Premature optimization is the root of all evil ” - Donald Knuth www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved. http://goo.gl/twTea
  • 35. Where to start • System calls o web server processes o Index o Web server config o Include o S-L-D-Ktrace / truss www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 36. Find the culprit • Include hierachy > redundancy o Tools > pecl/inclued o include_once/require_once o Graph www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 37. "Profile your code to pinpoint bottlenecks” - Eric Higgins www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 38. Areas • Code • Network • DB • System www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 39. Profiling Tools • xdebug • valgrind.org • Xhprof • Zend Studio/Server www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 40. Enterprise PHP TEAM Requirement Architecture Tools Foundation Design patterns Testing Optimization Security •Prevention of harmful event(s) •Real Risk •Severe consequences www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved. http://goo.gl/nPgwj
  • 41. Enterprise PHP TEAM Requirement Architecture Tools Foundation Design patterns Testing Optimization Security Deployment •Develop, Test, Deploy (Test, Live) •Simple XAMPP to HA, Scalable architecture www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 42. “Every nanoseconds count!” - My Big Boss (your boss also) http://geekonfilm.files.wordpress.com/2009/09/vader.jpg www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 43. Layers • Design o Algorithm used o Architecture o Special tricks • Code o Avoid ‘slowdowns’ • Deploy o “it works on my dev machine!” www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 44. Performance Enhancement • Measure • Benchmark • Analyse • (Loop?) www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 45. Key Points • Avoid Premature Optimization • Measuring Performance o Memory and CPU Measurement o Requests Per Second • Pinpointing The Cause Of Poor Performance • Code Profiling • Database Operations Analysis • General PHP Optimisation o Opcode Caching o Realpath Cache www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 46. Key Points • General Zend Framework Optimization o Class Loading Optimisation o Configuring Default Caches o Cache At The Right Level o Minimising Include Paths • HTTP Server Optimization o Optimising Apache's Configuration o Avoiding Apache Completely www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 47. Enterprise PHP TEAM Requirement Architecture Tools Foundation Design patterns Testing Optimization Security Deployment Operation •Helpdesk •Monitoring •Root cause analysis •Change management www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 49. Agenda Who Am I PHP Center of Excellence The Curious Case of Enterprise PHP Summary www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 50. Checklist • Objectives & constraints • What is the Problems • Don’t make assumptions (VNV it) • Right tools (but tools is just a tools) • Use profiler with benchmarks • Resources are limited (monitor them) www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 51. Ready to make your web apps fly? www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved. http://goo.gl/abCVp
  • 52. Resources • Eric Higgins, Google Webmaster code.google.com/speed/articles/optimizing-php.html • Rasmus’s talk at Hacker Dojo http://talks.php.net/show/digg/ • code.google.com/speed/page-speed • developer.yahoo.com/performance/rules.html • www.zend.com/en/products/server • www.nginx.net • www.survivethedeepend.com • pecl.php.net/package/xhprof • github.com/facebook/xhprof www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 53. THANK YOU @errazudin errazudin.ishak@mimos.my * All images, logos and data are the copyright of their respective owners www.mimos.my © 2009 MIMOS Berhad. All Rights Reserved.