SlideShare a Scribd company logo
Care and Feeding
of Large Web Applications




     Perrin Harkins
Arcos, a project at Plus Three
About 2.5 years of continuous development
2 - 5 developers on the team during that time
~79,000 lines of Perl code
~4900 lines of SQL
  (Computed with David Wheeler's SLOCCount
    program)
Plenty of HTML, CSS, and JavaScript too
~14000 automated tests in 269 files
169 CPAN modules
Arcos, cont'd
CMS with modern AJAX UI
E-commerce
Data warehouse with AJAX query builder GUI
E-mail campaign management
Asynchronous job queue system
Comprehensive reporting
Arcos, cont'd
Object-oriented
MVC-ish
  Controller classes
  Database classes
  Templates
Core modules:
  CGI::Application
  Class::DBI
  HTML::Template
Deployment
Hard to generalize
.tar.gz files
Always release full builds, not individual files
  Consistent state for production system
  QA installs are accurate copies
The CPAN problem
“Just use the CPAN shell”
  Fails too often
  Installs whatever the latest version is
CPAN installer requirements:
Install specific versions
Install from local media
Allow locally modified versions
Fully automated
  “Erase your hard drive? [n]”
Install in a local directory
Skip the tests
  Cluster install
  Some will never work
Our solution
Finds all modules in src/ directory of package
  (Including ones we hacked)
Uses Expect to answer questions
Builds non-CPAN stuff too
  Apache
  mod_perl
  SWISH-E search engine
Why bundle dependencies?
Avoid troubleshooting local problems
If possible, specify Perl, MySQL, OS, etc.
Sometimes reality intervenes
  Hardware support
  Office politics
Next up: binary distributions
Compile takes too long
  Still just tar?
  RPMs?
  PAR?
See build system in Krang:
  http://krancgcms.com/
OH HAI!




I HELP WIF UR
INDENTATION!
Upgrades
Need full automation
Got the database part
  Schema version number in database
  Run all upgrade scripts with appropriate names
  e.g. 2.0 --> 3.0 means run upgrade/V2_1.pm and
    upgrade/V3_0.pm
  Hand-written SQL scripts
  Test mode that upgrades from old schema first
LVM for rollback in QA
Configuration
●   Highly configurable systems must be highly
    configured
●   Started with httpd.conf style
    –   Config::ApacheFormat
    –   Basic scoping and inheritance
Observations on Configuration
●   People ignore options they don't understand
    –   If the server starts, it must be ok!
●
    Some comments in a config file == weak
    documentation
●
    Things you rarely change shouldn't be in the
    shipped config file
I CAN HAS
MAINTENANCE
  BRANCH?
Version Control
Many tool choices now
  svn, svk, git...
  Fight it out and let me know who wins
Most projects need at least two branches at all
 times
  development
  stable
Very simple version control
Main branch is development
  Must build and pass tests
When making a release from a branch, tag it
  Make a “2.0” tag when you release it
Very simple version control, cntd
Maintenance branch from that tag for bug fixes
  “2.x” branch
On maintenance release, merge all changes on
 maintenance branch to main branch
  Tag “2.1” on 2.x branch
  Merge 2.0 --> 2.1 onto main branch
Too simple?
Not everyone is done at the same time
Hard to keep dev branch stable for major
 changes
  Feature branches
  Possible integration problems
Beware of complex merges
  This is not the Linux kernel
  Could be a people problem
An alternate point of view
  http://utsl.gen.nz/talks/git-svn/intro.html
HALP!
TESTS R
FAYLIN!
Testing
●   You all know the drill
●   Local library for common testing tasks
    –   Log in mech object
    –   Run test SMTP server
●   Test data setup and teardown
    –   Keep stack, delete in reverse order
    –   Probably easier to just wipe the db
Testing tools
●   Simple Test::More scripts are easy
    –   But scoping becomes an issue
    –   Test::Class
    –   Test::Builder
         ●   Improves test failure messages
●
    Test::WWW::Mechanize
    –   Great for testing SSL, Apache config, mod_rewrite
    –   Works fine on JavaScript pages
         ●   But doesn't test the JavaScript
         ●   Selenium does
KTHXBYE!

More Related Content

PDF
Capistrano
PDF
BlazeMeter Presents at the High Performance Drupal Meetup
PDF
Subversion Best Practices
PPT
SVN Usage & Best Practices
PDF
Managing Complexity with Module::Release
PPT
Subversion Overview
PPT
SVN Tool Information : Best Practices
PPTX
SVN Basics
Capistrano
BlazeMeter Presents at the High Performance Drupal Meetup
Subversion Best Practices
SVN Usage & Best Practices
Managing Complexity with Module::Release
Subversion Overview
SVN Tool Information : Best Practices
SVN Basics

What's hot (20)

PPT
Subversion workshop
PDF
Indexing BackPAN
PDF
MyCPAN (Frozen Perl 2008 Lightning Talk)
PPTX
Parallel Running Automation Solution with Docker, Jenkins and Zalenium
KEY
SVN Best Practices
PPTX
Getting Started With Subversion
ODP
Subversion User Guide
ODP
Svn Basic Tutorial
PPTX
Performance tips for Symfony2 & PHP
PDF
All of the thing about Postman
PPTX
Lucee writing your own debugging template
PPTX
Lucee writing your own debugging template
PPTX
Zendcon scaling magento
PPTX
Magento on HHVM. Daniel Sloof
PPTX
Caching strategies with lucee
PPTX
Zendcon magento101
PPT
Test eng-meetup-taki take
PDF
Getting modern with my sql
PDF
Stress Free Deployment - Confoo 2011
PDF
Version Control with Subversion
Subversion workshop
Indexing BackPAN
MyCPAN (Frozen Perl 2008 Lightning Talk)
Parallel Running Automation Solution with Docker, Jenkins and Zalenium
SVN Best Practices
Getting Started With Subversion
Subversion User Guide
Svn Basic Tutorial
Performance tips for Symfony2 & PHP
All of the thing about Postman
Lucee writing your own debugging template
Lucee writing your own debugging template
Zendcon scaling magento
Magento on HHVM. Daniel Sloof
Caching strategies with lucee
Zendcon magento101
Test eng-meetup-taki take
Getting modern with my sql
Stress Free Deployment - Confoo 2011
Version Control with Subversion
Ad

Similar to Care and Feeding of Large Web Applications (20)

PDF
Os Harkins
PDF
Care and feeding notes
PDF
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
PDF
Continuous Integration at Mollie
PPTX
Slides from LAX & DEN usergroup meetings
PDF
Real world Webapp
KEY
Development tools
PDF
Modern web dev_taxonomy
PPTX
Drupal & Continous Integration - SF State Study Case
PPTX
Continuous feature-development
PDF
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
PDF
Web Developing In Search
PDF
Tool up your lamp stack
PDF
Tool Up Your LAMP Stack
KEY
Continuous Integration Step-by-step
KEY
Continuous Integration In A PHP World
PPTX
[Mas 500] Software Development Strategies
PDF
Puppet for Sys Admins
Os Harkins
Care and feeding notes
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration at Mollie
Slides from LAX & DEN usergroup meetings
Real world Webapp
Development tools
Modern web dev_taxonomy
Drupal & Continous Integration - SF State Study Case
Continuous feature-development
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
Web Developing In Search
Tool up your lamp stack
Tool Up Your LAMP Stack
Continuous Integration Step-by-step
Continuous Integration In A PHP World
[Mas 500] Software Development Strategies
Puppet for Sys Admins
Ad

More from Perrin Harkins (12)

PDF
PyGotham 2014 Introduction to Profiling
PDF
Introduction to performance tuning perl web applications
PDF
Scalable talk notes
PDF
Low maintenance perl notes
ODP
Choosing a Web Architecture for Perl
PDF
Building Scalable Websites with Perl
PPT
Efficient Shared Data in Perl
PPT
Choosing a Templating System
PDF
Scaling Databases with DBIx::Router
PDF
Low-Maintenance Perl
PDF
Top 10 Perl Performance Tips
PDF
The Most Common Template Toolkit Mistake
PyGotham 2014 Introduction to Profiling
Introduction to performance tuning perl web applications
Scalable talk notes
Low maintenance perl notes
Choosing a Web Architecture for Perl
Building Scalable Websites with Perl
Efficient Shared Data in Perl
Choosing a Templating System
Scaling Databases with DBIx::Router
Low-Maintenance Perl
Top 10 Perl Performance Tips
The Most Common Template Toolkit Mistake

Recently uploaded (20)

PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
cuic standard and advanced reporting.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPT
Teaching material agriculture food technology
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Approach and Philosophy of On baking technology
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Electronic commerce courselecture one. Pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Empathic Computing: Creating Shared Understanding
PDF
Unlocking AI with Model Context Protocol (MCP)
The Rise and Fall of 3GPP – Time for a Sabbatical?
Diabetes mellitus diagnosis method based random forest with bat algorithm
Agricultural_Statistics_at_a_Glance_2022_0.pdf
cuic standard and advanced reporting.pdf
The AUB Centre for AI in Media Proposal.docx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Teaching material agriculture food technology
Chapter 3 Spatial Domain Image Processing.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
NewMind AI Monthly Chronicles - July 2025
Approach and Philosophy of On baking technology
Digital-Transformation-Roadmap-for-Companies.pptx
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Network Security Unit 5.pdf for BCA BBA.
Spectral efficient network and resource selection model in 5G networks
Electronic commerce courselecture one. Pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Empathic Computing: Creating Shared Understanding
Unlocking AI with Model Context Protocol (MCP)

Care and Feeding of Large Web Applications

  • 1. Care and Feeding of Large Web Applications Perrin Harkins
  • 2. Arcos, a project at Plus Three About 2.5 years of continuous development 2 - 5 developers on the team during that time ~79,000 lines of Perl code ~4900 lines of SQL (Computed with David Wheeler's SLOCCount program) Plenty of HTML, CSS, and JavaScript too ~14000 automated tests in 269 files 169 CPAN modules
  • 3. Arcos, cont'd CMS with modern AJAX UI E-commerce Data warehouse with AJAX query builder GUI E-mail campaign management Asynchronous job queue system Comprehensive reporting
  • 4. Arcos, cont'd Object-oriented MVC-ish Controller classes Database classes Templates Core modules: CGI::Application Class::DBI HTML::Template
  • 5. Deployment Hard to generalize .tar.gz files Always release full builds, not individual files Consistent state for production system QA installs are accurate copies
  • 6. The CPAN problem “Just use the CPAN shell” Fails too often Installs whatever the latest version is
  • 7. CPAN installer requirements: Install specific versions Install from local media Allow locally modified versions Fully automated “Erase your hard drive? [n]” Install in a local directory Skip the tests Cluster install Some will never work
  • 8. Our solution Finds all modules in src/ directory of package (Including ones we hacked) Uses Expect to answer questions Builds non-CPAN stuff too Apache mod_perl SWISH-E search engine
  • 9. Why bundle dependencies? Avoid troubleshooting local problems If possible, specify Perl, MySQL, OS, etc. Sometimes reality intervenes Hardware support Office politics
  • 10. Next up: binary distributions Compile takes too long Still just tar? RPMs? PAR? See build system in Krang: http://krancgcms.com/
  • 11. OH HAI! I HELP WIF UR INDENTATION!
  • 12. Upgrades Need full automation Got the database part Schema version number in database Run all upgrade scripts with appropriate names e.g. 2.0 --> 3.0 means run upgrade/V2_1.pm and upgrade/V3_0.pm Hand-written SQL scripts Test mode that upgrades from old schema first LVM for rollback in QA
  • 13. Configuration ● Highly configurable systems must be highly configured ● Started with httpd.conf style – Config::ApacheFormat – Basic scoping and inheritance
  • 14. Observations on Configuration ● People ignore options they don't understand – If the server starts, it must be ok! ● Some comments in a config file == weak documentation ● Things you rarely change shouldn't be in the shipped config file
  • 16. Version Control Many tool choices now svn, svk, git... Fight it out and let me know who wins Most projects need at least two branches at all times development stable
  • 17. Very simple version control Main branch is development Must build and pass tests When making a release from a branch, tag it Make a “2.0” tag when you release it
  • 18. Very simple version control, cntd Maintenance branch from that tag for bug fixes “2.x” branch On maintenance release, merge all changes on maintenance branch to main branch Tag “2.1” on 2.x branch Merge 2.0 --> 2.1 onto main branch
  • 19. Too simple? Not everyone is done at the same time Hard to keep dev branch stable for major changes Feature branches Possible integration problems Beware of complex merges This is not the Linux kernel Could be a people problem An alternate point of view http://utsl.gen.nz/talks/git-svn/intro.html
  • 21. Testing ● You all know the drill ● Local library for common testing tasks – Log in mech object – Run test SMTP server ● Test data setup and teardown – Keep stack, delete in reverse order – Probably easier to just wipe the db
  • 22. Testing tools ● Simple Test::More scripts are easy – But scoping becomes an issue – Test::Class – Test::Builder ● Improves test failure messages ● Test::WWW::Mechanize – Great for testing SSL, Apache config, mod_rewrite – Works fine on JavaScript pages ● But doesn't test the JavaScript ● Selenium does