SlideShare a Scribd company logo
Large-scale web service
           and operations
             with Ruby

2011   7   19
2011   7   19
I and
                RubyKaigi
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
Large-scale web service
         and operations with
                Ruby
2011   7   19
Large-scale web service
         and operations with
                Ruby
2011   7   19
Large-scale web service
         and operations with
                Ruby
2011   7   19
Large-scale web service
         and operations with
                Ruby
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
Bringing smiles to everyone by
           making every day cooking more
                     enjoyable.


2011   7   19
What is
                COOKPAD?

2011   7   19
2011   7   19
12,300,000 UU (pc only)
                1+ million Recipes
           Used by 1 in 2 women
                in their 30s
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
Architecture based on best practices




2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
http://d3921.image.cookpad.com/
            recipes/1237075/100x141c/
       0b9c3ad1cba65869058e17cf78988bcb.jpg



2011   7   19
http://d3921.image.cookpad.com/
          recipes/1237075/      100x141c
                                       /
       0b9c3ad1cba65869058e17cf78988bcb.jpg


2011   7   19
‘100’


                ‘100x100’


                ‘100x100c’


                ‘100x100c40_198_137_104_300’

2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
Easily customizable
                       search
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
Architecture based on best practices



2011   7   19
“Good enough” is not good enough.
                Always focus on what is best


2011   7   19
2011   7   19
•   Only add absolutely necessary features


                •   Avoid complexity




2011   7   19
•   Design for caching


                •   Avoid complex SQL queries




2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
Development



2011   7   19
2011   7   19
2011   7   19
Working with Rails within a large team



2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
Run specs remotely

2011   7   19
$	
  rake	
  cookpad:spec:remote
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
How did using a CI change our development flow?


                Only release successful CI builds

                Test coverage as a requirement



                Tests should be written so they can run on a CI




2011   7   19
2011   7   19
$	
  cap	
  production	
  deploy

                 Add a "deploy message" to every release

                 (ex: "Added feature x", "Fixed bug z" etc)

                 Skype notification

                 Mail sent to developer and support mailing lists

2011   7   19
2011   7   19
2011   7   19
2011   7   19
It is nearly impossible to reduce number of exceptions to 0


                Looking for spikes in number of exceptions is key


2011   7   19
2011   7   19
2011   7   19
2011   7   19
Expands upon Rails functionality

                 Selective release of new features

                  (ex: “Show feature X only to users A, B, C)

                Used for prototyping

                Specs not required

       If an exception occurs in an extension, it is turned off automatically

2011   7   19
2011   7   19
2011   7   19
new features


                stats for staff
2011   7   19
2011   7   19
How do we handle prototypes
                  we decide not to release?

2011   7   19
$	
  rm	
  app/extensions/
                  foobar_ext



2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
2011   7   19
Thank You

2011   7   19
2011   7   19

More Related Content

Ruby を利用した大規模ウェブサービスの開発・運用