SlideShare a Scribd company logo
1 of 26
Download to read offline
YELLOWPAGES.COM: Behind the Curtain



             John Straw
           AT&T Interactive
What is YELLOWPAGES.COM?
    Part of AT&T
s

    A local search website, serving
s
        23 million unique visitors / month
    q
        2 million searches / day
    q
        More than 48 million requests / day
    q
        More than 1500 requests / sec
    q
        30 Mbit/sec (200 Mbit/sec from Akamai)
    q

    Entirely Ruby on Rails since June 2007
s
How we were
    Website and API applications
s
    written in Java
        Website in application server
    q
        API in Tomcat
    q

    Search code split between
s
    application and search layer
What was bad
    Problems with architecture
s
        Separate search implementations in each application
    q
        Session-heavy website application design hard to scale horizontally
    q
        Pointless web accelerator layer
    q

    Problems with application server platform
s
        Technologically stagnant
    q
        No usable session migration features
    q
        Hard to do SEO
    q
And also ...
    Lots of code written by consultants 2004-2005
s

    Fundamental design problems
s

    Code extended largely by copy-and-modify since 11/2005 (to
s
    around 125K lines)
    No test code
s

    New features hard to implement
s
The Big Rewrite
    Several projects combined to become the big rewrite
s
        Replacement of Java application server
    q
        Redesign of site look-and-feel
    q
        Many other wish-list projects, some of which were difficult to
    q
        accomplish with existing application
    Project conception to completion: one year
s

    Development took about four months
s

    Project phases
s
        7/2006 - 12/2006: Thinking, early preparation
    q
        12/2006: Rough architecture determination, kick-off
    q
        1/2007 - 3/1/2007: Technology research and prototypes, business
    q
        rules exploration, UI design concepts
        3/1/2007 - 6/28/2007: Site development and launch
    q
Requirements for a new site architecture
1. Absolute control of urls
       Maximize SEO crawl-ability
   q

2. No sessions: HTTP is stateless
       Anything other than cookies is just self-delusion
   q
       Staying stateless makes scaling easier
   q

3. Be agile: write less code
       Development must be faster
   q

4. Develop easy-to-leverage core business services
       Eliminate current duplicated code
   q
       Must be able to build other sites or applications with common
   q
       search, personalization and business review logic
       Service-oriented architecture, with web tier utilizing common
   q
       service tier
Rewrite team
    Cross-functional team of about 20 people
s
        Assemble stakeholders, not requirements
    q

    Working closely together
s
        Whole team sat together for entire project
    q
        Lunch provided several days per week
    q
        Team celebrations held for milestones
    q

    Core development team deliberately small
s
        Four skilled developers can accomplish a lot
    q
        Cost of communication low
    q
        Low management overhead
    q
Picking the platform
    Web tier:
s
        Rails or Django
    q
        Utilizing common services for
    q
        search, personalization, and
        ratings
    Service tier:
s
        Java application
    q
        Probably EJB3 in JBoss
    q
        Exposing a REST API and
    q
        returning JSON-serialized data
    Started writing prototypes ...
s
One
Two
Three
And finally ...
Why Rails?
    Considered Java frameworks didn't provide enough control of
s
    url structure
    Web tier choice became Rails vs. Django
s

    Rails best web tier choice due to
s
        Better automated testing integration
    q
        More platform maturity
    q
        Clearer path (for us!) to C if necessary for performance
    q
        Developer comfort and experience
    q

    Team decided to go with Rails top-to-bottom
s
        Evaluation of EJB3 didn't show real advantages over Ruby or
    q
        Python for our application
        Reasons for choosing Rails for web tier applied equally to service
    q
        tier
        Advantage of having uniform implementation environment
    q
Separate or combined?
Other considerations
    How many servers?
s

    How many mongrels per server?
s

    How much memory for memcached?
s
Production configuration
    Acquired 25 machines of identical configuration for each data
s
    center
    Performance testing to size out each tier, and determine how
s
    many mongrels
    4 GB of memory on each service-tier machine set aside for
s
    memcached
    Used 2 machines in each data center for database servers
s
Performance goals
    Sub-second average home page load time
s

    Sub 4-second average search results page load time
s

    Handle traffic without dying
s
Performance optimizations
    mongrel_handlers in service tier application
s

    C library for parsing search cluster responses
s

    Erubis rather than erb in web tier
s
Site at launch
Database performance issues
    Machines inadequate to handle search load for ratings look-up
s
        Additional caching added
    q

    Oracle doesn't like lots of connections
s

    Use of named connections made this problem even worse
s
        Additional memory required for database servers
    q
        All database look-up code moved to service tier
    q
        Changed to a single database connection
    q
Page performance issues
    Slow page performance caused more by asset download times
s
    than speed of web framework
    Worked through the Yahoo! performance guidelines
s

    Minified and combined CSS and Javascript with
s
    asset_packager
    Moved image serving to Akamai edge cache
s

    Apache slow serving analytics tags -- moved to nginx for web
s
    tier
    Started using some fragment caching
s
Slow requests, etc.
    Slow requests in the web tier caused mongrel queueing
s
        Developed qrp (http://qrp.rubyforge.org/)
    q
        Allows you to establish a backup pool where requests get parked
    q
        until a mongrel is available
    Experimented with different malloc implementations
s

    Started using a custom MRI build -- ypc_ruby
s

    Started using a slightly-customized Mongrel
s
Overall performance
    Performance at launch was generally acceptable
s

    After web server & hosting changes performance better than
s
    previous site
    Extensive use of caching and elimination of obsolete queries
s
    lowered load on search cluster compared to previous site
    Over a year later, we need to do more profiling
s
        Traffic has more than doubled since launch
    q
        Hardware evolution has invalidated original profiling
    q
        We now want sub 2-second search result pages
    q
What else?
    New applications on Rails
s
        Server-side component of native iPhone application
    q
        Working on moving current Java API application
    q
        Other internal applications
    q

    Ruby but not Rails
s
        Exploratory port of service tier to merb
    q
        Supporting development of Waves
    q
        Data-source ETL
    q
        Listing match-and-merge
    q

More Related Content

What's hot

A look ahead at RAP (ESE 2010)
A look ahead at RAP (ESE 2010)A look ahead at RAP (ESE 2010)
A look ahead at RAP (ESE 2010)Ralf Sternberg
 
Benefits of using Ruby on rails for Apps Development
Benefits of using Ruby on rails for Apps Development Benefits of using Ruby on rails for Apps Development
Benefits of using Ruby on rails for Apps Development Chetu
 
Scala services in action
Scala services in actionScala services in action
Scala services in actionUnderscore
 
ECS19 Elio Struyf - Setting Up Your SPFx CI/CD pipelines on Azure DevOps
ECS19 Elio Struyf - Setting Up Your SPFx CI/CD pipelines on Azure DevOpsECS19 Elio Struyf - Setting Up Your SPFx CI/CD pipelines on Azure DevOps
ECS19 Elio Struyf - Setting Up Your SPFx CI/CD pipelines on Azure DevOpsEuropean Collaboration Summit
 
Alfresco Development Framework Basic
Alfresco Development Framework BasicAlfresco Development Framework Basic
Alfresco Development Framework BasicMario Romano
 
Records Management - the api story
Records Management -  the api storyRecords Management -  the api story
Records Management - the api storyDavid Webster
 
SQL Server In-Memory OLTP Migration Overview
SQL Server In-Memory OLTP Migration OverviewSQL Server In-Memory OLTP Migration Overview
SQL Server In-Memory OLTP Migration OverviewJose Rivera Miranda
 
Content Migrations: Getting from A to B
Content Migrations: Getting from A to BContent Migrations: Getting from A to B
Content Migrations: Getting from A to BBlend Interactive
 
A Gentle Introduction to Functions-as-a-Service
A Gentle Introduction to Functions-as-a-ServiceA Gentle Introduction to Functions-as-a-Service
A Gentle Introduction to Functions-as-a-ServiceValeri Karpov
 
Not Your Father’s Web App: The Cloud-Native Architecture of images.nasa.gov
Not Your Father’s Web App: The Cloud-Native Architecture of images.nasa.govNot Your Father’s Web App: The Cloud-Native Architecture of images.nasa.gov
Not Your Father’s Web App: The Cloud-Native Architecture of images.nasa.govChris Shenton
 
[AWS DC Meetup] Not Your Father’s WebApp: The Cloud-Native Architecture of im...
[AWS DC Meetup] Not Your Father’s WebApp: The Cloud-Native Architecture of im...[AWS DC Meetup] Not Your Father’s WebApp: The Cloud-Native Architecture of im...
[AWS DC Meetup] Not Your Father’s WebApp: The Cloud-Native Architecture of im...Chris Shenton
 
It's a Breeze to develop Apache Airflow (London Apache Airflow meetup)
It's a Breeze to develop Apache Airflow (London Apache Airflow meetup)It's a Breeze to develop Apache Airflow (London Apache Airflow meetup)
It's a Breeze to develop Apache Airflow (London Apache Airflow meetup)Jarek Potiuk
 
Adobe Experience Manager - Replication deep dive
Adobe Experience Manager - Replication deep diveAdobe Experience Manager - Replication deep dive
Adobe Experience Manager - Replication deep divemwmd
 

What's hot (14)

A look ahead at RAP (ESE 2010)
A look ahead at RAP (ESE 2010)A look ahead at RAP (ESE 2010)
A look ahead at RAP (ESE 2010)
 
Benefits of using Ruby on rails for Apps Development
Benefits of using Ruby on rails for Apps Development Benefits of using Ruby on rails for Apps Development
Benefits of using Ruby on rails for Apps Development
 
Scala services in action
Scala services in actionScala services in action
Scala services in action
 
ECS19 Elio Struyf - Setting Up Your SPFx CI/CD pipelines on Azure DevOps
ECS19 Elio Struyf - Setting Up Your SPFx CI/CD pipelines on Azure DevOpsECS19 Elio Struyf - Setting Up Your SPFx CI/CD pipelines on Azure DevOps
ECS19 Elio Struyf - Setting Up Your SPFx CI/CD pipelines on Azure DevOps
 
Alfresco Development Framework Basic
Alfresco Development Framework BasicAlfresco Development Framework Basic
Alfresco Development Framework Basic
 
Records Management - the api story
Records Management -  the api storyRecords Management -  the api story
Records Management - the api story
 
Rails course day 2
Rails course  day 2Rails course  day 2
Rails course day 2
 
SQL Server In-Memory OLTP Migration Overview
SQL Server In-Memory OLTP Migration OverviewSQL Server In-Memory OLTP Migration Overview
SQL Server In-Memory OLTP Migration Overview
 
Content Migrations: Getting from A to B
Content Migrations: Getting from A to BContent Migrations: Getting from A to B
Content Migrations: Getting from A to B
 
A Gentle Introduction to Functions-as-a-Service
A Gentle Introduction to Functions-as-a-ServiceA Gentle Introduction to Functions-as-a-Service
A Gentle Introduction to Functions-as-a-Service
 
Not Your Father’s Web App: The Cloud-Native Architecture of images.nasa.gov
Not Your Father’s Web App: The Cloud-Native Architecture of images.nasa.govNot Your Father’s Web App: The Cloud-Native Architecture of images.nasa.gov
Not Your Father’s Web App: The Cloud-Native Architecture of images.nasa.gov
 
[AWS DC Meetup] Not Your Father’s WebApp: The Cloud-Native Architecture of im...
[AWS DC Meetup] Not Your Father’s WebApp: The Cloud-Native Architecture of im...[AWS DC Meetup] Not Your Father’s WebApp: The Cloud-Native Architecture of im...
[AWS DC Meetup] Not Your Father’s WebApp: The Cloud-Native Architecture of im...
 
It's a Breeze to develop Apache Airflow (London Apache Airflow meetup)
It's a Breeze to develop Apache Airflow (London Apache Airflow meetup)It's a Breeze to develop Apache Airflow (London Apache Airflow meetup)
It's a Breeze to develop Apache Airflow (London Apache Airflow meetup)
 
Adobe Experience Manager - Replication deep dive
Adobe Experience Manager - Replication deep diveAdobe Experience Manager - Replication deep dive
Adobe Experience Manager - Replication deep dive
 

Viewers also liked

ApresentaçãO2jkjkj
ApresentaçãO2jkjkjApresentaçãO2jkjkj
ApresentaçãO2jkjkjjez.freires
 
Yahoo Pipes Middleware In The Cloud
Yahoo Pipes Middleware In The CloudYahoo Pipes Middleware In The Cloud
Yahoo Pipes Middleware In The CloudConSanFrancisco123
 
Business Natural Languages Development In Ruby
Business Natural Languages Development In RubyBusiness Natural Languages Development In Ruby
Business Natural Languages Development In RubyConSanFrancisco123
 
Introduction Challenges In Agile And How To Overcome Them
Introduction Challenges In Agile And How To Overcome ThemIntroduction Challenges In Agile And How To Overcome Them
Introduction Challenges In Agile And How To Overcome ThemConSanFrancisco123
 
Yahoo Communities Architecture Unlikely Bedfellows
Yahoo Communities Architecture Unlikely BedfellowsYahoo Communities Architecture Unlikely Bedfellows
Yahoo Communities Architecture Unlikely BedfellowsConSanFrancisco123
 
Open Ap Is State Of The Market
Open Ap Is State Of The MarketOpen Ap Is State Of The Market
Open Ap Is State Of The MarketConSanFrancisco123
 

Viewers also liked (7)

ApresentaçãO2jkjkj
ApresentaçãO2jkjkjApresentaçãO2jkjkj
ApresentaçãO2jkjkj
 
Security Cas And Open Id
Security Cas And Open IdSecurity Cas And Open Id
Security Cas And Open Id
 
Yahoo Pipes Middleware In The Cloud
Yahoo Pipes Middleware In The CloudYahoo Pipes Middleware In The Cloud
Yahoo Pipes Middleware In The Cloud
 
Business Natural Languages Development In Ruby
Business Natural Languages Development In RubyBusiness Natural Languages Development In Ruby
Business Natural Languages Development In Ruby
 
Introduction Challenges In Agile And How To Overcome Them
Introduction Challenges In Agile And How To Overcome ThemIntroduction Challenges In Agile And How To Overcome Them
Introduction Challenges In Agile And How To Overcome Them
 
Yahoo Communities Architecture Unlikely Bedfellows
Yahoo Communities Architecture Unlikely BedfellowsYahoo Communities Architecture Unlikely Bedfellows
Yahoo Communities Architecture Unlikely Bedfellows
 
Open Ap Is State Of The Market
Open Ap Is State Of The MarketOpen Ap Is State Of The Market
Open Ap Is State Of The Market
 

Similar to Behind the Curtain: How YELLOWPAGES.COM Transitioned to Ruby on Rails

From Rails legacy to DDD - Pivorak, Lviv
From Rails legacy to DDD - Pivorak, LvivFrom Rails legacy to DDD - Pivorak, Lviv
From Rails legacy to DDD - Pivorak, LvivAndrzej Krzywda
 
Introduction to Web Frameworks
Introduction to Web FrameworksIntroduction to Web Frameworks
Introduction to Web FrameworksSarika Jadhav
 
Isomorphic React Applications: Performance And Scalability
Isomorphic React Applications: Performance And ScalabilityIsomorphic React Applications: Performance And Scalability
Isomorphic React Applications: Performance And ScalabilityDenis Izmaylov
 
Ruby On Rails Seminar Basis Softexpo Feb2010
Ruby On Rails Seminar Basis Softexpo Feb2010Ruby On Rails Seminar Basis Softexpo Feb2010
Ruby On Rails Seminar Basis Softexpo Feb2010arif44
 
Things you must know on ruby on rails single page application
Things you must know on ruby on rails single page applicationThings you must know on ruby on rails single page application
Things you must know on ruby on rails single page applicationAndolasoft Inc
 
What is Mean Stack Development ?
What is Mean Stack Development ?What is Mean Stack Development ?
What is Mean Stack Development ?Balajihope
 
Seattle Spark Meetup Mobius CSharp API
Seattle Spark Meetup Mobius CSharp APISeattle Spark Meetup Mobius CSharp API
Seattle Spark Meetup Mobius CSharp APIshareddatamsft
 
Angular, the New Angular JS
Angular, the New Angular JSAngular, the New Angular JS
Angular, the New Angular JSKenzan
 
Seo for single page applications
Seo for single page applicationsSeo for single page applications
Seo for single page applicationsJustinGillespie12
 
Web Application Performance Audit and Optimization
Web Application Performance Audit and OptimizationWeb Application Performance Audit and Optimization
Web Application Performance Audit and OptimizationZyxware Technologies
 
Web Development Agency in Noida in 2024 1
Web Development Agency in Noida in 2024 1Web Development Agency in Noida in 2024 1
Web Development Agency in Noida in 2024 1NadeemAnsari576752
 
Angular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - LinagoraAngular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - LinagoraLINAGORA
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...WebStackAcademy
 
Global Logic sMash Overview And Experiences
Global Logic   sMash  Overview And  ExperiencesGlobal Logic   sMash  Overview And  Experiences
Global Logic sMash Overview And ExperiencesProject Zero
 

Similar to Behind the Curtain: How YELLOWPAGES.COM Transitioned to Ruby on Rails (20)

From Rails legacy to DDD - Pivorak, Lviv
From Rails legacy to DDD - Pivorak, LvivFrom Rails legacy to DDD - Pivorak, Lviv
From Rails legacy to DDD - Pivorak, Lviv
 
Introduction to Web Frameworks
Introduction to Web FrameworksIntroduction to Web Frameworks
Introduction to Web Frameworks
 
Single page App
Single page AppSingle page App
Single page App
 
Isomorphic React Applications: Performance And Scalability
Isomorphic React Applications: Performance And ScalabilityIsomorphic React Applications: Performance And Scalability
Isomorphic React Applications: Performance And Scalability
 
Calatrava
CalatravaCalatrava
Calatrava
 
The Decoupled CMS in Financial Services
The Decoupled CMS in Financial ServicesThe Decoupled CMS in Financial Services
The Decoupled CMS in Financial Services
 
Ruby On Rails Seminar Basis Softexpo Feb2010
Ruby On Rails Seminar Basis Softexpo Feb2010Ruby On Rails Seminar Basis Softexpo Feb2010
Ruby On Rails Seminar Basis Softexpo Feb2010
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
Things you must know on ruby on rails single page application
Things you must know on ruby on rails single page applicationThings you must know on ruby on rails single page application
Things you must know on ruby on rails single page application
 
Aspose pdf
Aspose pdfAspose pdf
Aspose pdf
 
What is Mean Stack Development ?
What is Mean Stack Development ?What is Mean Stack Development ?
What is Mean Stack Development ?
 
Seattle Spark Meetup Mobius CSharp API
Seattle Spark Meetup Mobius CSharp APISeattle Spark Meetup Mobius CSharp API
Seattle Spark Meetup Mobius CSharp API
 
Angular, the New Angular JS
Angular, the New Angular JSAngular, the New Angular JS
Angular, the New Angular JS
 
Seo for single page applications
Seo for single page applicationsSeo for single page applications
Seo for single page applications
 
Why Ruby on Rail for your next project?
Why Ruby on Rail for your next project? Why Ruby on Rail for your next project?
Why Ruby on Rail for your next project?
 
Web Application Performance Audit and Optimization
Web Application Performance Audit and OptimizationWeb Application Performance Audit and Optimization
Web Application Performance Audit and Optimization
 
Web Development Agency in Noida in 2024 1
Web Development Agency in Noida in 2024 1Web Development Agency in Noida in 2024 1
Web Development Agency in Noida in 2024 1
 
Angular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - LinagoraAngular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - Linagora
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
 
Global Logic sMash Overview And Experiences
Global Logic   sMash  Overview And  ExperiencesGlobal Logic   sMash  Overview And  Experiences
Global Logic sMash Overview And Experiences
 

More from ConSanFrancisco123

Teamwork Is An Individual Skill How To Build Any Team Any Time
Teamwork Is An Individual Skill How To Build Any Team Any TimeTeamwork Is An Individual Skill How To Build Any Team Any Time
Teamwork Is An Individual Skill How To Build Any Team Any TimeConSanFrancisco123
 
Agility Possibilities At A Personal Level
Agility Possibilities At A Personal LevelAgility Possibilities At A Personal Level
Agility Possibilities At A Personal LevelConSanFrancisco123
 
Res Tful Enterprise Development
Res Tful Enterprise DevelopmentRes Tful Enterprise Development
Res Tful Enterprise DevelopmentConSanFrancisco123
 
Behind The Scenes At My Spacecom
Behind The Scenes At My SpacecomBehind The Scenes At My Spacecom
Behind The Scenes At My SpacecomConSanFrancisco123
 
Making Threat Modeling Useful To Software Development
Making Threat Modeling Useful To Software DevelopmentMaking Threat Modeling Useful To Software Development
Making Threat Modeling Useful To Software DevelopmentConSanFrancisco123
 
Secure Programming With Static Analysis
Secure Programming With Static AnalysisSecure Programming With Static Analysis
Secure Programming With Static AnalysisConSanFrancisco123
 
Agile Software Development In The Large
Agile Software Development In The LargeAgile Software Development In The Large
Agile Software Development In The LargeConSanFrancisco123
 
Orbitz World Wide An Architectures Response To Growth And Change
Orbitz World Wide An Architectures Response To Growth And ChangeOrbitz World Wide An Architectures Response To Growth And Change
Orbitz World Wide An Architectures Response To Growth And ChangeConSanFrancisco123
 
Introduction Architectures Youve Always Wondered About
Introduction Architectures Youve Always Wondered AboutIntroduction Architectures Youve Always Wondered About
Introduction Architectures Youve Always Wondered AboutConSanFrancisco123
 
Linked In Lessons Learned And Growth And Scalability
Linked In Lessons Learned And Growth And ScalabilityLinked In Lessons Learned And Growth And Scalability
Linked In Lessons Learned And Growth And ScalabilityConSanFrancisco123
 
Designing Res Tful Rails Applications
Designing Res Tful Rails ApplicationsDesigning Res Tful Rails Applications
Designing Res Tful Rails ApplicationsConSanFrancisco123
 
No More Hops Towards A Linearly Scalable Application Infrastructure
No More Hops Towards A Linearly Scalable Application InfrastructureNo More Hops Towards A Linearly Scalable Application Infrastructure
No More Hops Towards A Linearly Scalable Application InfrastructureConSanFrancisco123
 
Clustered Architecture Patterns Delivering Scalability And Availability
Clustered Architecture Patterns Delivering Scalability And AvailabilityClustered Architecture Patterns Delivering Scalability And Availability
Clustered Architecture Patterns Delivering Scalability And AvailabilityConSanFrancisco123
 
Second Life How It Works And How It Doesnt
Second Life How It Works And How It DoesntSecond Life How It Works And How It Doesnt
Second Life How It Works And How It DoesntConSanFrancisco123
 

More from ConSanFrancisco123 (20)

Ruby V Ms A Comparison
Ruby V Ms A ComparisonRuby V Ms A Comparison
Ruby V Ms A Comparison
 
Teamwork Is An Individual Skill How To Build Any Team Any Time
Teamwork Is An Individual Skill How To Build Any Team Any TimeTeamwork Is An Individual Skill How To Build Any Team Any Time
Teamwork Is An Individual Skill How To Build Any Team Any Time
 
Agility Possibilities At A Personal Level
Agility Possibilities At A Personal LevelAgility Possibilities At A Personal Level
Agility Possibilities At A Personal Level
 
Res Tful Enterprise Development
Res Tful Enterprise DevelopmentRes Tful Enterprise Development
Res Tful Enterprise Development
 
Gallio Crafting A Toolchain
Gallio Crafting A ToolchainGallio Crafting A Toolchain
Gallio Crafting A Toolchain
 
10 Ways To Improve Your Code
10 Ways To Improve Your Code10 Ways To Improve Your Code
10 Ways To Improve Your Code
 
Http Status Report
Http Status ReportHttp Status Report
Http Status Report
 
Behind The Scenes At My Spacecom
Behind The Scenes At My SpacecomBehind The Scenes At My Spacecom
Behind The Scenes At My Spacecom
 
Building Blueprint With Gwt
Building Blueprint With GwtBuilding Blueprint With Gwt
Building Blueprint With Gwt
 
Soa And Web Services Security
Soa And Web Services SecuritySoa And Web Services Security
Soa And Web Services Security
 
Making Threat Modeling Useful To Software Development
Making Threat Modeling Useful To Software DevelopmentMaking Threat Modeling Useful To Software Development
Making Threat Modeling Useful To Software Development
 
Secure Programming With Static Analysis
Secure Programming With Static AnalysisSecure Programming With Static Analysis
Secure Programming With Static Analysis
 
Agile Software Development In The Large
Agile Software Development In The LargeAgile Software Development In The Large
Agile Software Development In The Large
 
Orbitz World Wide An Architectures Response To Growth And Change
Orbitz World Wide An Architectures Response To Growth And ChangeOrbitz World Wide An Architectures Response To Growth And Change
Orbitz World Wide An Architectures Response To Growth And Change
 
Introduction Architectures Youve Always Wondered About
Introduction Architectures Youve Always Wondered AboutIntroduction Architectures Youve Always Wondered About
Introduction Architectures Youve Always Wondered About
 
Linked In Lessons Learned And Growth And Scalability
Linked In Lessons Learned And Growth And ScalabilityLinked In Lessons Learned And Growth And Scalability
Linked In Lessons Learned And Growth And Scalability
 
Designing Res Tful Rails Applications
Designing Res Tful Rails ApplicationsDesigning Res Tful Rails Applications
Designing Res Tful Rails Applications
 
No More Hops Towards A Linearly Scalable Application Infrastructure
No More Hops Towards A Linearly Scalable Application InfrastructureNo More Hops Towards A Linearly Scalable Application Infrastructure
No More Hops Towards A Linearly Scalable Application Infrastructure
 
Clustered Architecture Patterns Delivering Scalability And Availability
Clustered Architecture Patterns Delivering Scalability And AvailabilityClustered Architecture Patterns Delivering Scalability And Availability
Clustered Architecture Patterns Delivering Scalability And Availability
 
Second Life How It Works And How It Doesnt
Second Life How It Works And How It DoesntSecond Life How It Works And How It Doesnt
Second Life How It Works And How It Doesnt
 

Recently uploaded

Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
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
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
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
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 

Recently uploaded (20)

Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
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
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
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
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 

Behind the Curtain: How YELLOWPAGES.COM Transitioned to Ruby on Rails

  • 1. YELLOWPAGES.COM: Behind the Curtain John Straw AT&T Interactive
  • 2. What is YELLOWPAGES.COM? Part of AT&T s A local search website, serving s 23 million unique visitors / month q 2 million searches / day q More than 48 million requests / day q More than 1500 requests / sec q 30 Mbit/sec (200 Mbit/sec from Akamai) q Entirely Ruby on Rails since June 2007 s
  • 3. How we were Website and API applications s written in Java Website in application server q API in Tomcat q Search code split between s application and search layer
  • 4. What was bad Problems with architecture s Separate search implementations in each application q Session-heavy website application design hard to scale horizontally q Pointless web accelerator layer q Problems with application server platform s Technologically stagnant q No usable session migration features q Hard to do SEO q
  • 5. And also ... Lots of code written by consultants 2004-2005 s Fundamental design problems s Code extended largely by copy-and-modify since 11/2005 (to s around 125K lines) No test code s New features hard to implement s
  • 6. The Big Rewrite Several projects combined to become the big rewrite s Replacement of Java application server q Redesign of site look-and-feel q Many other wish-list projects, some of which were difficult to q accomplish with existing application Project conception to completion: one year s Development took about four months s Project phases s 7/2006 - 12/2006: Thinking, early preparation q 12/2006: Rough architecture determination, kick-off q 1/2007 - 3/1/2007: Technology research and prototypes, business q rules exploration, UI design concepts 3/1/2007 - 6/28/2007: Site development and launch q
  • 7. Requirements for a new site architecture 1. Absolute control of urls Maximize SEO crawl-ability q 2. No sessions: HTTP is stateless Anything other than cookies is just self-delusion q Staying stateless makes scaling easier q 3. Be agile: write less code Development must be faster q 4. Develop easy-to-leverage core business services Eliminate current duplicated code q Must be able to build other sites or applications with common q search, personalization and business review logic Service-oriented architecture, with web tier utilizing common q service tier
  • 8.
  • 9. Rewrite team Cross-functional team of about 20 people s Assemble stakeholders, not requirements q Working closely together s Whole team sat together for entire project q Lunch provided several days per week q Team celebrations held for milestones q Core development team deliberately small s Four skilled developers can accomplish a lot q Cost of communication low q Low management overhead q
  • 10. Picking the platform Web tier: s Rails or Django q Utilizing common services for q search, personalization, and ratings Service tier: s Java application q Probably EJB3 in JBoss q Exposing a REST API and q returning JSON-serialized data Started writing prototypes ... s
  • 11. One
  • 12. Two
  • 13. Three
  • 15. Why Rails? Considered Java frameworks didn't provide enough control of s url structure Web tier choice became Rails vs. Django s Rails best web tier choice due to s Better automated testing integration q More platform maturity q Clearer path (for us!) to C if necessary for performance q Developer comfort and experience q Team decided to go with Rails top-to-bottom s Evaluation of EJB3 didn't show real advantages over Ruby or q Python for our application Reasons for choosing Rails for web tier applied equally to service q tier Advantage of having uniform implementation environment q
  • 17. Other considerations How many servers? s How many mongrels per server? s How much memory for memcached? s
  • 18. Production configuration Acquired 25 machines of identical configuration for each data s center Performance testing to size out each tier, and determine how s many mongrels 4 GB of memory on each service-tier machine set aside for s memcached Used 2 machines in each data center for database servers s
  • 19. Performance goals Sub-second average home page load time s Sub 4-second average search results page load time s Handle traffic without dying s
  • 20. Performance optimizations mongrel_handlers in service tier application s C library for parsing search cluster responses s Erubis rather than erb in web tier s
  • 22. Database performance issues Machines inadequate to handle search load for ratings look-up s Additional caching added q Oracle doesn't like lots of connections s Use of named connections made this problem even worse s Additional memory required for database servers q All database look-up code moved to service tier q Changed to a single database connection q
  • 23. Page performance issues Slow page performance caused more by asset download times s than speed of web framework Worked through the Yahoo! performance guidelines s Minified and combined CSS and Javascript with s asset_packager Moved image serving to Akamai edge cache s Apache slow serving analytics tags -- moved to nginx for web s tier Started using some fragment caching s
  • 24. Slow requests, etc. Slow requests in the web tier caused mongrel queueing s Developed qrp (http://qrp.rubyforge.org/) q Allows you to establish a backup pool where requests get parked q until a mongrel is available Experimented with different malloc implementations s Started using a custom MRI build -- ypc_ruby s Started using a slightly-customized Mongrel s
  • 25. Overall performance Performance at launch was generally acceptable s After web server & hosting changes performance better than s previous site Extensive use of caching and elimination of obsolete queries s lowered load on search cluster compared to previous site Over a year later, we need to do more profiling s Traffic has more than doubled since launch q Hardware evolution has invalidated original profiling q We now want sub 2-second search result pages q
  • 26. What else? New applications on Rails s Server-side component of native iPhone application q Working on moving current Java API application q Other internal applications q Ruby but not Rails s Exploratory port of service tier to merb q Supporting development of Waves q Data-source ETL q Listing match-and-merge q