SlideShare a Scribd company logo
1 of 57
MonoRail: Monolithic Rails Application
            @jackdanger • Square, Inc.
2015: The Aftermath   A Preview of Things to Come
2015: The Aftermath                       A Preview of Things to Come


  ‣   Rails app in multiple datacenters
2015: The Aftermath                       A Preview of Things to Come


  ‣   Rails app in multiple datacenters
  ‣   Huge MySQL boxes
2015: The Aftermath                       A Preview of Things to Come


  ‣   Rails app in multiple datacenters
  ‣   Huge MySQL boxes
  ‣   Over 1,000 controllers
2015: The Aftermath                       A Preview of Things to Come


  ‣   Rails app in multiple datacenters
  ‣   Huge MySQL boxes
  ‣   Over 1,000 controllers
  ‣   Spotty test coverage
2015: The Aftermath                       A Preview of Things to Come


  ‣   Rails app in multiple datacenters
  ‣   Huge MySQL boxes
  ‣   Over 1,000 controllers
  ‣   Spotty test coverage
  ‣   Sad developers
2015: The Aftermath                       A Preview of Things to Come


  ‣   Rails app in multiple datacenters
  ‣   Huge MySQL boxes
  ‣   Over 1,000 controllers
  ‣   Spotty test coverage
  ‣   Sad developers
  ‣   Ultra-slow test suite
2015: The Aftermath   A Preview of Things to Come
2015: The Aftermath        A Preview of Things to Come




              “Ye gods!”
Make Believe?
Make Believe?
>> can_scale?(Rails)
ArgumentError: semantically invalid
        from scalability.rb:1:in ‘can_scale?’
$ heroku ps:scale web=30
$ heroku ps:scale web=30




      Done. Scaled.
Actual Scaling Problems
  ‣   Scaling your data
  ‣   Scaling your codebase
  ‣   Scaling your customers
  ‣   Scaling your feature count
Actual Scaling Problems
  ‣   Scaling your data
  ‣   Scaling your codebase
  ‣   Scaling your customers
  ‣   Scaling your feature count
  ‣   Scaling your developer headcount
THIS SLIDE INTENTIONALLY
       LEFT BLANK
Blog in 15 Minutes!



  1 app == 1 product == 1 developer
Blog in 15 Minutes!



  1 app == 1 product == 1 developer

            “Welcome aboard,
            put your code here.”
Blog in 15 Minutes!
  ‣   Admin interface: /admin
  ‣   Analytics section: /trends
Blog in 15 Minutes!
  ‣   Admin interface: /admin
  ‣   Analytics section: /trends



                 “Rails can do anything!”


                              “Let’s make it do everything!”
Blog in 15 Minutes!



       class ApplicationMailer < ActionMailer::Base
           # 4 million redundant lines
       end
Blog in 15 Minutes!



       class User < ActiveRecord::Base
         validates_presence_of :email
         validates_presence_of :phone
         validates_presence_of :bajillion_other_things
       end
Blog in 15 Minutes!

           “Nice mini-framework.
            Throw that in ./lib !”
Blog in 15 Minutes!

           “Nice mini-framework.
            Throw that in ./lib !”

             “Don’t forget tests
               in ./spec/lib !”
Optimized for first steps
Young   Mature
Young         Mature




1 Database   Many Databases
Young      Mature



 MySQL
           Postgres
   or
           (seriously)
Postgres
Young         Mature




ActionMailer
Young          Mature




ActionMailer   anything else
Young                   Mature



                          Only authentication
Lost of data in ‘users’
                            in ‘users’ table
Young                 Mature




features sitting in ./lib   internal gems
Young               Mature




validates_*_of   Database validations
Young              Mature



                      Log every
default logging
                  significant action
Young              Mature



analyze your data   analyze your data
 (in the main db)      (elsewhere)
THIS SLIDE INTENTIONALLY
       LEFT BLANK
Conway’s Law
Conway’s Law


"organizations which design systems ... are constrained to
produce designs which are copies of the communication
structures of these organizations"
Rails can do this.
Rails can do this.
   But it’ll take foresight.
MonoRail
Service Interfaces

1      Email.to “lady@place.com”,
                 :welcome,
                 :group => “b”
Service Interfaces

1      Email.to “lady@place.com”,
                 :welcome,
                 :group => “b”




                Who cares how that happens?
Service Interfaces

1      Marketing.render request,
                        :with_condition => “public”
Extract the code

2
Extract the code

2
Extract the code

2
Extract the code

2
Move the data

3
Move the data

3
@jackdanger • Square, Inc.
Credits
   http://www.flickr.com/photos/ssoosay/7070367799/
http://www.flickr.com/photos/23232902@N05/2234965515/
          http://openclipart.org/detail/94723

More Related Content

What's hot

Pwa, are we there yet?!
Pwa, are we there yet?!Pwa, are we there yet?!
Pwa, are we there yet?!Simona Cotin
 
Windycityrails page performance
Windycityrails page performanceWindycityrails page performance
Windycityrails page performanceJohn McCaffrey
 
Stop using Nagios (so it can die peacefully)
Stop using Nagios (so it can die peacefully)Stop using Nagios (so it can die peacefully)
Stop using Nagios (so it can die peacefully)Andy Sykes
 
The Open Commerce Conference - Premature Optimisation: The Root of All Evil
The Open Commerce Conference - Premature Optimisation: The Root of All EvilThe Open Commerce Conference - Premature Optimisation: The Root of All Evil
The Open Commerce Conference - Premature Optimisation: The Root of All EvilFabio Akita
 
Donald Ferguson - Old Programmers Can Learn New Tricks
Donald Ferguson - Old Programmers Can Learn New TricksDonald Ferguson - Old Programmers Can Learn New Tricks
Donald Ferguson - Old Programmers Can Learn New TricksServerlessConf
 
Streams on top of scala - #lambdaCon
Streams on top of scala - #lambdaConStreams on top of scala - #lambdaCon
Streams on top of scala - #lambdaConQuentin Adam
 
Icinga Camp Belgrade - ITAF Monitoring best practices & demo
Icinga Camp Belgrade - ITAF Monitoring best practices & demoIcinga Camp Belgrade - ITAF Monitoring best practices & demo
Icinga Camp Belgrade - ITAF Monitoring best practices & demoIcinga
 
Jenkins2: How Jenkins 2 works and how to automate it
Jenkins2: How Jenkins 2 works and how to automate itJenkins2: How Jenkins 2 works and how to automate it
Jenkins2: How Jenkins 2 works and how to automate itCamilo Ribeiro
 
TDC2016SP - Otimização Prematura: a Raíz de Todo o Mal
TDC2016SP - Otimização Prematura: a Raíz de Todo o MalTDC2016SP - Otimização Prematura: a Raíz de Todo o Mal
TDC2016SP - Otimização Prematura: a Raíz de Todo o Maltdc-globalcode
 
Collaborative communication
Collaborative communicationCollaborative communication
Collaborative communicationIcinga
 
Autoscaling Best Practices - WebPerf Barcelona Oct 2014
Autoscaling Best Practices - WebPerf Barcelona Oct 2014Autoscaling Best Practices - WebPerf Barcelona Oct 2014
Autoscaling Best Practices - WebPerf Barcelona Oct 2014Marc Cluet
 
Backend, Simplified - A sane look on the mobile backend world, Nir Orpaz, Mob...
Backend, Simplified - A sane look on the mobile backend world, Nir Orpaz, Mob...Backend, Simplified - A sane look on the mobile backend world, Nir Orpaz, Mob...
Backend, Simplified - A sane look on the mobile backend world, Nir Orpaz, Mob...DroidConTLV
 
Develop:BBC 2013 - Turbocharge your mobile web apps by using offline
Develop:BBC 2013 - Turbocharge your mobile web apps by using offlineDevelop:BBC 2013 - Turbocharge your mobile web apps by using offline
Develop:BBC 2013 - Turbocharge your mobile web apps by using offlineJan Jongboom
 
Embracing the Future
Embracing the FutureEmbracing the Future
Embracing the FutureJemuel Young
 
Man in the Binder - Michael Shalyt & Idan Revivo, CheckPoint
Man in the Binder - Michael Shalyt & Idan Revivo, CheckPointMan in the Binder - Michael Shalyt & Idan Revivo, CheckPoint
Man in the Binder - Michael Shalyt & Idan Revivo, CheckPointDroidConTLV
 
Development, Deployment & Collaboration at Etsy
Development, Deployment & Collaboration at EtsyDevelopment, Deployment & Collaboration at Etsy
Development, Deployment & Collaboration at EtsyDaniel Schauenberg
 

What's hot (20)

Pwa, are we there yet?!
Pwa, are we there yet?!Pwa, are we there yet?!
Pwa, are we there yet?!
 
presentation-chaos-monkey
presentation-chaos-monkeypresentation-chaos-monkey
presentation-chaos-monkey
 
Cloud tools
Cloud toolsCloud tools
Cloud tools
 
Windycityrails page performance
Windycityrails page performanceWindycityrails page performance
Windycityrails page performance
 
Stop using Nagios (so it can die peacefully)
Stop using Nagios (so it can die peacefully)Stop using Nagios (so it can die peacefully)
Stop using Nagios (so it can die peacefully)
 
The Open Commerce Conference - Premature Optimisation: The Root of All Evil
The Open Commerce Conference - Premature Optimisation: The Root of All EvilThe Open Commerce Conference - Premature Optimisation: The Root of All Evil
The Open Commerce Conference - Premature Optimisation: The Root of All Evil
 
Donald Ferguson - Old Programmers Can Learn New Tricks
Donald Ferguson - Old Programmers Can Learn New TricksDonald Ferguson - Old Programmers Can Learn New Tricks
Donald Ferguson - Old Programmers Can Learn New Tricks
 
Supervise your Akka actors - Devoxx
Supervise your Akka actors - Devoxx Supervise your Akka actors - Devoxx
Supervise your Akka actors - Devoxx
 
Streams on top of scala - #lambdaCon
Streams on top of scala - #lambdaConStreams on top of scala - #lambdaCon
Streams on top of scala - #lambdaCon
 
Icinga Camp Belgrade - ITAF Monitoring best practices & demo
Icinga Camp Belgrade - ITAF Monitoring best practices & demoIcinga Camp Belgrade - ITAF Monitoring best practices & demo
Icinga Camp Belgrade - ITAF Monitoring best practices & demo
 
Jenkins2: How Jenkins 2 works and how to automate it
Jenkins2: How Jenkins 2 works and how to automate itJenkins2: How Jenkins 2 works and how to automate it
Jenkins2: How Jenkins 2 works and how to automate it
 
TDC2016SP - Otimização Prematura: a Raíz de Todo o Mal
TDC2016SP - Otimização Prematura: a Raíz de Todo o MalTDC2016SP - Otimização Prematura: a Raíz de Todo o Mal
TDC2016SP - Otimização Prematura: a Raíz de Todo o Mal
 
Ajax presentation
Ajax presentationAjax presentation
Ajax presentation
 
Collaborative communication
Collaborative communicationCollaborative communication
Collaborative communication
 
Autoscaling Best Practices - WebPerf Barcelona Oct 2014
Autoscaling Best Practices - WebPerf Barcelona Oct 2014Autoscaling Best Practices - WebPerf Barcelona Oct 2014
Autoscaling Best Practices - WebPerf Barcelona Oct 2014
 
Backend, Simplified - A sane look on the mobile backend world, Nir Orpaz, Mob...
Backend, Simplified - A sane look on the mobile backend world, Nir Orpaz, Mob...Backend, Simplified - A sane look on the mobile backend world, Nir Orpaz, Mob...
Backend, Simplified - A sane look on the mobile backend world, Nir Orpaz, Mob...
 
Develop:BBC 2013 - Turbocharge your mobile web apps by using offline
Develop:BBC 2013 - Turbocharge your mobile web apps by using offlineDevelop:BBC 2013 - Turbocharge your mobile web apps by using offline
Develop:BBC 2013 - Turbocharge your mobile web apps by using offline
 
Embracing the Future
Embracing the FutureEmbracing the Future
Embracing the Future
 
Man in the Binder - Michael Shalyt & Idan Revivo, CheckPoint
Man in the Binder - Michael Shalyt & Idan Revivo, CheckPointMan in the Binder - Michael Shalyt & Idan Revivo, CheckPoint
Man in the Binder - Michael Shalyt & Idan Revivo, CheckPoint
 
Development, Deployment & Collaboration at Etsy
Development, Deployment & Collaboration at EtsyDevelopment, Deployment & Collaboration at Etsy
Development, Deployment & Collaboration at Etsy
 

Viewers also liked

7.del angel mendo jaqueline de jesus
7.del angel mendo jaqueline de jesus7.del angel mendo jaqueline de jesus
7.del angel mendo jaqueline de jesusYaquelin Mendo
 
Sociale media en proefdieren, gaat dat samen?
Sociale media en proefdieren, gaat dat samen?Sociale media en proefdieren, gaat dat samen?
Sociale media en proefdieren, gaat dat samen?Maringa Emons
 
Tarea de tecnologia villa
Tarea de tecnologia  villaTarea de tecnologia  villa
Tarea de tecnologia villaandresvilla03
 
Jochems s conference-colloque reecetsq-140913am-vfinale
Jochems s conference-colloque reecetsq-140913am-vfinaleJochems s conference-colloque reecetsq-140913am-vfinale
Jochems s conference-colloque reecetsq-140913am-vfinaleS. Jochems UQAM
 
Hábitos de los usuarios de internet en México 2012 [Mayo 2012]
Hábitos de los usuarios de internet en México 2012 [Mayo 2012]Hábitos de los usuarios de internet en México 2012 [Mayo 2012]
Hábitos de los usuarios de internet en México 2012 [Mayo 2012]nma
 
Introduction into Oil and Gas Industry. OIL: Part 1
Introduction into Oil and Gas Industry. OIL: Part 1Introduction into Oil and Gas Industry. OIL: Part 1
Introduction into Oil and Gas Industry. OIL: Part 1Fidan Aliyeva
 

Viewers also liked (8)

7.del angel mendo jaqueline de jesus
7.del angel mendo jaqueline de jesus7.del angel mendo jaqueline de jesus
7.del angel mendo jaqueline de jesus
 
Proyecto final grupo 45
Proyecto final grupo 45Proyecto final grupo 45
Proyecto final grupo 45
 
Sociale media en proefdieren, gaat dat samen?
Sociale media en proefdieren, gaat dat samen?Sociale media en proefdieren, gaat dat samen?
Sociale media en proefdieren, gaat dat samen?
 
Tarea de tecnologia villa
Tarea de tecnologia  villaTarea de tecnologia  villa
Tarea de tecnologia villa
 
Jochems s conference-colloque reecetsq-140913am-vfinale
Jochems s conference-colloque reecetsq-140913am-vfinaleJochems s conference-colloque reecetsq-140913am-vfinale
Jochems s conference-colloque reecetsq-140913am-vfinale
 
Hábitos de los usuarios de internet en México 2012 [Mayo 2012]
Hábitos de los usuarios de internet en México 2012 [Mayo 2012]Hábitos de los usuarios de internet en México 2012 [Mayo 2012]
Hábitos de los usuarios de internet en México 2012 [Mayo 2012]
 
Introduction into Oil and Gas Industry. OIL: Part 1
Introduction into Oil and Gas Industry. OIL: Part 1Introduction into Oil and Gas Industry. OIL: Part 1
Introduction into Oil and Gas Industry. OIL: Part 1
 
Oil and gas industry ppt
Oil and gas industry pptOil and gas industry ppt
Oil and gas industry ppt
 

Similar to MonoRails - GoGaRuCo 2012

Clearly, I Have Made Some Bad Decisions
Clearly, I Have Made Some Bad DecisionsClearly, I Have Made Some Bad Decisions
Clearly, I Have Made Some Bad DecisionsJonathan Hitchcock
 
Apply best parts of microservices to serverless
Apply best parts of microservices to serverlessApply best parts of microservices to serverless
Apply best parts of microservices to serverlessYan Cui
 
Increasing velocity via serless semantics
Increasing velocity via serless semanticsIncreasing velocity via serless semantics
Increasing velocity via serless semanticsKfir Bloch
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on RailsAvi Kedar
 
Metrics-Driven Devops: Delivering High Quality Software Faster!
Metrics-Driven Devops: Delivering High Quality Software Faster! Metrics-Driven Devops: Delivering High Quality Software Faster!
Metrics-Driven Devops: Delivering High Quality Software Faster! Dynatrace
 
Innovation dank DevOps (DevOpsCon Berlin 2015)
Innovation dank DevOps (DevOpsCon Berlin 2015)Innovation dank DevOps (DevOpsCon Berlin 2015)
Innovation dank DevOps (DevOpsCon Berlin 2015)Wooga
 
Performance Metrics for your Build Pipeline - presented at Vienna WebPerf Oct...
Performance Metrics for your Build Pipeline - presented at Vienna WebPerf Oct...Performance Metrics for your Build Pipeline - presented at Vienna WebPerf Oct...
Performance Metrics for your Build Pipeline - presented at Vienna WebPerf Oct...Andreas Grabner
 
CI/CD and Asset Serving for Single Page Apps
CI/CD and Asset Serving for Single Page AppsCI/CD and Asset Serving for Single Page Apps
CI/CD and Asset Serving for Single Page AppsMike North
 
DevOps: Find Solutions, Not More Defects
DevOps: Find Solutions, Not More DefectsDevOps: Find Solutions, Not More Defects
DevOps: Find Solutions, Not More DefectsTechWell
 
Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...Niels Frydenholm
 
Serverless in production, an experience report (FullStack 2018)
Serverless in production, an experience report (FullStack 2018)Serverless in production, an experience report (FullStack 2018)
Serverless in production, an experience report (FullStack 2018)Yan Cui
 
6 ways DevOps helped PrepSportswear move from monolith to microservices
6 ways DevOps helped PrepSportswear move from monolith to microservices6 ways DevOps helped PrepSportswear move from monolith to microservices
6 ways DevOps helped PrepSportswear move from monolith to microservicesDynatrace
 
Securing Rails
Securing RailsSecuring Rails
Securing RailsAlex Payne
 
Surviving Serverless Testing: The ultimate Guide
Surviving Serverless Testing: The ultimate GuideSurviving Serverless Testing: The ultimate Guide
Surviving Serverless Testing: The ultimate GuideOPEN KNOWLEDGE GmbH
 
Serverless in Production, an experience report (AWS UG South Wales)
Serverless in Production, an experience report (AWS UG South Wales)Serverless in Production, an experience report (AWS UG South Wales)
Serverless in Production, an experience report (AWS UG South Wales)Yan Cui
 
SOASTA Webinar: Process Compression For Mobile App Dev 120612
SOASTA Webinar: Process Compression For Mobile App Dev 120612SOASTA Webinar: Process Compression For Mobile App Dev 120612
SOASTA Webinar: Process Compression For Mobile App Dev 120612SOASTA
 
Serverless in production, an experience report
Serverless in production, an experience reportServerless in production, an experience report
Serverless in production, an experience reportYan Cui
 
Mainframe, the fast PHP framework
Mainframe, the fast PHP frameworkMainframe, the fast PHP framework
Mainframe, the fast PHP frameworkbibakis
 
Silverlight vs HTML5 - Lessons learned from the real world...
Silverlight vs HTML5 - Lessons learned from the real world...Silverlight vs HTML5 - Lessons learned from the real world...
Silverlight vs HTML5 - Lessons learned from the real world...Peter Gfader
 
Drupal Deployment
Drupal DeploymentDrupal Deployment
Drupal DeploymentJeff Eaton
 

Similar to MonoRails - GoGaRuCo 2012 (20)

Clearly, I Have Made Some Bad Decisions
Clearly, I Have Made Some Bad DecisionsClearly, I Have Made Some Bad Decisions
Clearly, I Have Made Some Bad Decisions
 
Apply best parts of microservices to serverless
Apply best parts of microservices to serverlessApply best parts of microservices to serverless
Apply best parts of microservices to serverless
 
Increasing velocity via serless semantics
Increasing velocity via serless semanticsIncreasing velocity via serless semantics
Increasing velocity via serless semantics
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on Rails
 
Metrics-Driven Devops: Delivering High Quality Software Faster!
Metrics-Driven Devops: Delivering High Quality Software Faster! Metrics-Driven Devops: Delivering High Quality Software Faster!
Metrics-Driven Devops: Delivering High Quality Software Faster!
 
Innovation dank DevOps (DevOpsCon Berlin 2015)
Innovation dank DevOps (DevOpsCon Berlin 2015)Innovation dank DevOps (DevOpsCon Berlin 2015)
Innovation dank DevOps (DevOpsCon Berlin 2015)
 
Performance Metrics for your Build Pipeline - presented at Vienna WebPerf Oct...
Performance Metrics for your Build Pipeline - presented at Vienna WebPerf Oct...Performance Metrics for your Build Pipeline - presented at Vienna WebPerf Oct...
Performance Metrics for your Build Pipeline - presented at Vienna WebPerf Oct...
 
CI/CD and Asset Serving for Single Page Apps
CI/CD and Asset Serving for Single Page AppsCI/CD and Asset Serving for Single Page Apps
CI/CD and Asset Serving for Single Page Apps
 
DevOps: Find Solutions, Not More Defects
DevOps: Find Solutions, Not More DefectsDevOps: Find Solutions, Not More Defects
DevOps: Find Solutions, Not More Defects
 
Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...
 
Serverless in production, an experience report (FullStack 2018)
Serverless in production, an experience report (FullStack 2018)Serverless in production, an experience report (FullStack 2018)
Serverless in production, an experience report (FullStack 2018)
 
6 ways DevOps helped PrepSportswear move from monolith to microservices
6 ways DevOps helped PrepSportswear move from monolith to microservices6 ways DevOps helped PrepSportswear move from monolith to microservices
6 ways DevOps helped PrepSportswear move from monolith to microservices
 
Securing Rails
Securing RailsSecuring Rails
Securing Rails
 
Surviving Serverless Testing: The ultimate Guide
Surviving Serverless Testing: The ultimate GuideSurviving Serverless Testing: The ultimate Guide
Surviving Serverless Testing: The ultimate Guide
 
Serverless in Production, an experience report (AWS UG South Wales)
Serverless in Production, an experience report (AWS UG South Wales)Serverless in Production, an experience report (AWS UG South Wales)
Serverless in Production, an experience report (AWS UG South Wales)
 
SOASTA Webinar: Process Compression For Mobile App Dev 120612
SOASTA Webinar: Process Compression For Mobile App Dev 120612SOASTA Webinar: Process Compression For Mobile App Dev 120612
SOASTA Webinar: Process Compression For Mobile App Dev 120612
 
Serverless in production, an experience report
Serverless in production, an experience reportServerless in production, an experience report
Serverless in production, an experience report
 
Mainframe, the fast PHP framework
Mainframe, the fast PHP frameworkMainframe, the fast PHP framework
Mainframe, the fast PHP framework
 
Silverlight vs HTML5 - Lessons learned from the real world...
Silverlight vs HTML5 - Lessons learned from the real world...Silverlight vs HTML5 - Lessons learned from the real world...
Silverlight vs HTML5 - Lessons learned from the real world...
 
Drupal Deployment
Drupal DeploymentDrupal Deployment
Drupal Deployment
 

Recently uploaded

costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
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
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
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
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 

Recently uploaded (20)

costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
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
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
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...
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 

MonoRails - GoGaRuCo 2012

Editor's Notes

  1. {Intro}\nDid anybody go to the Square party? Yeah.\nI feel very lucky to work at Square. I feel surrounded by kind geniuses. If that sounds interesting to you we need people who can work with hardware, Android, iOS, Ruby, Java, Networking, Machine Learning, and anything else computer-related. Please come interview with us - we make the interview fun.\n\n
  2. Okay, assuming you&amp;#x2019;ve got a Rails app: let&amp;#x2019;s fast forward 3 years from now.\nYou&amp;#x2019;ve done well, you&amp;#x2019;ve got lots of customers and you&amp;#x2019;re up to 20 developers working full-time. Awesome. You&amp;#x2019;re set.\n[*]\nYou now maintain a Rails application running in two datacenters [*] backed by one giant $15K MySQL box in each. [*] It&apos;s got 1,000 controllers and models. [*] It&apos;s covered by tests but you&apos;re not sure how well covered because running RCov would take 7 years. Or SEGFAULT. [*] Your 22 developers complain constantly that it&apos;s the worst thing about their job, that they aren&apos;t sure they like &quot;working at big companies&quot; and they&apos;re threatening to leave. [*] Your tests take so long that deploying even small fixes is hazardous and slow. Everybody wants to work on something new and fancy but they&apos;re stuck debugging &quot;The Rails App.&quot;\n\n\n\n\n
  3. Okay, assuming you&amp;#x2019;ve got a Rails app: let&amp;#x2019;s fast forward 3 years from now.\nYou&amp;#x2019;ve done well, you&amp;#x2019;ve got lots of customers and you&amp;#x2019;re up to 20 developers working full-time. Awesome. You&amp;#x2019;re set.\n[*]\nYou now maintain a Rails application running in two datacenters [*] backed by one giant $15K MySQL box in each. [*] It&apos;s got 1,000 controllers and models. [*] It&apos;s covered by tests but you&apos;re not sure how well covered because running RCov would take 7 years. Or SEGFAULT. [*] Your 22 developers complain constantly that it&apos;s the worst thing about their job, that they aren&apos;t sure they like &quot;working at big companies&quot; and they&apos;re threatening to leave. [*] Your tests take so long that deploying even small fixes is hazardous and slow. Everybody wants to work on something new and fancy but they&apos;re stuck debugging &quot;The Rails App.&quot;\n\n\n\n\n
  4. Okay, assuming you&amp;#x2019;ve got a Rails app: let&amp;#x2019;s fast forward 3 years from now.\nYou&amp;#x2019;ve done well, you&amp;#x2019;ve got lots of customers and you&amp;#x2019;re up to 20 developers working full-time. Awesome. You&amp;#x2019;re set.\n[*]\nYou now maintain a Rails application running in two datacenters [*] backed by one giant $15K MySQL box in each. [*] It&apos;s got 1,000 controllers and models. [*] It&apos;s covered by tests but you&apos;re not sure how well covered because running RCov would take 7 years. Or SEGFAULT. [*] Your 22 developers complain constantly that it&apos;s the worst thing about their job, that they aren&apos;t sure they like &quot;working at big companies&quot; and they&apos;re threatening to leave. [*] Your tests take so long that deploying even small fixes is hazardous and slow. Everybody wants to work on something new and fancy but they&apos;re stuck debugging &quot;The Rails App.&quot;\n\n\n\n\n
  5. Okay, assuming you&amp;#x2019;ve got a Rails app: let&amp;#x2019;s fast forward 3 years from now.\nYou&amp;#x2019;ve done well, you&amp;#x2019;ve got lots of customers and you&amp;#x2019;re up to 20 developers working full-time. Awesome. You&amp;#x2019;re set.\n[*]\nYou now maintain a Rails application running in two datacenters [*] backed by one giant $15K MySQL box in each. [*] It&apos;s got 1,000 controllers and models. [*] It&apos;s covered by tests but you&apos;re not sure how well covered because running RCov would take 7 years. Or SEGFAULT. [*] Your 22 developers complain constantly that it&apos;s the worst thing about their job, that they aren&apos;t sure they like &quot;working at big companies&quot; and they&apos;re threatening to leave. [*] Your tests take so long that deploying even small fixes is hazardous and slow. Everybody wants to work on something new and fancy but they&apos;re stuck debugging &quot;The Rails App.&quot;\n\n\n\n\n
  6. Okay, assuming you&amp;#x2019;ve got a Rails app: let&amp;#x2019;s fast forward 3 years from now.\nYou&amp;#x2019;ve done well, you&amp;#x2019;ve got lots of customers and you&amp;#x2019;re up to 20 developers working full-time. Awesome. You&amp;#x2019;re set.\n[*]\nYou now maintain a Rails application running in two datacenters [*] backed by one giant $15K MySQL box in each. [*] It&apos;s got 1,000 controllers and models. [*] It&apos;s covered by tests but you&apos;re not sure how well covered because running RCov would take 7 years. Or SEGFAULT. [*] Your 22 developers complain constantly that it&apos;s the worst thing about their job, that they aren&apos;t sure they like &quot;working at big companies&quot; and they&apos;re threatening to leave. [*] Your tests take so long that deploying even small fixes is hazardous and slow. Everybody wants to work on something new and fancy but they&apos;re stuck debugging &quot;The Rails App.&quot;\n\n\n\n\n
  7. Okay, assuming you&amp;#x2019;ve got a Rails app: let&amp;#x2019;s fast forward 3 years from now.\nYou&amp;#x2019;ve done well, you&amp;#x2019;ve got lots of customers and you&amp;#x2019;re up to 20 developers working full-time. Awesome. You&amp;#x2019;re set.\n[*]\nYou now maintain a Rails application running in two datacenters [*] backed by one giant $15K MySQL box in each. [*] It&apos;s got 1,000 controllers and models. [*] It&apos;s covered by tests but you&apos;re not sure how well covered because running RCov would take 7 years. Or SEGFAULT. [*] Your 22 developers complain constantly that it&apos;s the worst thing about their job, that they aren&apos;t sure they like &quot;working at big companies&quot; and they&apos;re threatening to leave. [*] Your tests take so long that deploying even small fixes is hazardous and slow. Everybody wants to work on something new and fancy but they&apos;re stuck debugging &quot;The Rails App.&quot;\n\n\n\n\n
  8. {step away. Transition. Pause}\n
  9. {step away. Transition. Pause}\n
  10. If you doubt that this can happen, ask folks at Square. Or Twitter. Or Groupon, LivingSocial, ModCloth, Yellowpages, etc.\nThey&apos;ve all survived a point at which their Rails app became a terrible burden to their development process. And, from what I&amp;#x2019;ve heard, the problem appeared in roughly the same form each time.\n
  11. If you doubt that this can happen, ask folks at Square. Or Twitter. Or Groupon, LivingSocial, ModCloth, Yellowpages, etc.\nThey&apos;ve all survived a point at which their Rails app became a terrible burden to their development process. And, from what I&amp;#x2019;ve heard, the problem appeared in roughly the same form each time.\n
  12. If you doubt that this can happen, ask folks at Square. Or Twitter. Or Groupon, LivingSocial, ModCloth, Yellowpages, etc.\nThey&apos;ve all survived a point at which their Rails app became a terrible burden to their development process. And, from what I&amp;#x2019;ve heard, the problem appeared in roughly the same form each time.\n
  13. If you doubt that this can happen, ask folks at Square. Or Twitter. Or Groupon, LivingSocial, ModCloth, Yellowpages, etc.\nThey&apos;ve all survived a point at which their Rails app became a terrible burden to their development process. And, from what I&amp;#x2019;ve heard, the problem appeared in roughly the same form each time.\n
  14. If you doubt that this can happen, ask folks at Square. Or Twitter. Or Groupon, LivingSocial, ModCloth, Yellowpages, etc.\nThey&apos;ve all survived a point at which their Rails app became a terrible burden to their development process. And, from what I&amp;#x2019;ve heard, the problem appeared in roughly the same form each time.\n
  15. If you doubt that this can happen, ask folks at Square. Or Twitter. Or Groupon, LivingSocial, ModCloth, Yellowpages, etc.\nThey&apos;ve all survived a point at which their Rails app became a terrible burden to their development process. And, from what I&amp;#x2019;ve heard, the problem appeared in roughly the same form each time.\n
  16. Sidebar: this is not a &quot;Rails can&apos;t scale&quot; talk. &quot;Can Rails scale&quot; isn&apos;t&apos; even a valid question.\n&amp;#x201C;Moar dynos please&amp;#x201D;. Done. You&amp;#x2019;ve just scaled.\n\n\n
  17. Sidebar: this is not a &quot;Rails can&apos;t scale&quot; talk. &quot;Can Rails scale&quot; isn&apos;t&apos; even a valid question.\n&amp;#x201C;Moar dynos please&amp;#x201D;. Done. You&amp;#x2019;ve just scaled.\n\n\n
  18. There are 4 kinds of scaling that are hard. None of these have anything to do with Rails. Data is a solved problem, it&amp;#x2019;s just hard to implement. Git solves the codebase problem. Scaling your customers is primarily a communications (and logging) problem, and Rails is actually pretty good at helping you scale your features. In fact, that&amp;#x2019;s part of the problem.\n\n
  19. This \n\n
  20. {pause. Transition}\nSo, what IS going wrong with so many of these Rails applications that get giant and are the source of so much pain?\nTo answer that, let&apos;s go back to day 1 of the project.\n
  21. In the beginning you had just 1 product and it was implemented by just 1 application. Maybe even just one developer.\n
  22. In the beginning you had just 1 product and it was implemented by just 1 application. Maybe even just one developer.\n
  23. In the beginning you had just 1 product and it was implemented by just 1 application. Maybe even just one developer.\n
  24. You need an admin interface? Awesome. Just build a new &apos;/admin&apos; set of controllers that only certain users can access and query your data in interesting ways.\n[*]\nThe data is always right there, available through ActiveRecord.\n\n
  25. You need an admin interface? Awesome. Just build a new &apos;/admin&apos; set of controllers that only certain users can access and query your data in interesting ways.\n[*]\nThe data is always right there, available through ActiveRecord.\n\n
  26. Need to send another kind of email? You&apos;ve got an observer on User that triggers an ActionMailer method. Perfect.\n\n
  27. Do users have twitter accounts? Phone numbers? Email addresses? Just add them to the User model.\n\n
  28. All of the common code patterns invented while building the app get extracted into ./lib\n[*]\nand, if you work at a unusual company, the tests are in ./spec/lib.\n
  29. This works GREAT. For about 10,000 users and 10 developers. After that, none of the above is a good idea.\n\n
  30. Rails is tuned to be a rapid prototyping system. \n[*]\nYou can still build something massive out of it, but you have to ignore the defaults because all of Rails&apos; defaults are optimized for the initial application-creation experience.\n
  31. In the beginning you had just 1 product and it was implemented by just 1 application. Maybe even just one developer.\n[*]\nYou need to put new tables into the same database (and database type) because you&apos;ll need to do joins across tables, right?\nJoins are great for offline and ad-hoc processing but they&apos;re actually pretty bad for many HTTP-backed operations. If you notice how Rails does eager loading it selects rows from one table, saves those ids, and then selects rows from another table.\n[*]\nIf you&apos;re already performing these two distinct table queries there&apos;s no reason why the second query can&apos;t happen in another database or another datastore entirely.There&apos;s nothing stopping us from finding a bunch of user ids in our transactional database and then loading their locations, sorted by distance from, say, Riak.\nAs Xavier Shay has been teaching me: Build a software interface to access your data, don&amp;#x2019;t depend on your data living in any specific place.\n\n
  32. In the beginning you had just 1 product and it was implemented by just 1 application. Maybe even just one developer.\n[*]\nYou need to put new tables into the same database (and database type) because you&apos;ll need to do joins across tables, right?\nJoins are great for offline and ad-hoc processing but they&apos;re actually pretty bad for many HTTP-backed operations. If you notice how Rails does eager loading it selects rows from one table, saves those ids, and then selects rows from another table.\n[*]\nIf you&apos;re already performing these two distinct table queries there&apos;s no reason why the second query can&apos;t happen in another database or another datastore entirely.There&apos;s nothing stopping us from finding a bunch of user ids in our transactional database and then loading their locations, sorted by distance from, say, Riak.\nAs Xavier Shay has been teaching me: Build a software interface to access your data, don&amp;#x2019;t depend on your data living in any specific place.\n\n
  33. Don&apos;t pick MySQL. There are lots of great features in Postgres but you don&apos;t need them, what you DO need is O(1) table alterations for most kinds of &apos;ALTER TABLE&apos; commands.\nWhat that means is that if you have 10 records, MySQL and Postgres are the same. If you have a billion records, MySQL might take 1 hour and Postgres might take half a second.\nMySQL is officially deprecated at Square.\n{anec: Nolan extending the length of a VARCHAR on a billion rows}\n
  34. Any guesses what you should replace ActionMailer with?\n[*]\nYou just want to send a hash of data to something that can put it into a specific template and deliver it to a given email address. That&apos;s no reason in the world that that should happen inside your quickly-bloating Rails app. We should be just POSTing JSON to something that can format, record, and deliver emails.\nThe 400-line redundant singleton mailer class is an eyesore and the views are not web views anyway so they should live in a separate app that caters to that nasty subset of html that can be rendered in an email client.\n
  35. [*]\nThe `users` table should have an id, a bcrypted password or whateveris required for authentication. Nothing that isn&apos;t authentication-related should be allowed in this table. It&amp;#x2019;s the easiest - and the worst - place to put new features.\n{anec: string:status -&gt; datetime:updated-at\n\n
  36. Any generic code should be extracted to an internal gem. \n[*]\nIf it doesn&apos;t change then it shouldn&apos;t be part of your app&apos;s code and test suite. This&apos;ll speed up your tests, slim down your project size and force you to develop a good interface for this piece of code you&apos;ve written.\n\n
  37. These are good enough at the start and they&apos;re helpful for error messages.\n[*]\nbut you&apos;re going to eventually get corrupt data if you don&apos;t have db validations. This will make you sad.\n\n
  38. It&apos;s not enough. You need to be able to explain to a customer (or at least to yourself) why anything happened in the system.\n[*]\nIf you aren&apos;t keeping old versions of your data around then you need to manually add logging around all interesting events.\n{anec: you&amp;#x2019;ve probably got 2-3 half-finished state machines in your app, give them some logging}\n
  39. Rails makes it so easy to add an analytics section to your project but it&apos;s such a bad idea. The code is easy to write but your data is in the wrong shape. \n[*]\nSo get a second database and ETL your data over there every day. Once you have more people this analytics component will be a full-time job for somebody and they should have free-reign to write code without cluttering up your primary production app and db.{anecdote about CMD+R}\n\n\n
  40. So the &quot;blog-in-15-minutes&quot; parts of Rails might have lured you into picking a few patterns that start making less sense as you grow.But you&amp;#x2019;re going to have time, eventually to clean things up before they get too bad, right?\nActually, no. The pain will come very suddenly. Sometime between 8 and 30 developers. It&apos;ll be the moment you split your one team into multiple teams.\n
  41. An application&apos;s structure mimics the organizational structure that produced it; it has to. That&apos;s the only way we can make sense of the system we&apos;re building.\n{pause}\nQuality work comes from a feeling of ownership. And if your work is fused inappropriately with somebody else&apos;s then you can&apos;t tell whether you&apos;ve done a great job. You can&apos;t feel the pride of being a professional because somebody else has hacked some marketing feature into your analytics data. Or hacked some analytics system into your marketing code.\n{pause}\n\nSo the moment you switch from a single team to multiple smaller teams the codebase needs to switch, too.\n\n
  42. An application&apos;s structure mimics the organizational structure that produced it; it has to. That&apos;s the only way we can make sense of the system we&apos;re building.\n{pause}\nQuality work comes from a feeling of ownership. And if your work is fused inappropriately with somebody else&apos;s then you can&apos;t tell whether you&apos;ve done a great job. You can&apos;t feel the pride of being a professional because somebody else has hacked some marketing feature into your analytics data. Or hacked some analytics system into your marketing code.\n{pause}\n\nSo the moment you switch from a single team to multiple smaller teams the codebase needs to switch, too.\n\n
  43. [*]\nIt&apos;s something Rails can do (better than most frameworks), but it&apos;s not easy.\n
  44. I&amp;#x2019;ve been hearing a term for these monolithic Rails apps. It&apos;s &quot;MonoRail&quot;.\n\nTo close my talk, and this conference, I&apos;d like to give you the best advice I&apos;ve gathered from engineers at Square and other companies who&apos;ve dealt with a MonoRail. My hope is that you, too reach that inflection point where you split into teams and when you hit it you won&apos;t miss a beat.\n
  45. The best thing you can do to successfully outgrow a monorail is to interact with different feature sets in your app through some kind of service interface. You pass a little info in, you get a little info back, and you don&apos;t touch the code or data on the other side of that wall except through the interface.\nAn example is sending email. Rather than &apos;ApplicationMailer.deliver_something&apos; you should be writing &apos;Email.to &quot;some@email.com&quot;, &quot;welcome&quot;, {:show_greeting =&gt; true}&apos;\n\n
  46. Whatever happens on the other side of that, whether it&apos;s rendered with ActiveMailer or goes over the wire to some API is no longer your concern.\nOne day, when you split into teams, you can hand everything under that interface to somebody and the lines between &quot;our code&quot; and &quot;their code&quot; is crystal clear.\n
  47. Start with Postgres but get comfortable with other dbs. Add \nRedis, Solr, and some kind of distributed key-value (Riak, etc.) store to your project and start using those systems for appropriate data.\n
  48. Start with Postgres but get comfortable with other dbs. Add \nRedis, Solr, and some kind of distributed key-value (Riak, etc.) store to your project and start using those systems for appropriate data.\n
  49. Start with Postgres but get comfortable with other dbs. Add \nRedis, Solr, and some kind of distributed key-value (Riak, etc.) store to your project and start using those systems for appropriate data.\n
  50. Start with Postgres but get comfortable with other dbs. Add \nRedis, Solr, and some kind of distributed key-value (Riak, etc.) store to your project and start using those systems for appropriate data.\n
  51. Start with Postgres but get comfortable with other dbs. Add \nRedis, Solr, and some kind of distributed key-value (Riak, etc.) store to your project and start using those systems for appropriate data.\n
  52. It becomes hard, after a while, to add new hotness to your product and the thrill is muted. Developers leave big companies because it stops being fun. Or they move to management earlier than they would have.\nAnd this makes perfect sense because you shouldn&apos;t spend your finite days here on Earth debugging spaghetti code, explaining your complex system to customers, waiting for a build, or trying in vain to read a hundred thousand lines of a user.rb.\nYou should be spending your days joyfully making new things that delight you and delight the people who pay you. Every day you should walk in to work knowing that you&apos;re building the future and not having to maintain the past while your competitors pass you by.\n\n
  53. My name is Jack Danger, I work on the server team at Square, and I thank you for your time.\nAny questions?\n\n\n
  54. http://www.flickr.com/photos/ssoosay/7070367799/\n\n