SlideShare ist ein Scribd-Unternehmen logo
1 von 30
Do you queue? Characteristics of scalability Kevin Schroeder Technology Evangelist Zend Technologies
About me  Past: Programming/Sys Admin  Current: Technology Evangelist/Author/Composer          @kpschrade
I blog at eschrade.com Follow us! (good things will happen to you) Zend Technologies http://twitter.com/zend http://twitter.com/kpschrade (me!)
Twtpoll results Could your PHP apps benefit from being able to process data or execute asynchronously?
Why would you want to queue? Performance Execute logic apart from the main request (asynchronicity) Scalability The ability to handle non-immediate logic as resources are available
Typical anatomy of a PHP Application Bad for scala-bility! Presentation Application Control Database Access Business Logic Presentation Application Control Business Logic Presentation | 6
Good for Scalability Presentation Something.phtml Something.phtml Something.phtml Something.phtml Something.phtml Something.phtml Something.phtml Something.phtml Application Control Something.php Something.php Something.php Something.php Something.php Something.php Something.php Something.php Business Logic Something.php Something.php Something.php Something.php Something.php Something.php Something.php Something.php Database Access Something.php Something.php Something.php Something.php Something.php Something.php Something.php Something.php | 7  |   2-Mar-11
What helps make software scalable? Defined tasks Loose coupling Resource discovery
The Golden Rule of Scalability “It can probably wait”
Asynchronous execution uses Pre-caching data Data analysis Data processing Pre-calculating (preparing data for the next request) Data is “out of date” once it leaves the web server Immediacy is seldom necessary
Considerations Waste disk space Control usage (don’t let users do anything they want) Pre-calculate as much as possible Calculate and cache/store Keep data processing off the front end servers Don’t just cache Don’t let it substitute for thought Cache hit rates can be meaningless if you have hundreds of cache hits for a request
Considerations ,[object Object]
Make as much as possible configurable/discoverableDecouple/Partition Don’t tie everything (relationships and such) into the database Use queues/messaging Stomp interfaces are really good for PHP – Can also use Java Bridge Zend_Queue has several interfaces Try to use stateless interfaces (polling is more scalable than idle connections)
Options Use Cron /w PHP CLI (not the best idea) People mostly use cron simply due to availability It’s an available option, not necessarily the best option. Use Gearman Use home-grown (don’t do this) Use pcntl_fork() (NEVER do this) Use Zend Server Job Queue
Your only real options Very cloud friendly * I am not an expert on Gearman.  Corrections will be taken in the spirit that they are given. For obvious reasons, I will focus on Zend Server
Zend Framework Zend Server PHP Application Performance Reliability & Management Scale-Out Business-grade PHP Acceleration Monitoring Clustering Hot Fixes Optimization Root-Cause Job Queue Support Caching Downloads Java Bridge Configuration Linux (rpm/web repositories) IBM i (PTF) Windows (MSI)  What the heck is Zend Server? 15 Zend Server
Job Queue Architecture – Elastic Backend Web Server /w JQ Web Server Users! Web Server /w JQ Web Server Load Balancer Web Server /w JQ Web Server Pros Scale the backend as necessary Default (easy) mechanism Cons Getting the job status requires using a DB
Job Queue Architecture – Elastic Frontend Web Server Web Server /w JQ Users! Web Server Web Server /w JQ Load Balancer Web Server Web Server /w JQ Pros Easy to communicate with the Job Queue server handling the job Cons Requires you to build your own interface (or just use mine!)
Kevin’s favorite way to implement it Create a task-handling controller Create an abstract task class Understands the Job Queue Self contained If Elastic Backend: connects to localhost If Elastic Frontend: connects to load balancer (my preferred), load balanced JQ servers manage themselves Execute the task, have it serialize itself and send it to send to the task handler
Classes involved in the demo Manager Handles connecting to the queue and passing results back and forth JobAbstract Abstract class that a job would be based off of Response The response from the manager when a job is queued.  Contains the server name and job number GetRemoteLinks Scans a given web page and reports back a list of all the links on the page
Execution Flow Create job and set data Execute job Job passes itself to the queue manager Manager serializes job Manager uses HTTP call through a load balancer to queue the job The queue on the other end returns the job id and server name Job ID and server name is passed to the client Client polls the manager to get a completed job When the job is returned pass the serialized version of the executed job
Demo
Neato, but how in the world does this pertain to Magento?
How? Long running front-end requests kill front-end responsiveness which kills the user experience 40% will wait no more than 4 seconds for a website (Forrester) Calculating cache data on-the-fly can lead to bad user experiences (abruptly slow page load times) and consistency problems Long running page requests can push up against max_execution_time For example, handling payments from a slow CC API Simply setting it to run longer is a band-aid on a broken bone
Solution? Build Zend Server integration extensions Zendserver_Jobqueue Zendserver_Monitor Utilize the event system to intercept actions Async_Payment  (for payments, in this case) Profit! (scalability AND performance, actually)
Building a job Install the Zend Server Magento extension Create a class that extends Zendserver_Jobqueue_JobAbstract Call $job->execute();
Payment as an example Hooks an observer into controller_action_predispatch_checkout_onepage_saveOrder, core_block_abstract_to_html_after Checks if a defined template is being rendered Injects JavaScript that changes the review.save() method Injects a new URL for submitting the transaction which creates a job Passes POSTed data to a job Job executes by submitting the payment URL on behalf of the browser, storing the result Browser pings the server to see if the job has completed executing yet
Scaling the solution Webserver Job Queue/ Webserver Webserver Load Balancer Job Queue/ Webserver Webserver Job Queue/ Webserver * Duplicate deployments on ALL machines Database or Session Clustering
Downloads Zend Server http://www.zend.com/server Zendserver_Jobqueue https://github.com/kschroeder/Magento-ZendServer-JobQueue Zendserver_Monitor https://github.com/kschroeder/Magento-ZendServer-Monitor Async_Payment https://github.com/kschroeder/Magento-Async-Payment Job Queue library & demo https://github.com/kschroeder/ZendServer-JobQueue-Job-API http://bit.ly/hWJBYw
Magento/Zend Case Study - http://bit.ly/horpFF Follow us! Zend Technologies http://twitter.com/zend http://twitter.com/kpschrade (me!)

Weitere ähnliche Inhalte

Was ist angesagt?

Synthetic web performance testing with Selenium
Synthetic web performance testing with SeleniumSynthetic web performance testing with Selenium
Synthetic web performance testing with SeleniumAndriy Samilyak
 
Odoo - Open Source CMS: A performance comparision
Odoo - Open Source CMS: A performance comparisionOdoo - Open Source CMS: A performance comparision
Odoo - Open Source CMS: A performance comparisionOdoo
 
How To Install Magento 2 (updated for the latest version)
How To Install Magento 2 (updated for the latest version)How To Install Magento 2 (updated for the latest version)
How To Install Magento 2 (updated for the latest version)Magestore
 
Magento on HHVM. Daniel Sloof
Magento on HHVM. Daniel SloofMagento on HHVM. Daniel Sloof
Magento on HHVM. Daniel SloofMeetMagentoNY2014
 
Testing CRM from a 360 View - extremeCRM Rome 2013
Testing CRM from a 360 View - extremeCRM Rome 2013Testing CRM from a 360 View - extremeCRM Rome 2013
Testing CRM from a 360 View - extremeCRM Rome 2013Wael Hamze
 
Bringing the JAMstack to the Enterprise
Bringing the JAMstack to the EnterpriseBringing the JAMstack to the Enterprise
Bringing the JAMstack to the EnterpriseJamund Ferguson
 
Client side production monitoring using - SyncApp Tool
Client side production monitoring using - SyncApp ToolClient side production monitoring using - SyncApp Tool
Client side production monitoring using - SyncApp ToolBhupesh Pant
 
PHP on Windows 2008
PHP on Windows 2008PHP on Windows 2008
PHP on Windows 2008jorke
 
Sergii Shymko: Magento 2: Composer for Extensions Distribution
Sergii Shymko: Magento 2: Composer for Extensions DistributionSergii Shymko: Magento 2: Composer for Extensions Distribution
Sergii Shymko: Magento 2: Composer for Extensions DistributionMeet Magento Italy
 
Alexander Mostovenko "'Devide at impera' with GraphQL and SSR"
Alexander Mostovenko "'Devide at impera' with GraphQL and SSR"Alexander Mostovenko "'Devide at impera' with GraphQL and SSR"
Alexander Mostovenko "'Devide at impera' with GraphQL and SSR"Fwdays
 
Splunk conf2014 - Using Selenium and Splunk for Transaction Monitoring Insight
Splunk conf2014 - Using Selenium and Splunk for Transaction Monitoring InsightSplunk conf2014 - Using Selenium and Splunk for Transaction Monitoring Insight
Splunk conf2014 - Using Selenium and Splunk for Transaction Monitoring InsightSplunk
 
Build your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and webBuild your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and webColdFusionConference
 
Novidades Angular 4.x e CLI
Novidades Angular 4.x e CLI Novidades Angular 4.x e CLI
Novidades Angular 4.x e CLI Loiane Groner
 
Test & Dynamics CRM - extremeCRM Berlin 2012
Test & Dynamics CRM - extremeCRM Berlin 2012Test & Dynamics CRM - extremeCRM Berlin 2012
Test & Dynamics CRM - extremeCRM Berlin 2012Wael Hamze
 
Core web vitals – Business impact and best practices - Meet Magento UK 2021
Core web vitals – Business impact and best practices - Meet Magento UK 2021Core web vitals – Business impact and best practices - Meet Magento UK 2021
Core web vitals – Business impact and best practices - Meet Magento UK 2021Andrey Lipattsev
 
WSO2 Test Automation Framework : Approach and Adoption
WSO2 Test Automation Framework : Approach and AdoptionWSO2 Test Automation Framework : Approach and Adoption
WSO2 Test Automation Framework : Approach and AdoptionWSO2
 
Web performance testing with web driver
Web performance testing with web driverWeb performance testing with web driver
Web performance testing with web driverMichael Klepikov
 

Was ist angesagt? (20)

Synthetic web performance testing with Selenium
Synthetic web performance testing with SeleniumSynthetic web performance testing with Selenium
Synthetic web performance testing with Selenium
 
Odoo - Open Source CMS: A performance comparision
Odoo - Open Source CMS: A performance comparisionOdoo - Open Source CMS: A performance comparision
Odoo - Open Source CMS: A performance comparision
 
Rare frontend testing
Rare frontend testingRare frontend testing
Rare frontend testing
 
React Server Side Rendering with Next.js
React Server Side Rendering with Next.jsReact Server Side Rendering with Next.js
React Server Side Rendering with Next.js
 
How To Install Magento 2 (updated for the latest version)
How To Install Magento 2 (updated for the latest version)How To Install Magento 2 (updated for the latest version)
How To Install Magento 2 (updated for the latest version)
 
Magento on HHVM. Daniel Sloof
Magento on HHVM. Daniel SloofMagento on HHVM. Daniel Sloof
Magento on HHVM. Daniel Sloof
 
Mastering API Testing With Python in Bangalore
Mastering API Testing With Python in Bangalore      Mastering API Testing With Python in Bangalore
Mastering API Testing With Python in Bangalore
 
Testing CRM from a 360 View - extremeCRM Rome 2013
Testing CRM from a 360 View - extremeCRM Rome 2013Testing CRM from a 360 View - extremeCRM Rome 2013
Testing CRM from a 360 View - extremeCRM Rome 2013
 
Bringing the JAMstack to the Enterprise
Bringing the JAMstack to the EnterpriseBringing the JAMstack to the Enterprise
Bringing the JAMstack to the Enterprise
 
Client side production monitoring using - SyncApp Tool
Client side production monitoring using - SyncApp ToolClient side production monitoring using - SyncApp Tool
Client side production monitoring using - SyncApp Tool
 
PHP on Windows 2008
PHP on Windows 2008PHP on Windows 2008
PHP on Windows 2008
 
Sergii Shymko: Magento 2: Composer for Extensions Distribution
Sergii Shymko: Magento 2: Composer for Extensions DistributionSergii Shymko: Magento 2: Composer for Extensions Distribution
Sergii Shymko: Magento 2: Composer for Extensions Distribution
 
Alexander Mostovenko "'Devide at impera' with GraphQL and SSR"
Alexander Mostovenko "'Devide at impera' with GraphQL and SSR"Alexander Mostovenko "'Devide at impera' with GraphQL and SSR"
Alexander Mostovenko "'Devide at impera' with GraphQL and SSR"
 
Splunk conf2014 - Using Selenium and Splunk for Transaction Monitoring Insight
Splunk conf2014 - Using Selenium and Splunk for Transaction Monitoring InsightSplunk conf2014 - Using Selenium and Splunk for Transaction Monitoring Insight
Splunk conf2014 - Using Selenium and Splunk for Transaction Monitoring Insight
 
Build your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and webBuild your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and web
 
Novidades Angular 4.x e CLI
Novidades Angular 4.x e CLI Novidades Angular 4.x e CLI
Novidades Angular 4.x e CLI
 
Test & Dynamics CRM - extremeCRM Berlin 2012
Test & Dynamics CRM - extremeCRM Berlin 2012Test & Dynamics CRM - extremeCRM Berlin 2012
Test & Dynamics CRM - extremeCRM Berlin 2012
 
Core web vitals – Business impact and best practices - Meet Magento UK 2021
Core web vitals – Business impact and best practices - Meet Magento UK 2021Core web vitals – Business impact and best practices - Meet Magento UK 2021
Core web vitals – Business impact and best practices - Meet Magento UK 2021
 
WSO2 Test Automation Framework : Approach and Adoption
WSO2 Test Automation Framework : Approach and AdoptionWSO2 Test Automation Framework : Approach and Adoption
WSO2 Test Automation Framework : Approach and Adoption
 
Web performance testing with web driver
Web performance testing with web driverWeb performance testing with web driver
Web performance testing with web driver
 

Ähnlich wie Magento's Imagine eCommerce Conference: Do You Queue?

Slideshare - Magento Imagine - Do You Queue
Slideshare - Magento Imagine - Do You QueueSlideshare - Magento Imagine - Do You Queue
Slideshare - Magento Imagine - Do You Queue10n Software, LLC
 
Scaling PHP Applications with Zend Platform
Scaling PHP Applications with Zend PlatformScaling PHP Applications with Zend Platform
Scaling PHP Applications with Zend PlatformShahar Evron
 
Slides from LAX & DEN usergroup meetings
Slides from LAX & DEN usergroup meetingsSlides from LAX & DEN usergroup meetings
Slides from LAX & DEN usergroup meetings10n Software, LLC
 
Magento performancenbs
Magento performancenbsMagento performancenbs
Magento performancenbsvarien
 
PHP – Faster And Cheaper. Scale Vertically with IBM i
PHP – Faster And Cheaper. Scale Vertically with IBM iPHP – Faster And Cheaper. Scale Vertically with IBM i
PHP – Faster And Cheaper. Scale Vertically with IBM iSam Hennessy
 
PHP Performance: Principles and tools
PHP Performance: Principles and toolsPHP Performance: Principles and tools
PHP Performance: Principles and tools10n Software, LLC
 
Web Performance, Scalability, and Testing Techniques - Boston PHP Meetup
Web Performance, Scalability, and Testing Techniques - Boston PHP MeetupWeb Performance, Scalability, and Testing Techniques - Boston PHP Meetup
Web Performance, Scalability, and Testing Techniques - Boston PHP MeetupJonathan Klein
 
Web Development Foundation & Team Collaboration
Web Development Foundation & Team CollaborationWeb Development Foundation & Team Collaboration
Web Development Foundation & Team CollaborationSupanat Potiwarakorn
 
The 90-Day Startup with Google AppEngine for Java
The 90-Day Startup with Google AppEngine for JavaThe 90-Day Startup with Google AppEngine for Java
The 90-Day Startup with Google AppEngine for JavaDavid Chandler
 
Open Source Web Technologies
Open Source Web TechnologiesOpen Source Web Technologies
Open Source Web TechnologiesAastha Sethi
 
Performance automation 101 @LDNWebPerf MickMcGuinness
Performance automation 101 @LDNWebPerf MickMcGuinnessPerformance automation 101 @LDNWebPerf MickMcGuinness
Performance automation 101 @LDNWebPerf MickMcGuinnessStephen Thair
 
Modular Web Applications With Netzke
Modular Web Applications With NetzkeModular Web Applications With Netzke
Modular Web Applications With Netzkenetzke
 
Web performance optimization
Web performance optimizationWeb performance optimization
Web performance optimizationKaliop-slide
 
ASPNET for PHP Developers
ASPNET for PHP DevelopersASPNET for PHP Developers
ASPNET for PHP DevelopersWes Yanaga
 
Architecting single-page front-end apps
Architecting single-page front-end appsArchitecting single-page front-end apps
Architecting single-page front-end appsZohar Arad
 
Getting Started with Zend Framework
Getting Started with Zend FrameworkGetting Started with Zend Framework
Getting Started with Zend FrameworkJuan Antonio
 
Agile Development in .NET
Agile Development in .NETAgile Development in .NET
Agile Development in .NETdanhermes
 

Ähnlich wie Magento's Imagine eCommerce Conference: Do You Queue? (20)

Slideshare - Magento Imagine - Do You Queue
Slideshare - Magento Imagine - Do You QueueSlideshare - Magento Imagine - Do You Queue
Slideshare - Magento Imagine - Do You Queue
 
North east user group tour
North east user group tourNorth east user group tour
North east user group tour
 
Do you queue (updated)
Do you queue (updated)Do you queue (updated)
Do you queue (updated)
 
Scaling PHP Applications with Zend Platform
Scaling PHP Applications with Zend PlatformScaling PHP Applications with Zend Platform
Scaling PHP Applications with Zend Platform
 
Slides from LAX & DEN usergroup meetings
Slides from LAX & DEN usergroup meetingsSlides from LAX & DEN usergroup meetings
Slides from LAX & DEN usergroup meetings
 
Magento performancenbs
Magento performancenbsMagento performancenbs
Magento performancenbs
 
PHP – Faster And Cheaper. Scale Vertically with IBM i
PHP – Faster And Cheaper. Scale Vertically with IBM iPHP – Faster And Cheaper. Scale Vertically with IBM i
PHP – Faster And Cheaper. Scale Vertically with IBM i
 
PHP Performance: Principles and tools
PHP Performance: Principles and toolsPHP Performance: Principles and tools
PHP Performance: Principles and tools
 
Web Performance, Scalability, and Testing Techniques - Boston PHP Meetup
Web Performance, Scalability, and Testing Techniques - Boston PHP MeetupWeb Performance, Scalability, and Testing Techniques - Boston PHP Meetup
Web Performance, Scalability, and Testing Techniques - Boston PHP Meetup
 
Web Development Foundation & Team Collaboration
Web Development Foundation & Team CollaborationWeb Development Foundation & Team Collaboration
Web Development Foundation & Team Collaboration
 
The 90-Day Startup with Google AppEngine for Java
The 90-Day Startup with Google AppEngine for JavaThe 90-Day Startup with Google AppEngine for Java
The 90-Day Startup with Google AppEngine for Java
 
Open Source Web Technologies
Open Source Web TechnologiesOpen Source Web Technologies
Open Source Web Technologies
 
Performance automation 101 @LDNWebPerf MickMcGuinness
Performance automation 101 @LDNWebPerf MickMcGuinnessPerformance automation 101 @LDNWebPerf MickMcGuinness
Performance automation 101 @LDNWebPerf MickMcGuinness
 
Modular Web Applications With Netzke
Modular Web Applications With NetzkeModular Web Applications With Netzke
Modular Web Applications With Netzke
 
Web performance optimization
Web performance optimizationWeb performance optimization
Web performance optimization
 
ASPNET for PHP Developers
ASPNET for PHP DevelopersASPNET for PHP Developers
ASPNET for PHP Developers
 
Architecting single-page front-end apps
Architecting single-page front-end appsArchitecting single-page front-end apps
Architecting single-page front-end apps
 
Getting Started with Zend Framework
Getting Started with Zend FrameworkGetting Started with Zend Framework
Getting Started with Zend Framework
 
Agile Development in .NET
Agile Development in .NETAgile Development in .NET
Agile Development in .NET
 
Presemtation Tier Optimizations
Presemtation Tier OptimizationsPresemtation Tier Optimizations
Presemtation Tier Optimizations
 

Mehr von varien

Driving Business Innovation with Magento
Driving Business Innovation with MagentoDriving Business Innovation with Magento
Driving Business Innovation with Magentovarien
 
Best Practices for Launching an Enterprise Business on Magento
Best Practices for Launching an Enterprise Business on MagentoBest Practices for Launching an Enterprise Business on Magento
Best Practices for Launching an Enterprise Business on Magentovarien
 
Magento Imagine eCommerce, Day 1, Roy Rubin Co-Founder & CEO
Magento Imagine eCommerce, Day 1, Roy Rubin Co-Founder & CEOMagento Imagine eCommerce, Day 1, Roy Rubin Co-Founder & CEO
Magento Imagine eCommerce, Day 1, Roy Rubin Co-Founder & CEOvarien
 
Magento Imagine Conference: With Friends Like These Who Needs Revenue?
Magento Imagine Conference: With Friends Like These Who Needs Revenue?Magento Imagine Conference: With Friends Like These Who Needs Revenue?
Magento Imagine Conference: With Friends Like These Who Needs Revenue?varien
 
Magento Imagine eCommerce Conference - February 2011 - Unit Testing with Magento
Magento Imagine eCommerce Conference - February 2011 - Unit Testing with MagentoMagento Imagine eCommerce Conference - February 2011 - Unit Testing with Magento
Magento Imagine eCommerce Conference - February 2011 - Unit Testing with Magentovarien
 
Magento Imagine eCommerce Conference 2011: Using Magento's Import Module
Magento Imagine eCommerce Conference 2011: Using Magento's Import ModuleMagento Imagine eCommerce Conference 2011: Using Magento's Import Module
Magento Imagine eCommerce Conference 2011: Using Magento's Import Modulevarien
 
Magento Imagine eCommerce Conference:5 Way to Supercharge your Magento Enterp...
Magento Imagine eCommerce Conference:5 Way to Supercharge your Magento Enterp...Magento Imagine eCommerce Conference:5 Way to Supercharge your Magento Enterp...
Magento Imagine eCommerce Conference:5 Way to Supercharge your Magento Enterp...varien
 
Magento Imagine eCommerce Conference February 2011: Optimizing Magento For Pe...
Magento Imagine eCommerce Conference February 2011: Optimizing Magento For Pe...Magento Imagine eCommerce Conference February 2011: Optimizing Magento For Pe...
Magento Imagine eCommerce Conference February 2011: Optimizing Magento For Pe...varien
 
Magento Imgine eCommerce Conference February 2011: Mashup of Magento and Sale...
Magento Imgine eCommerce Conference February 2011: Mashup of Magento and Sale...Magento Imgine eCommerce Conference February 2011: Mashup of Magento and Sale...
Magento Imgine eCommerce Conference February 2011: Mashup of Magento and Sale...varien
 
Best Practices for Magento Debugging
Best Practices for Magento Debugging Best Practices for Magento Debugging
Best Practices for Magento Debugging varien
 
Getting from Here to There: How to assess your business, define an overall eC...
Getting from Here to There: How to assess your business, define an overall eC...Getting from Here to There: How to assess your business, define an overall eC...
Getting from Here to There: How to assess your business, define an overall eC...varien
 
Magento Imagine eCommerce, Day 2, Yoav Kutner CTO
Magento Imagine eCommerce, Day 2, Yoav Kutner CTOMagento Imagine eCommerce, Day 2, Yoav Kutner CTO
Magento Imagine eCommerce, Day 2, Yoav Kutner CTOvarien
 
Optimizing Magento Performance with Zend Server
Optimizing Magento Performance with Zend ServerOptimizing Magento Performance with Zend Server
Optimizing Magento Performance with Zend Servervarien
 
Magento Roy Rubin Amsterdam Presentation
Magento Roy Rubin Amsterdam PresentationMagento Roy Rubin Amsterdam Presentation
Magento Roy Rubin Amsterdam Presentationvarien
 
Maximizing Magento: Getting the Most out of Multi-Store Management
Maximizing Magento: Getting the Most out of Multi-Store ManagementMaximizing Magento: Getting the Most out of Multi-Store Management
Maximizing Magento: Getting the Most out of Multi-Store Managementvarien
 
Maximizing Magento: Getting the Most out of Promotions
Maximizing Magento: Getting the Most out of PromotionsMaximizing Magento: Getting the Most out of Promotions
Maximizing Magento: Getting the Most out of Promotionsvarien
 
Vortrag über Magento auf der InternetWorld 2008
Vortrag über Magento auf der InternetWorld 2008Vortrag über Magento auf der InternetWorld 2008
Vortrag über Magento auf der InternetWorld 2008varien
 
Selecting the 'Right' eCommerce Plaform
Selecting the 'Right' eCommerce PlaformSelecting the 'Right' eCommerce Plaform
Selecting the 'Right' eCommerce Plaformvarien
 
Magento eCommerce And The Next Generation Of PHP
Magento eCommerce And The Next Generation Of PHPMagento eCommerce And The Next Generation Of PHP
Magento eCommerce And The Next Generation Of PHPvarien
 
Under the Radar Magento Presentation
Under the Radar Magento PresentationUnder the Radar Magento Presentation
Under the Radar Magento Presentationvarien
 

Mehr von varien (20)

Driving Business Innovation with Magento
Driving Business Innovation with MagentoDriving Business Innovation with Magento
Driving Business Innovation with Magento
 
Best Practices for Launching an Enterprise Business on Magento
Best Practices for Launching an Enterprise Business on MagentoBest Practices for Launching an Enterprise Business on Magento
Best Practices for Launching an Enterprise Business on Magento
 
Magento Imagine eCommerce, Day 1, Roy Rubin Co-Founder & CEO
Magento Imagine eCommerce, Day 1, Roy Rubin Co-Founder & CEOMagento Imagine eCommerce, Day 1, Roy Rubin Co-Founder & CEO
Magento Imagine eCommerce, Day 1, Roy Rubin Co-Founder & CEO
 
Magento Imagine Conference: With Friends Like These Who Needs Revenue?
Magento Imagine Conference: With Friends Like These Who Needs Revenue?Magento Imagine Conference: With Friends Like These Who Needs Revenue?
Magento Imagine Conference: With Friends Like These Who Needs Revenue?
 
Magento Imagine eCommerce Conference - February 2011 - Unit Testing with Magento
Magento Imagine eCommerce Conference - February 2011 - Unit Testing with MagentoMagento Imagine eCommerce Conference - February 2011 - Unit Testing with Magento
Magento Imagine eCommerce Conference - February 2011 - Unit Testing with Magento
 
Magento Imagine eCommerce Conference 2011: Using Magento's Import Module
Magento Imagine eCommerce Conference 2011: Using Magento's Import ModuleMagento Imagine eCommerce Conference 2011: Using Magento's Import Module
Magento Imagine eCommerce Conference 2011: Using Magento's Import Module
 
Magento Imagine eCommerce Conference:5 Way to Supercharge your Magento Enterp...
Magento Imagine eCommerce Conference:5 Way to Supercharge your Magento Enterp...Magento Imagine eCommerce Conference:5 Way to Supercharge your Magento Enterp...
Magento Imagine eCommerce Conference:5 Way to Supercharge your Magento Enterp...
 
Magento Imagine eCommerce Conference February 2011: Optimizing Magento For Pe...
Magento Imagine eCommerce Conference February 2011: Optimizing Magento For Pe...Magento Imagine eCommerce Conference February 2011: Optimizing Magento For Pe...
Magento Imagine eCommerce Conference February 2011: Optimizing Magento For Pe...
 
Magento Imgine eCommerce Conference February 2011: Mashup of Magento and Sale...
Magento Imgine eCommerce Conference February 2011: Mashup of Magento and Sale...Magento Imgine eCommerce Conference February 2011: Mashup of Magento and Sale...
Magento Imgine eCommerce Conference February 2011: Mashup of Magento and Sale...
 
Best Practices for Magento Debugging
Best Practices for Magento Debugging Best Practices for Magento Debugging
Best Practices for Magento Debugging
 
Getting from Here to There: How to assess your business, define an overall eC...
Getting from Here to There: How to assess your business, define an overall eC...Getting from Here to There: How to assess your business, define an overall eC...
Getting from Here to There: How to assess your business, define an overall eC...
 
Magento Imagine eCommerce, Day 2, Yoav Kutner CTO
Magento Imagine eCommerce, Day 2, Yoav Kutner CTOMagento Imagine eCommerce, Day 2, Yoav Kutner CTO
Magento Imagine eCommerce, Day 2, Yoav Kutner CTO
 
Optimizing Magento Performance with Zend Server
Optimizing Magento Performance with Zend ServerOptimizing Magento Performance with Zend Server
Optimizing Magento Performance with Zend Server
 
Magento Roy Rubin Amsterdam Presentation
Magento Roy Rubin Amsterdam PresentationMagento Roy Rubin Amsterdam Presentation
Magento Roy Rubin Amsterdam Presentation
 
Maximizing Magento: Getting the Most out of Multi-Store Management
Maximizing Magento: Getting the Most out of Multi-Store ManagementMaximizing Magento: Getting the Most out of Multi-Store Management
Maximizing Magento: Getting the Most out of Multi-Store Management
 
Maximizing Magento: Getting the Most out of Promotions
Maximizing Magento: Getting the Most out of PromotionsMaximizing Magento: Getting the Most out of Promotions
Maximizing Magento: Getting the Most out of Promotions
 
Vortrag über Magento auf der InternetWorld 2008
Vortrag über Magento auf der InternetWorld 2008Vortrag über Magento auf der InternetWorld 2008
Vortrag über Magento auf der InternetWorld 2008
 
Selecting the 'Right' eCommerce Plaform
Selecting the 'Right' eCommerce PlaformSelecting the 'Right' eCommerce Plaform
Selecting the 'Right' eCommerce Plaform
 
Magento eCommerce And The Next Generation Of PHP
Magento eCommerce And The Next Generation Of PHPMagento eCommerce And The Next Generation Of PHP
Magento eCommerce And The Next Generation Of PHP
 
Under the Radar Magento Presentation
Under the Radar Magento PresentationUnder the Radar Magento Presentation
Under the Radar Magento Presentation
 

Kürzlich hochgeladen

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 

Kürzlich hochgeladen (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

Magento's Imagine eCommerce Conference: Do You Queue?

  • 1. Do you queue? Characteristics of scalability Kevin Schroeder Technology Evangelist Zend Technologies
  • 2. About me Past: Programming/Sys Admin Current: Technology Evangelist/Author/Composer @kpschrade
  • 3. I blog at eschrade.com Follow us! (good things will happen to you) Zend Technologies http://twitter.com/zend http://twitter.com/kpschrade (me!)
  • 4. Twtpoll results Could your PHP apps benefit from being able to process data or execute asynchronously?
  • 5. Why would you want to queue? Performance Execute logic apart from the main request (asynchronicity) Scalability The ability to handle non-immediate logic as resources are available
  • 6. Typical anatomy of a PHP Application Bad for scala-bility! Presentation Application Control Database Access Business Logic Presentation Application Control Business Logic Presentation | 6
  • 7. Good for Scalability Presentation Something.phtml Something.phtml Something.phtml Something.phtml Something.phtml Something.phtml Something.phtml Something.phtml Application Control Something.php Something.php Something.php Something.php Something.php Something.php Something.php Something.php Business Logic Something.php Something.php Something.php Something.php Something.php Something.php Something.php Something.php Database Access Something.php Something.php Something.php Something.php Something.php Something.php Something.php Something.php | 7 | 2-Mar-11
  • 8. What helps make software scalable? Defined tasks Loose coupling Resource discovery
  • 9. The Golden Rule of Scalability “It can probably wait”
  • 10. Asynchronous execution uses Pre-caching data Data analysis Data processing Pre-calculating (preparing data for the next request) Data is “out of date” once it leaves the web server Immediacy is seldom necessary
  • 11. Considerations Waste disk space Control usage (don’t let users do anything they want) Pre-calculate as much as possible Calculate and cache/store Keep data processing off the front end servers Don’t just cache Don’t let it substitute for thought Cache hit rates can be meaningless if you have hundreds of cache hits for a request
  • 12.
  • 13. Make as much as possible configurable/discoverableDecouple/Partition Don’t tie everything (relationships and such) into the database Use queues/messaging Stomp interfaces are really good for PHP – Can also use Java Bridge Zend_Queue has several interfaces Try to use stateless interfaces (polling is more scalable than idle connections)
  • 14. Options Use Cron /w PHP CLI (not the best idea) People mostly use cron simply due to availability It’s an available option, not necessarily the best option. Use Gearman Use home-grown (don’t do this) Use pcntl_fork() (NEVER do this) Use Zend Server Job Queue
  • 15. Your only real options Very cloud friendly * I am not an expert on Gearman. Corrections will be taken in the spirit that they are given. For obvious reasons, I will focus on Zend Server
  • 16. Zend Framework Zend Server PHP Application Performance Reliability & Management Scale-Out Business-grade PHP Acceleration Monitoring Clustering Hot Fixes Optimization Root-Cause Job Queue Support Caching Downloads Java Bridge Configuration Linux (rpm/web repositories) IBM i (PTF) Windows (MSI) What the heck is Zend Server? 15 Zend Server
  • 17. Job Queue Architecture – Elastic Backend Web Server /w JQ Web Server Users! Web Server /w JQ Web Server Load Balancer Web Server /w JQ Web Server Pros Scale the backend as necessary Default (easy) mechanism Cons Getting the job status requires using a DB
  • 18. Job Queue Architecture – Elastic Frontend Web Server Web Server /w JQ Users! Web Server Web Server /w JQ Load Balancer Web Server Web Server /w JQ Pros Easy to communicate with the Job Queue server handling the job Cons Requires you to build your own interface (or just use mine!)
  • 19. Kevin’s favorite way to implement it Create a task-handling controller Create an abstract task class Understands the Job Queue Self contained If Elastic Backend: connects to localhost If Elastic Frontend: connects to load balancer (my preferred), load balanced JQ servers manage themselves Execute the task, have it serialize itself and send it to send to the task handler
  • 20. Classes involved in the demo Manager Handles connecting to the queue and passing results back and forth JobAbstract Abstract class that a job would be based off of Response The response from the manager when a job is queued. Contains the server name and job number GetRemoteLinks Scans a given web page and reports back a list of all the links on the page
  • 21. Execution Flow Create job and set data Execute job Job passes itself to the queue manager Manager serializes job Manager uses HTTP call through a load balancer to queue the job The queue on the other end returns the job id and server name Job ID and server name is passed to the client Client polls the manager to get a completed job When the job is returned pass the serialized version of the executed job
  • 22. Demo
  • 23. Neato, but how in the world does this pertain to Magento?
  • 24. How? Long running front-end requests kill front-end responsiveness which kills the user experience 40% will wait no more than 4 seconds for a website (Forrester) Calculating cache data on-the-fly can lead to bad user experiences (abruptly slow page load times) and consistency problems Long running page requests can push up against max_execution_time For example, handling payments from a slow CC API Simply setting it to run longer is a band-aid on a broken bone
  • 25. Solution? Build Zend Server integration extensions Zendserver_Jobqueue Zendserver_Monitor Utilize the event system to intercept actions Async_Payment (for payments, in this case) Profit! (scalability AND performance, actually)
  • 26. Building a job Install the Zend Server Magento extension Create a class that extends Zendserver_Jobqueue_JobAbstract Call $job->execute();
  • 27. Payment as an example Hooks an observer into controller_action_predispatch_checkout_onepage_saveOrder, core_block_abstract_to_html_after Checks if a defined template is being rendered Injects JavaScript that changes the review.save() method Injects a new URL for submitting the transaction which creates a job Passes POSTed data to a job Job executes by submitting the payment URL on behalf of the browser, storing the result Browser pings the server to see if the job has completed executing yet
  • 28. Scaling the solution Webserver Job Queue/ Webserver Webserver Load Balancer Job Queue/ Webserver Webserver Job Queue/ Webserver * Duplicate deployments on ALL machines Database or Session Clustering
  • 29. Downloads Zend Server http://www.zend.com/server Zendserver_Jobqueue https://github.com/kschroeder/Magento-ZendServer-JobQueue Zendserver_Monitor https://github.com/kschroeder/Magento-ZendServer-Monitor Async_Payment https://github.com/kschroeder/Magento-Async-Payment Job Queue library & demo https://github.com/kschroeder/ZendServer-JobQueue-Job-API http://bit.ly/hWJBYw
  • 30. Magento/Zend Case Study - http://bit.ly/horpFF Follow us! Zend Technologies http://twitter.com/zend http://twitter.com/kpschrade (me!)
  • 31. Get this information and all the examples at eschrade.com…

Hinweis der Redaktion

  1. We released Zend Server and Zend Server Community Edition in April this year Products written from scratch based on our very extensive experience with Platform technologies Full integrated stack, native installer, ZF and Studio integration, software updates, all new UI, … Both editions have been very well received by users (love performance boost, ease of use, deployment) Great fit to our partners – we’re working with Varien/Magento, KnowledgeTree, MCS, … Next step will round up web app server offering to support high availability and scalability – more on this in the next few months