SlideShare a Scribd company logo
By John Coggeshall and Marc Urbaitel ENTERPRISE PHP: A CASE STUDY
INTRODUCTIONS Who am I: John Coggeshall Architect, North American Professional Services PHP 5 Core Contributor Author: PHP 5 Unleashed Member of Zend’s Education Advisory Board May 28, 2009 Enterprise PHP: A Case Study PAGE
INTRODUCTIONS Who did I work with? Marc Urbaitel CTO & Co-Founder In Ticketing PHP Programmer Chief Architect of Existing Ticketing System May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
SESSION AGENDA Introductions History Technical Details Demo Questions May 28, 2009 Enterprise PHP: A Case Study PAGE
HISTORY In Ticketing, Inc. Founded in 1999 (Formerly InHouse Ticketing) Competitor to Ticket Master Full Service Ticketing Provider System built entirely on PHP/MySQL Platform May 28, 2009 Enterprise PHP: A Case Study PAGE
THE PROBLEM Organically grown web application Hard to add features (i.e. new up-sell opportunities) Ticket Insurance "Green" up your experience Even harder to scale to meet client demand Wants to be able to process roughly 25,000 ticket transactions per minute Or … ~85 tickets per second Or … 300-400+ requests per second Must maintain current reporting / site admin facilities used by clients May 28, 2009 Enterprise PHP: A Case Study PAGE
START WITH DUCT TAPE In existing system hardware wouldn't solve the problem System itself wasn't scalable Initial Solution: Serialize the ticket process for customers Customers would be placed into a virtual queue and released in small groups to purchase tickets Resulted in  online  wait times to begin order process anywhere from 30 minutes to 2 hours Kept the request/second requirement low enough for system to handle It worked, but was only a temporary solution May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
KEY APPLICATION CONCERNS Load Pattern is Spiked Associated with Ticket Sale Start Usually associated with a single concert, etc. May 28, 2009 NAME OF THE SESSION COMES HERE PAGE  Note: Simulated Data
KEY APPLICATION CONCERNS Load is usually focused on a small subsection of clients Translation: System needs to scale down to at least the event level May 28, 2009 NAME OF THE SESSION COMES HERE PAGE  Note: Simulated Data
THE SOLUTION: OLT (Online Ticketing) Re-write of entire application not an option Too expensive to re-write entire online business Instead, separate out the important bits Re-write the online order engine, integrate with old system  Significantly less effort and will solve most of the goal Offload integration points outside of web request Keep local copies of data on each server and sync as necessary New Architecture will allow easy improvements / ongoing maintenance May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
PROJECT FOCUS May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
HIGH LEVEL SERVER ARCHITECTURE May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
HIGH LEVEL SERVER ARCHITECTURE May 28, 2009 NAME OF THE SESSION COMES HERE PAGE  Admin is for Clients, which create events and view reporting (Ticket Metadata)
HIGH LEVEL SERVER ARCHITECTURE May 28, 2009 NAME OF THE SESSION COMES HERE PAGE  Ticket Meta Data is replicated  as SQLite databases on each OLT server (read-only)
HIGH LEVEL SERVER ARCHITECTURE May 28, 2009 NAME OF THE SESSION COMES HERE PAGE  Online Orders come through the event server and are handed off to OLT once the transaction beings
HIGH LEVEL SERVER ARCHITECTURE May 28, 2009 NAME OF THE SESSION COMES HERE PAGE  The OLT Cluster Manages Ticket Allotments, transaction,  reporting back the order results to the reporting system
HIGH LEVEL SERVER ARCHITECTURE May 28, 2009 NAME OF THE SESSION COMES HERE PAGE  Box office orders use stored procedures to access allotments in their respective OLT to complete orders
THE OLT CLUSTER An OLT Cluster consists of at least: One Web Server One Database Server One Job Queue Server Cluster Database Performance is Glass Ceiling Can add Job Queue, Web servers Can also add slaves, replace with MySQL cluster, etc. May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
THE OLT CLUSTER SERVERS Database: MySQL 5.0 Utilizes Stored Procedures to Encapsulate complex allotment management Web Server: PHP 5.2 ZC2, Platform, Zend Framework Job Queue: PHP 5.2 InTicketing specific Frameworks: OLT, In Built on ZF Front End: ZF MVC May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
TRULY SCALABLE Each cluster is self-contained A single OLT cluster can scale  up and down One cluster can run entire business .. Or one client .. Or one event .. Or a  single  ticket allotment May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
DATABASE SCHEMAS Previous Implementation has  183  tables in MySQL At least 7 tables directly related to a ticket order used every request Remainder related to admin / reporting / etc. OLT: 5 tables total in MySQL 3 of which are used during the web request InnoDB tables Replaced complex JOINs with composite keys (Ticket SKUs) May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
DATABASE SCHEMAS Most OLT data is  read-only  and stored locally on every server as a series of SQLite Databases One DB per 'Nug' (client selling tickets) Only low-traffic admin systems from legacy touch OLT MySQL Database (for allotment updates) May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
DATABASE SCHEMAS May 28, 2009 NAME OF THE SESSION COMES HERE PAGE  MySQL read/write DB schema
WEB APPLICATION ARCHITECTURE ~ 30,000 lines of code and ~160 classes Broken into two libraries,  OLT  and  IN  plus front-end The OLT Library Heart of OLT system Handles all major functionality of system The IN Library Support Library Provides functionality which isn't OLT-specific for code-reuse reasons Contains Transaction Engine, Custom Filters/Validators, Customer / Transaction information objects May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
MVC DETAILS Built using Zend Framework Model / View / Controller (MVC) 8 Controllers total manage the entire order process Orders are began by posting to the correct OLT engine the details Which tickets to buy / quantity Meta data for order OLT manages entire order process and triggers backend job to complete transaction May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
BASIC ORDER FLOW Real Time Flow Process Captcha Identify Language & Skinning of Order Temporarily Reserve Tickets During Order Gather Customer Information Perform Ticket Transaction Asynchronous Operations Perform up-sell transactions Generate PDF tickets Store Order Data Send E-mails Etc. May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
UNDER THE HOOD Order Process Order is gathered Consolidated into single object Order contains everything possibly known about the transaction at hand May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
ASYNCHRONOUS BACKEND Order is then passed into the Job Queue to process numerous asynchronous tasks Primary Ticket Transaction is still real time Transactions can happen through numerous gateways May 28, 2009 #
WHAT DOES THIS ALL MEAN FOR INTICKETING? Scalable solution means when the next big client comes they can say  YES  to their business Larger volumes can now be handled just by purchasing more hardware Added Revenue Streams adds to bottom line PayPal Express Checkout Ticket Insurance Green your Experience Broader Marketplace International clients thanks to built in internationalization May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
WHAT’S NEXT FOR OLT? New event listing architecture Current bottleneck in system is the event landing pages Optimization of Cluster Improving minimum cluster overall performance lowers cost per ticket More Features New Upsells Different types of events (Cruises, etc) More Reporting, Introspection May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
THANK YOU! Questions? Comments? Suggestions?

More Related Content

PDF
Good code, Bad Code
PDF
Social Network PHP Script to Build Facebook Clone Website
PDF
A CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT.pdf
PDF
Architecture Patterns - Open Discussion
PDF
A CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT.pdf
PPTX
Netflix viewing data architecture evolution - EBJUG Nov 2014
PDF
Server Day 2009: Oracle/Bea Fusion Middleware by Paolo Ramasso
PPTX
Development Practices: Nex Gen Php
Good code, Bad Code
Social Network PHP Script to Build Facebook Clone Website
A CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT.pdf
Architecture Patterns - Open Discussion
A CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT.pdf
Netflix viewing data architecture evolution - EBJUG Nov 2014
Server Day 2009: Oracle/Bea Fusion Middleware by Paolo Ramasso
Development Practices: Nex Gen Php

Similar to Enterprise PHP: A Case Study (20)

PDF
Introduction to enterprise applications capacity planning
KEY
Web frameworks don't matter
PDF
Events and microservices
PPT
0.Web Application Architecture.ppt
PDF
1 introduction
PPT
The eBay Architecture: Striking a Balance between Site Stability, Feature Ve...
DOC
Yeshwanth - Resume
PDF
Linux capacity planning
DOC
Baiju_resume
PDF
Facebook architecture
PDF
Qcon 090408233824-phpapp01
PDF
Facebook的架构
PDF
Facebook architecture
PPTX
L21 scalability
PDF
Slash n: Tech Talk Track 2 – Distributed Transactions in SOA - Yogi Kulkarni,...
PPTX
Web-Server & It's Architecture.pptx
PPT
Talk Nerdy to Me: Optimizing big websites
PPTX
My Saminar On Php
PDF
Creating a Global E-Commerce Website With E-Business Suite and Fusion Middleware
PPT
SMEUG 2006 - Project IBIS: ERP at UAE University
Introduction to enterprise applications capacity planning
Web frameworks don't matter
Events and microservices
0.Web Application Architecture.ppt
1 introduction
The eBay Architecture: Striking a Balance between Site Stability, Feature Ve...
Yeshwanth - Resume
Linux capacity planning
Baiju_resume
Facebook architecture
Qcon 090408233824-phpapp01
Facebook的架构
Facebook architecture
L21 scalability
Slash n: Tech Talk Track 2 – Distributed Transactions in SOA - Yogi Kulkarni,...
Web-Server & It's Architecture.pptx
Talk Nerdy to Me: Optimizing big websites
My Saminar On Php
Creating a Global E-Commerce Website With E-Business Suite and Fusion Middleware
SMEUG 2006 - Project IBIS: ERP at UAE University
Ad

More from John Coggeshall (20)

PPTX
Virtualization for Developers
PPTX
Migrating to PHP 7
PPTX
Peek at PHP 7
PPTX
ZF2 Modules: Events, Services, and of course, modularity
PPT
PHP Development for Google Glass using Phass
PPTX
Virtualization for Developers
PPTX
Development with Vagrant
PPTX
Introduction to Zend Framework 2
PPTX
10 things not to do at a Startup
PPTX
Virtualization for Developers
PPTX
PPT
Building PHP Powered Android Applications
PPT
Ria Applications And PHP
PPT
Beyond the Browser
PPT
Apache Con 2008 Top 10 Mistakes
PPT
Ria Development With Flex And PHP
PPT
Top 10 Scalability Mistakes
PPT
Building Dynamic Web Applications on i5 with PHP
PPT
PHP Security Basics
PPT
Migrating from PHP 4 to PHP 5
Virtualization for Developers
Migrating to PHP 7
Peek at PHP 7
ZF2 Modules: Events, Services, and of course, modularity
PHP Development for Google Glass using Phass
Virtualization for Developers
Development with Vagrant
Introduction to Zend Framework 2
10 things not to do at a Startup
Virtualization for Developers
Building PHP Powered Android Applications
Ria Applications And PHP
Beyond the Browser
Apache Con 2008 Top 10 Mistakes
Ria Development With Flex And PHP
Top 10 Scalability Mistakes
Building Dynamic Web Applications on i5 with PHP
PHP Security Basics
Migrating from PHP 4 to PHP 5
Ad

Recently uploaded (20)

PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Encapsulation theory and applications.pdf
PDF
cuic standard and advanced reporting.pdf
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Empathic Computing: Creating Shared Understanding
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Cloud computing and distributed systems.
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Encapsulation theory and applications.pdf
cuic standard and advanced reporting.pdf
NewMind AI Monthly Chronicles - July 2025
Per capita expenditure prediction using model stacking based on satellite ima...
Reach Out and Touch Someone: Haptics and Empathic Computing
“AI and Expert System Decision Support & Business Intelligence Systems”
Empathic Computing: Creating Shared Understanding
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Cloud computing and distributed systems.
Review of recent advances in non-invasive hemoglobin estimation
The Rise and Fall of 3GPP – Time for a Sabbatical?
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Encapsulation_ Review paper, used for researhc scholars
Dropbox Q2 2025 Financial Results & Investor Presentation
Spectral efficient network and resource selection model in 5G networks
Building Integrated photovoltaic BIPV_UPV.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Agricultural_Statistics_at_a_Glance_2022_0.pdf

Enterprise PHP: A Case Study

  • 1. By John Coggeshall and Marc Urbaitel ENTERPRISE PHP: A CASE STUDY
  • 2. INTRODUCTIONS Who am I: John Coggeshall Architect, North American Professional Services PHP 5 Core Contributor Author: PHP 5 Unleashed Member of Zend’s Education Advisory Board May 28, 2009 Enterprise PHP: A Case Study PAGE
  • 3. INTRODUCTIONS Who did I work with? Marc Urbaitel CTO & Co-Founder In Ticketing PHP Programmer Chief Architect of Existing Ticketing System May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
  • 4. SESSION AGENDA Introductions History Technical Details Demo Questions May 28, 2009 Enterprise PHP: A Case Study PAGE
  • 5. HISTORY In Ticketing, Inc. Founded in 1999 (Formerly InHouse Ticketing) Competitor to Ticket Master Full Service Ticketing Provider System built entirely on PHP/MySQL Platform May 28, 2009 Enterprise PHP: A Case Study PAGE
  • 6. THE PROBLEM Organically grown web application Hard to add features (i.e. new up-sell opportunities) Ticket Insurance "Green" up your experience Even harder to scale to meet client demand Wants to be able to process roughly 25,000 ticket transactions per minute Or … ~85 tickets per second Or … 300-400+ requests per second Must maintain current reporting / site admin facilities used by clients May 28, 2009 Enterprise PHP: A Case Study PAGE
  • 7. START WITH DUCT TAPE In existing system hardware wouldn't solve the problem System itself wasn't scalable Initial Solution: Serialize the ticket process for customers Customers would be placed into a virtual queue and released in small groups to purchase tickets Resulted in online wait times to begin order process anywhere from 30 minutes to 2 hours Kept the request/second requirement low enough for system to handle It worked, but was only a temporary solution May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
  • 8. KEY APPLICATION CONCERNS Load Pattern is Spiked Associated with Ticket Sale Start Usually associated with a single concert, etc. May 28, 2009 NAME OF THE SESSION COMES HERE PAGE Note: Simulated Data
  • 9. KEY APPLICATION CONCERNS Load is usually focused on a small subsection of clients Translation: System needs to scale down to at least the event level May 28, 2009 NAME OF THE SESSION COMES HERE PAGE Note: Simulated Data
  • 10. THE SOLUTION: OLT (Online Ticketing) Re-write of entire application not an option Too expensive to re-write entire online business Instead, separate out the important bits Re-write the online order engine, integrate with old system Significantly less effort and will solve most of the goal Offload integration points outside of web request Keep local copies of data on each server and sync as necessary New Architecture will allow easy improvements / ongoing maintenance May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
  • 11. PROJECT FOCUS May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
  • 12. HIGH LEVEL SERVER ARCHITECTURE May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
  • 13. HIGH LEVEL SERVER ARCHITECTURE May 28, 2009 NAME OF THE SESSION COMES HERE PAGE Admin is for Clients, which create events and view reporting (Ticket Metadata)
  • 14. HIGH LEVEL SERVER ARCHITECTURE May 28, 2009 NAME OF THE SESSION COMES HERE PAGE Ticket Meta Data is replicated as SQLite databases on each OLT server (read-only)
  • 15. HIGH LEVEL SERVER ARCHITECTURE May 28, 2009 NAME OF THE SESSION COMES HERE PAGE Online Orders come through the event server and are handed off to OLT once the transaction beings
  • 16. HIGH LEVEL SERVER ARCHITECTURE May 28, 2009 NAME OF THE SESSION COMES HERE PAGE The OLT Cluster Manages Ticket Allotments, transaction, reporting back the order results to the reporting system
  • 17. HIGH LEVEL SERVER ARCHITECTURE May 28, 2009 NAME OF THE SESSION COMES HERE PAGE Box office orders use stored procedures to access allotments in their respective OLT to complete orders
  • 18. THE OLT CLUSTER An OLT Cluster consists of at least: One Web Server One Database Server One Job Queue Server Cluster Database Performance is Glass Ceiling Can add Job Queue, Web servers Can also add slaves, replace with MySQL cluster, etc. May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
  • 19. THE OLT CLUSTER SERVERS Database: MySQL 5.0 Utilizes Stored Procedures to Encapsulate complex allotment management Web Server: PHP 5.2 ZC2, Platform, Zend Framework Job Queue: PHP 5.2 InTicketing specific Frameworks: OLT, In Built on ZF Front End: ZF MVC May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
  • 20. TRULY SCALABLE Each cluster is self-contained A single OLT cluster can scale up and down One cluster can run entire business .. Or one client .. Or one event .. Or a single ticket allotment May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
  • 21. DATABASE SCHEMAS Previous Implementation has 183 tables in MySQL At least 7 tables directly related to a ticket order used every request Remainder related to admin / reporting / etc. OLT: 5 tables total in MySQL 3 of which are used during the web request InnoDB tables Replaced complex JOINs with composite keys (Ticket SKUs) May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
  • 22. DATABASE SCHEMAS Most OLT data is read-only and stored locally on every server as a series of SQLite Databases One DB per 'Nug' (client selling tickets) Only low-traffic admin systems from legacy touch OLT MySQL Database (for allotment updates) May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
  • 23. DATABASE SCHEMAS May 28, 2009 NAME OF THE SESSION COMES HERE PAGE MySQL read/write DB schema
  • 24. WEB APPLICATION ARCHITECTURE ~ 30,000 lines of code and ~160 classes Broken into two libraries, OLT and IN plus front-end The OLT Library Heart of OLT system Handles all major functionality of system The IN Library Support Library Provides functionality which isn't OLT-specific for code-reuse reasons Contains Transaction Engine, Custom Filters/Validators, Customer / Transaction information objects May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
  • 25. MVC DETAILS Built using Zend Framework Model / View / Controller (MVC) 8 Controllers total manage the entire order process Orders are began by posting to the correct OLT engine the details Which tickets to buy / quantity Meta data for order OLT manages entire order process and triggers backend job to complete transaction May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
  • 26. BASIC ORDER FLOW Real Time Flow Process Captcha Identify Language & Skinning of Order Temporarily Reserve Tickets During Order Gather Customer Information Perform Ticket Transaction Asynchronous Operations Perform up-sell transactions Generate PDF tickets Store Order Data Send E-mails Etc. May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
  • 27. UNDER THE HOOD Order Process Order is gathered Consolidated into single object Order contains everything possibly known about the transaction at hand May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
  • 28. ASYNCHRONOUS BACKEND Order is then passed into the Job Queue to process numerous asynchronous tasks Primary Ticket Transaction is still real time Transactions can happen through numerous gateways May 28, 2009 #
  • 29. WHAT DOES THIS ALL MEAN FOR INTICKETING? Scalable solution means when the next big client comes they can say YES to their business Larger volumes can now be handled just by purchasing more hardware Added Revenue Streams adds to bottom line PayPal Express Checkout Ticket Insurance Green your Experience Broader Marketplace International clients thanks to built in internationalization May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
  • 30. WHAT’S NEXT FOR OLT? New event listing architecture Current bottleneck in system is the event landing pages Optimization of Cluster Improving minimum cluster overall performance lowers cost per ticket More Features New Upsells Different types of events (Cruises, etc) More Reporting, Introspection May 28, 2009 NAME OF THE SESSION COMES HERE PAGE
  • 31. THANK YOU! Questions? Comments? Suggestions?