SlideShare ist ein Scribd-Unternehmen logo
1 von 114
Living without
your Linemen
             OSCON

 Portland, OR: June 27, 2011, 5pm
Not about
Automattic
I’m not in Systems and Operations

Automattic doesn’t work this way
Me = Typical Engineer

• Mercurial/
   Tempermental

• Lack of Attention to
   Detail

• Can’t multitask
Me = Least Qualified
to be Lecturing You
   Typical Engineer except in one way
Who am I?
Who am I?
Me (and others) on a deck of
           cards
PHP
Terrorist
Have a nice Chay!
“…when I created the
      Web”



          — (not) A l Gore
Cha yism
  http://phpdoc.info/chayism
                            /
                                 One ounce of Terry
                                Chay contains seven
                                 pounds of awesome
Chayism
  http://phpdoc.info/chayism
                               /
Terry Chay does not
   walk, or run, or     Chayism
  drive, or take an
                          http://phpdoc.info/chayism
 airplane to a place.                                  /

  He simply uses a
Keynote transition.
1500 Lines Of
   Code
  PHP Advent 2009




           http://phpadvent.org/2009/
                                      1500-lines-of-
                      code-by-terry-chay
John Henry of
     C++
1500 Lines of
   Code/Day
    (max)
        “Except Java”



Java: It only takes three years
 to put in a hard days work!
Outliers
        Malcolm Gladwell



   10,000 Hours of Diligent
          Practice
http://www.amazon.com/g
                        p/product/
  0316017922?tag=terrych
                          ay-20
Talent is
      Overrated
           Geoff Colvin



10,000 Hours = 20/week week
  * every week * 10 years!
http://www.amazon.com/g
                        p/product/
  0316017922?tag=terrych
                          ay-20
1500 lines of code



Half a Million Line codebase = Peak Day, Every Day, 1
Year
Terry Chay doesn't
 write code, he just    Chayism
   thinks it, and
minions do it for him     http://phpdoc.info/chayism
                                                       /
Part 1
 Why: Three
Observations
1. SiteOps are your
   offensive line
   http://terrychay.com/artic
                              le/special-
    sysadmin-appreciation-day.
                                 shtml
Quarterback
  Site Architect
Running Back
   Programmer
Wide Receiver
   Programmer
Offensive Line
  System Operations
Keep Your
Line Happy
   Last Friday in July


http://www.sysadminday.co
                            m/
2. Story of (Ruby on)
        Rails
“The Hottest Hacker on
      the Earth.”


             — WIRED
                 Wired 14.04 page 3
“Fuck You.”


               nemeier Hansson
   —D avid Hei
                    David 3:16
“fuckity fuck fucking
     fuck fuck.”



      —E XPLICIT TAG
                    #TCFC +=5
“coding these web apps
themselves involves a lot
   of swearing—a lot of
blood, sweat and swear.”

               —Me
                 http://shiflett.org/blog/2006
                                              /
                  aug/blood-sweat-and-swea
                                            r-
                terry-chay-on-pro-php-podc
                                            ast
“Fuck You.”


               nemeier Hansson
   —D avid Hei
                    David 3:16
“I can’t run Rails in
mod_ruby on Apache on
    a shared host”

                 h o has ev er tried
       —A nyone w

                      http://blog.dreamhost.com
                                                /
                    2008/01/07/how-ruby-on-r
                                              ails-
                        could-be-much-better/
“Fuck You.”


               nemeier Hansson
   —D avid Hei
                    David 3:16
“Read/Writes as websites
  grow don’t scale evenly with
    Moore’s Law, so a bigger
    machine isn’t solving my
     database problems.”


        e who h  as built
—Anyon
                            http://terrychay.com/artic
               th real
                                                      le/

       bsite wi
                             sharting-on-sharding.shtm
                                                       l
  a we           growth
 (hock ey stick)
“Fuck You.”


               nemeier Hansson
   —D avid Hei
                    David 3:16
“Fuck Comcast.”



              —Me
          Every time the intertubes
                                      get tied
The Internet doesn't
  go down, Terry       Chayism
 Chay's laptop just
goes into sleep mode     http://phpdoc.info/chayism
                                                      /
“Fucking AT&T.”



                        —Me
      Every time I use my cell ph
                                 one in San Francisco
“Fuck Steve Jobs.
   *blargh!*”


         —Me
               My upgrade to Lion
The real reason
there's no spyware     Chayism
for MacOS is that
it's afraid of Terry     http://phpdoc.info/chayism
                                                      /
        Chay
“$haystack, $needle or
 $needle, $haystack? I
  fucking hate PHP!”


           —Me
               In UR Website, c0ding UR sh
                                          it
Terry Chay beat the
Internet... with only   Chayism
    one quarter           http://phpdoc.info/chayism
                                                       /
Rock and Hard Place   Scylla and Charybdis
“80% of the effects come
from 20% of the causes”


               — Pareto
                http://en.wikipedia.org/wik
                                            i/
                       Pareto_principle
“Ruby is really good at what it
 does. The problem is that for
  what Ruby [on Rails] does
  really well, I can download
Matt Mullenweg’s WordPress”

                —Me
                    http://terrychay.com/artic
                                               le/is-ruby-
                     the-dog-and-php-the-dogfoo
                                                 d.shtml
Rails FAILs?

1. (Software
   Architectural)
   Frameworks FAIL

2. Ruby on Rails is a
   (software
   archiitectural)
   framework.

3. Ergo…
Innovator’s
     Dilemma
    Clayton M. Christensen



    Disruptive Technologies

http://www.amazon.com/g
                        p/product/
  0060521996?tag=terrych
                          ay-20
“[Disruptive Technologies] offered
      less of what customers in
established markets wanted and so
  could rarely be initially employed
    there. They offered a different
package of attributes valued only in
emerging markets remote from, and
 unimportant to, the mainstream.”


         Chris tianson
—Clayton                   Innovator’s Dilemma
“[Disruptive Technologies] suck.”




            —(s horter)
                Christi anson
       C layton
                         Innovator’s Dilemma
“The S3 data storage that
  Amazon and SmugMug
showed is impressive, but
  the EC2 cloud stuff was
   the most interesting,
 because it is disruptive.”

                  sting Thing @
       ost Intere
 —The M               ZendCon Fall 2006
iPod 2002     iPod Shuffle 2005   iPhone 2007
(Hard Drive)    (first flash RAM)     (“today”)
Shared Hosting
Managed Hosting   AWS
   Colocation
“Rails: It succeeds because it sucks.”




                    est imatin g Rails
        —M e, Mis
                                   Capistrano,
                          CruisceControl.rb, GitHub,
                                                      a
                          gajillion admin consoles fo
                                                     r
                                      AWS
CruiseControl.rb   Continuous integration
Capistrano   Automated deployment
Vagrant   Automated virtualization
Puppet   Automated configuration
GitHub   Repo as a Service
Heroku   Managed RAILS cloud
3. Story of PHP
PHP’s S3


• Simplicity
• Scalability
• Straighforwardness
“A project done in Java will
 cost 5 times as much, take
twice as long, and be harder
 to maintain than a project
done in a scripting language
    such as PHP or Perl.”


                    ip Gree nspun
             —Phill http://blogs.law.harvard.e
                                               du/
                         philg/2003/09/20/
“That a Java servlet performs better
   than a PHP script, under optimal
  conditions [has] nothing to do with
   scalability. The point is can your
    application continue to deliver
  consistent performance as volume
increases. PHP delegates all the ‘hard
       stuff’ to other systems.”



                        H arry F uecks
                    —
                          http://blogs.sitepoint.com/t
                                                       he-
                          j2ee-guy-still-doesnt-get-php
                                                        /
“PHP is not about purity in CS
 principles or architecture; it is about
 solving the ugly web problem with an
    admittedly ugly, but extremely
 functional and convenient solution. If
 you are looking for purity, you are in
the wrong boat. Get out now before you
          get hit by a wet cat!”



                        Ras mus Lerdorf
                    —
                          http://news.php.net/article.
                                                       php?
                         group=php.internals&articl
                                                    e=2715
“PHP: It succeeds because it sucks.”



                       —Me
                          Simplicity + Scalability +
                          Straightforward = Suck =
                                  Success!
Rock and Hard
    Place
Your drinking habits make me
  very, very worried for the
        future of PHP
AJAX
  Rich sites do the UI in
   Javascript and the
communication via JSON
Speed
      Memcached

Before: PHP waits for dB

Now: Performance and
      Profiling
Terry Chay doesn't
 profile his code, he   Chayism
just commands it to
     run better.         http://phpdoc.info/chayism
                                                      /
Terry Chay's
semicolons make     Chayism
that line of code
  74% faster          http://phpdoc.info/chayism
                                                   /
HipHop
Converts PHP to C++
Part 2
  What: Three
Infrastructures
1. Your Infrastructure
   on a Shared Host
Lesson: Do More with Less
2. Infrastructure as a
      Computer
“The datacenter is the
      new box.”


             son Ho ffman,
        — Ja
              Joyent
                   http://pro.gigaom.com/
                 2010/11/the-data-center-is
                                            -
                 the-new-box-are-you-ready
                                           /
3. Infrastructure as a
        Service
Traditional                  Cloud
Predict and purchase            Elastic
Shared->Colocation        Economies of Scale
   Pay for server            Pay as you go
     Capitalize         No up-front investment
     Fixed Cost                Variable
      CAPEX                      OPEX
discreet allocations     fine-grained allocation
 disassociated costs        associated costs
   staging, RAAD       experimentation is cheap9
Facebook Open
   Compute
    Project


    http://www.facebook.com/n
                               otes/
facebook-engineering/build
                           ing-efficient-
 data-centers-with-the-open
                            -compute-
Open-source Data
 Center Design
      Commodity Hardware

    Power and cost efficiencies
“It’s usually in a
business’ best interests
  to commoditize its
    complements.”


           M arco A rment
          —
              http://www.marco.org/201
                                       1/04/09/
                facebooks-open-compute-p
                                         roject
“Whenever iPhone
 succeeds, Google
    succeeds.”

         aniel A legre,
     —D               -Pacific
       f Goog le Asia
 Head o
              http://www.adnews.com.au/
                                         news/
               google-we-want-iphone-to-gr
                                           ow
Infrastructure as
  a Commodity
    http://www.readwriteweb.c
                              om/cloud/2011/04/
        what-facebooks-opencompu
                                 te-mea.php
Part 3
How: Three Levels of
   Application
1. Infrastructure as a
        Service
Slicehost
Start your own shit

• database, Memcache, load balancing
• svn/git/GitHub
• trac, stats, (and other internal tools)
• deployment solution like Capistrano (Ruby)
Gentoo is for Ricers
Amazon Web Services
AWS Free
                               http://aws.amazon.com/fre
                                                        e/

• 750 hours of Amazon EC2 Linux Micro Instance usage
   (613 MB of memory and 32-bit and 64-bit platform
   support) – enough hours to run continuously each
   month*

• 750 hours of an Elastic Load Balancer plus 15 GB data
   processing*

• 10 GB of Amazon Elastic Block Storage, plus 1 million
   I/Os, 1 GB of snapshot storage, 10,000 snapshot Get
   Requests and 1,000 snapshot Put Requests*
Three Tiers
             EC2, S3, Database (RDS,
   Base
                   SimpleDB…)

              CloudFront, Route 53,
 Services        SQS, SMS, FPS,
                Mechanical Turk
             Managment Console, Elastic
Management       Beanstalk, Toolkit for
             Eclipse,Virtual Private Cloud
“Basically [AWS] is
  programmable
  infrastructure”

            f Barr,  Senior
       —Jef
        Eva  ngelis t AWS
            http://www.amazon.com/g
                                    p/product/
              0980576830?tag=terrych
                                      ay-20
“Why Amazon's cloud
 Titanic went down.”



          —CNN
             http://money.cnn.com/201
                                      1/04/22/
           technology/amazon_ec2_c
                                   loud_outage/?
2. Platform as a Service
dotCloud
http://www.dotcloud.com/
Orchestra.io
   http://orchestra.io/
ZippyKid
 http://zippykid.com/
Value adds
• Language specification
• Framework specialization/optimization
• Application specialization
• (ex. Expose tools for optimization, deployment,
   continuous testing, etc.)

• (ex. NginX + PHP-FPS (fastcgi) over Apache)
• (ex. HipHop compile and optimization for
3. Start Here -> Finish
     Somewhere
Programmer as
  Operations;
 Operations as
 Programmer
   (DevOps)
     http://en.wikipedia.org/wik
                                i/DevOps
Start(up) yourself
yism
  Security is low
 priority for Terry
  Chay because he      Cha
knows the internet's     http://phpdoc.info/chayism
                                                      /
 got his back[ups]
PHP was never
  about PHP
Without PHP, LAMP would just be LAM(e).
Battle
   Wounds

http://terrychay.com/artic
                           le/
    cuts-and-scars.shtml
Cha yism
         http://phpdoc.info/chayism
                                   /




 When Terry Chay
 throws $10k into
 the air, he doesn't
bother picking it up
Haiping
is smarter than you.
Tales of Virality
            Terry Chay
     OSCON (Business Track)
August 28, 2011, 5PM (Room E146)
Terry Chay doesn't
  get stage fright.
     Stages get
frightened of Terry
        Chay.
Terry Chay doesn't
                                           get stage fright.
@tychay                  http://              Stages get
                    terrychay.com/
                                         frightened of Terry
                    “I promise to blog           Chay.
   tychay@php.net         more.”
Contact Me
                                          Terry Chay doesn't
                                           get stage fright.
@tychay                  http://              Stages get
                    terrychay.com/
                                         frightened of Terry
                    “I promise to blog           Chay.
   tychay@php.net         more.”
Contact Me
                                                   Terry Chay doesn't
                                                    get stage fright.
   @tychay                   http://                   Stages get
                        terrychay.com/
                                                  frightened of Terry
                        “I promise to blog                Chay.
       tychay@php.net         more.”




  http://www.oscon.com/                       Leave a
oscon2011/public/schedule/                   comment!

       detail/18893
Contact Me
                                                    Terry Chay doesn't
                                                     get stage fright.
     @tychay                  http://                   Stages get
                         terrychay.com/
                                                   frightened of Terry
                         “I promise to blog                Chay.
        tychay@php.net         more.”




   http://www.oscon.com/                       Leave a
 oscon2011/public/schedule/                   comment!

        detail/18893

                                                   Slides from
http://www.slideshare.net/tychay                     this talk
                                                   posted soon!

Weitere ähnliche Inhalte

Ähnlich wie PHP talks to Memcached

2019-03 PHP without PHP Architecture @ Confoo
2019-03 PHP without PHP Architecture @ Confoo2019-03 PHP without PHP Architecture @ Confoo
2019-03 PHP without PHP Architecture @ Confooterry chay
 
SD, a P2P bug tracking system
SD, a P2P bug tracking systemSD, a P2P bug tracking system
SD, a P2P bug tracking systemJesse Vincent
 
Sinatra: прошлое, будущее и настоящее
Sinatra: прошлое, будущее и настоящееSinatra: прошлое, будущее и настоящее
Sinatra: прошлое, будущее и настоящее.toster
 
Build the mobile web you want
Build the mobile web you wantBuild the mobile web you want
Build the mobile web you wantk88hudson
 
DiUS Computing Lca Rails Final
DiUS  Computing Lca Rails FinalDiUS  Computing Lca Rails Final
DiUS Computing Lca Rails FinalRobert Postill
 
IronRuby for the Rubyist
IronRuby for the RubyistIronRuby for the Rubyist
IronRuby for the RubyistWill Green
 
Search Engine Spiders
Search Engine SpidersSearch Engine Spiders
Search Engine SpidersCJ Jenkins
 
Breaking The Cross Domain Barrier
Breaking The Cross Domain BarrierBreaking The Cross Domain Barrier
Breaking The Cross Domain BarrierAlex Sexton
 
Rust: Systems Programming for Everyone
Rust: Systems Programming for EveryoneRust: Systems Programming for Everyone
Rust: Systems Programming for EveryoneC4Media
 
Node Security: The Good, Bad & Ugly
Node Security: The Good, Bad & UglyNode Security: The Good, Bad & Ugly
Node Security: The Good, Bad & UglyBishan Singh
 
Rust: Reach Further (from QCon Sao Paolo 2018)
Rust: Reach Further (from QCon Sao Paolo 2018)Rust: Reach Further (from QCon Sao Paolo 2018)
Rust: Reach Further (from QCon Sao Paolo 2018)nikomatsakis
 
Web of Science: REST or SOAP?
Web of Science: REST or SOAP?Web of Science: REST or SOAP?
Web of Science: REST or SOAP?Duncan Hull
 
Browser Horror Stories
Browser Horror StoriesBrowser Horror Stories
Browser Horror StoriesEC-Council
 
Securing Rails
Securing RailsSecuring Rails
Securing RailsAlex Payne
 
Concept ofinternet web_f2010211
Concept ofinternet web_f2010211Concept ofinternet web_f2010211
Concept ofinternet web_f2010211Kh Ravy
 
Chinese Proverbs—PHP|tek
Chinese Proverbs—PHP|tekChinese Proverbs—PHP|tek
Chinese Proverbs—PHP|tekterry chay
 

Ähnlich wie PHP talks to Memcached (20)

2019-03 PHP without PHP Architecture @ Confoo
2019-03 PHP without PHP Architecture @ Confoo2019-03 PHP without PHP Architecture @ Confoo
2019-03 PHP without PHP Architecture @ Confoo
 
SD, a P2P bug tracking system
SD, a P2P bug tracking systemSD, a P2P bug tracking system
SD, a P2P bug tracking system
 
Sinatra: прошлое, будущее и настоящее
Sinatra: прошлое, будущее и настоящееSinatra: прошлое, будущее и настоящее
Sinatra: прошлое, будущее и настоящее
 
Build the mobile web you want
Build the mobile web you wantBuild the mobile web you want
Build the mobile web you want
 
DiUS Computing Lca Rails Final
DiUS  Computing Lca Rails FinalDiUS  Computing Lca Rails Final
DiUS Computing Lca Rails Final
 
IronRuby for the Rubyist
IronRuby for the RubyistIronRuby for the Rubyist
IronRuby for the Rubyist
 
Search Engine Spiders
Search Engine SpidersSearch Engine Spiders
Search Engine Spiders
 
Breaking The Cross Domain Barrier
Breaking The Cross Domain BarrierBreaking The Cross Domain Barrier
Breaking The Cross Domain Barrier
 
Rust: Systems Programming for Everyone
Rust: Systems Programming for EveryoneRust: Systems Programming for Everyone
Rust: Systems Programming for Everyone
 
Java script the-stack-revisited
Java script the-stack-revisitedJava script the-stack-revisited
Java script the-stack-revisited
 
When?
When?When?
When?
 
Node Security: The Good, Bad & Ugly
Node Security: The Good, Bad & UglyNode Security: The Good, Bad & Ugly
Node Security: The Good, Bad & Ugly
 
Rust: Reach Further (from QCon Sao Paolo 2018)
Rust: Reach Further (from QCon Sao Paolo 2018)Rust: Reach Further (from QCon Sao Paolo 2018)
Rust: Reach Further (from QCon Sao Paolo 2018)
 
Ivo jansch - the art of scalability
Ivo jansch - the art of scalabilityIvo jansch - the art of scalability
Ivo jansch - the art of scalability
 
Web of Science: REST or SOAP?
Web of Science: REST or SOAP?Web of Science: REST or SOAP?
Web of Science: REST or SOAP?
 
Browser Horror Stories
Browser Horror StoriesBrowser Horror Stories
Browser Horror Stories
 
Securing Rails
Securing RailsSecuring Rails
Securing Rails
 
Concept ofinternet web_f2010211
Concept ofinternet web_f2010211Concept ofinternet web_f2010211
Concept ofinternet web_f2010211
 
Scalable talk notes
Scalable talk notesScalable talk notes
Scalable talk notes
 
Chinese Proverbs—PHP|tek
Chinese Proverbs—PHP|tekChinese Proverbs—PHP|tek
Chinese Proverbs—PHP|tek
 

Mehr von terry chay

2019-03 Recomendation Engine @ Confoo
2019-03 Recomendation Engine @ Confoo2019-03 Recomendation Engine @ Confoo
2019-03 Recomendation Engine @ Confooterry chay
 
2019-02 The Recommendation Engine @ SunshinePHP
2019-02 The Recommendation Engine @ SunshinePHP2019-02 The Recommendation Engine @ SunshinePHP
2019-02 The Recommendation Engine @ SunshinePHPterry chay
 
2017-11 Recommendation Engine @ RaiseMe
2017-11 Recommendation Engine @ RaiseMe2017-11 Recommendation Engine @ RaiseMe
2017-11 Recommendation Engine @ RaiseMeterry chay
 
2013-08 10 evil things - Northeast PHP Conference Keynote
2013-08 10 evil things - Northeast PHP Conference Keynote2013-08 10 evil things - Northeast PHP Conference Keynote
2013-08 10 evil things - Northeast PHP Conference Keynoteterry chay
 
10 Evil(ish) Things and how they relate to Features Engineering at the WMF
10 Evil(ish) Things and how they relate to Features Engineering at the WMF10 Evil(ish) Things and how they relate to Features Engineering at the WMF
10 Evil(ish) Things and how they relate to Features Engineering at the WMFterry chay
 
2011 07 Tales of Virality—OSCON
2011 07 Tales of Virality—OSCON2011 07 Tales of Virality—OSCON
2011 07 Tales of Virality—OSCONterry chay
 
PHP Without PHP—Automattic
PHP Without PHP—AutomatticPHP Without PHP—Automattic
PHP Without PHP—Automatticterry chay
 
Broken Jewel—Automattic
Broken Jewel—AutomatticBroken Jewel—Automattic
Broken Jewel—Automatticterry chay
 
Photo to Finished
Photo to FinishedPhoto to Finished
Photo to Finishedterry chay
 
Tales of Virality—Automattic
Tales of Virality—AutomatticTales of Virality—Automattic
Tales of Virality—Automatticterry chay
 
PHP Without PHP—Confoo
PHP Without PHP—ConfooPHP Without PHP—Confoo
PHP Without PHP—Confooterry chay
 
PHP Without PHP—IPC
PHP Without PHP—IPCPHP Without PHP—IPC
PHP Without PHP—IPCterry chay
 

Mehr von terry chay (13)

2019-03 Recomendation Engine @ Confoo
2019-03 Recomendation Engine @ Confoo2019-03 Recomendation Engine @ Confoo
2019-03 Recomendation Engine @ Confoo
 
2019-02 The Recommendation Engine @ SunshinePHP
2019-02 The Recommendation Engine @ SunshinePHP2019-02 The Recommendation Engine @ SunshinePHP
2019-02 The Recommendation Engine @ SunshinePHP
 
2017-11 Recommendation Engine @ RaiseMe
2017-11 Recommendation Engine @ RaiseMe2017-11 Recommendation Engine @ RaiseMe
2017-11 Recommendation Engine @ RaiseMe
 
2009-02 Oops!
2009-02 Oops!2009-02 Oops!
2009-02 Oops!
 
2013-08 10 evil things - Northeast PHP Conference Keynote
2013-08 10 evil things - Northeast PHP Conference Keynote2013-08 10 evil things - Northeast PHP Conference Keynote
2013-08 10 evil things - Northeast PHP Conference Keynote
 
10 Evil(ish) Things and how they relate to Features Engineering at the WMF
10 Evil(ish) Things and how they relate to Features Engineering at the WMF10 Evil(ish) Things and how they relate to Features Engineering at the WMF
10 Evil(ish) Things and how they relate to Features Engineering at the WMF
 
2011 07 Tales of Virality—OSCON
2011 07 Tales of Virality—OSCON2011 07 Tales of Virality—OSCON
2011 07 Tales of Virality—OSCON
 
PHP Without PHP—Automattic
PHP Without PHP—AutomatticPHP Without PHP—Automattic
PHP Without PHP—Automattic
 
Broken Jewel—Automattic
Broken Jewel—AutomatticBroken Jewel—Automattic
Broken Jewel—Automattic
 
Photo to Finished
Photo to FinishedPhoto to Finished
Photo to Finished
 
Tales of Virality—Automattic
Tales of Virality—AutomatticTales of Virality—Automattic
Tales of Virality—Automattic
 
PHP Without PHP—Confoo
PHP Without PHP—ConfooPHP Without PHP—Confoo
PHP Without PHP—Confoo
 
PHP Without PHP—IPC
PHP Without PHP—IPCPHP Without PHP—IPC
PHP Without PHP—IPC
 

Kürzlich hochgeladen

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
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
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 

Kürzlich hochgeladen (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 

PHP talks to Memcached

  • 1. Living without your Linemen OSCON Portland, OR: June 27, 2011, 5pm
  • 2. Not about Automattic I’m not in Systems and Operations Automattic doesn’t work this way
  • 3. Me = Typical Engineer • Mercurial/ Tempermental • Lack of Attention to Detail • Can’t multitask
  • 4. Me = Least Qualified to be Lecturing You Typical Engineer except in one way
  • 6. Who am I? Me (and others) on a deck of cards
  • 8. “…when I created the Web” — (not) A l Gore
  • 9. Cha yism http://phpdoc.info/chayism / One ounce of Terry Chay contains seven pounds of awesome
  • 11. Terry Chay does not walk, or run, or Chayism drive, or take an http://phpdoc.info/chayism airplane to a place. / He simply uses a Keynote transition.
  • 12. 1500 Lines Of Code PHP Advent 2009 http://phpadvent.org/2009/ 1500-lines-of- code-by-terry-chay
  • 14. 1500 Lines of Code/Day (max) “Except Java” Java: It only takes three years to put in a hard days work!
  • 15. Outliers Malcolm Gladwell 10,000 Hours of Diligent Practice http://www.amazon.com/g p/product/ 0316017922?tag=terrych ay-20
  • 16. Talent is Overrated Geoff Colvin 10,000 Hours = 20/week week * every week * 10 years! http://www.amazon.com/g p/product/ 0316017922?tag=terrych ay-20
  • 17. 1500 lines of code Half a Million Line codebase = Peak Day, Every Day, 1 Year
  • 18. Terry Chay doesn't write code, he just Chayism thinks it, and minions do it for him http://phpdoc.info/chayism /
  • 19. Part 1 Why: Three Observations
  • 20. 1. SiteOps are your offensive line http://terrychay.com/artic le/special- sysadmin-appreciation-day. shtml
  • 21. Quarterback Site Architect
  • 22. Running Back Programmer
  • 23. Wide Receiver Programmer
  • 24. Offensive Line System Operations
  • 25. Keep Your Line Happy Last Friday in July http://www.sysadminday.co m/
  • 26. 2. Story of (Ruby on) Rails
  • 27. “The Hottest Hacker on the Earth.” — WIRED Wired 14.04 page 3
  • 28. “Fuck You.” nemeier Hansson —D avid Hei David 3:16
  • 29. “fuckity fuck fucking fuck fuck.” —E XPLICIT TAG #TCFC +=5
  • 30. “coding these web apps themselves involves a lot of swearing—a lot of blood, sweat and swear.” —Me http://shiflett.org/blog/2006 / aug/blood-sweat-and-swea r- terry-chay-on-pro-php-podc ast
  • 31. “Fuck You.” nemeier Hansson —D avid Hei David 3:16
  • 32. “I can’t run Rails in mod_ruby on Apache on a shared host” h o has ev er tried —A nyone w http://blog.dreamhost.com / 2008/01/07/how-ruby-on-r ails- could-be-much-better/
  • 33. “Fuck You.” nemeier Hansson —D avid Hei David 3:16
  • 34. “Read/Writes as websites grow don’t scale evenly with Moore’s Law, so a bigger machine isn’t solving my database problems.” e who h as built —Anyon http://terrychay.com/artic th real le/ bsite wi sharting-on-sharding.shtm l a we growth (hock ey stick)
  • 35. “Fuck You.” nemeier Hansson —D avid Hei David 3:16
  • 36. “Fuck Comcast.” —Me Every time the intertubes get tied
  • 37. The Internet doesn't go down, Terry Chayism Chay's laptop just goes into sleep mode http://phpdoc.info/chayism /
  • 38. “Fucking AT&T.” —Me Every time I use my cell ph one in San Francisco
  • 39. “Fuck Steve Jobs. *blargh!*” —Me My upgrade to Lion
  • 40. The real reason there's no spyware Chayism for MacOS is that it's afraid of Terry http://phpdoc.info/chayism / Chay
  • 41. “$haystack, $needle or $needle, $haystack? I fucking hate PHP!” —Me In UR Website, c0ding UR sh it
  • 42. Terry Chay beat the Internet... with only Chayism one quarter http://phpdoc.info/chayism /
  • 43. Rock and Hard Place Scylla and Charybdis
  • 44. “80% of the effects come from 20% of the causes” — Pareto http://en.wikipedia.org/wik i/ Pareto_principle
  • 45. “Ruby is really good at what it does. The problem is that for what Ruby [on Rails] does really well, I can download Matt Mullenweg’s WordPress” —Me http://terrychay.com/artic le/is-ruby- the-dog-and-php-the-dogfoo d.shtml
  • 46. Rails FAILs? 1. (Software Architectural) Frameworks FAIL 2. Ruby on Rails is a (software archiitectural) framework. 3. Ergo…
  • 47. Innovator’s Dilemma Clayton M. Christensen Disruptive Technologies http://www.amazon.com/g p/product/ 0060521996?tag=terrych ay-20
  • 48. “[Disruptive Technologies] offered less of what customers in established markets wanted and so could rarely be initially employed there. They offered a different package of attributes valued only in emerging markets remote from, and unimportant to, the mainstream.” Chris tianson —Clayton Innovator’s Dilemma
  • 49. “[Disruptive Technologies] suck.” —(s horter) Christi anson C layton Innovator’s Dilemma
  • 50. “The S3 data storage that Amazon and SmugMug showed is impressive, but the EC2 cloud stuff was the most interesting, because it is disruptive.” sting Thing @ ost Intere —The M ZendCon Fall 2006
  • 51. iPod 2002 iPod Shuffle 2005 iPhone 2007 (Hard Drive) (first flash RAM) (“today”)
  • 53. “Rails: It succeeds because it sucks.” est imatin g Rails —M e, Mis Capistrano, CruisceControl.rb, GitHub, a gajillion admin consoles fo r AWS
  • 54. CruiseControl.rb Continuous integration
  • 55. Capistrano Automated deployment
  • 56. Vagrant Automated virtualization
  • 57. Puppet Automated configuration
  • 58. GitHub Repo as a Service
  • 59. Heroku Managed RAILS cloud
  • 60. 3. Story of PHP
  • 61. PHP’s S3 • Simplicity • Scalability • Straighforwardness
  • 62. “A project done in Java will cost 5 times as much, take twice as long, and be harder to maintain than a project done in a scripting language such as PHP or Perl.” ip Gree nspun —Phill http://blogs.law.harvard.e du/ philg/2003/09/20/
  • 63. “That a Java servlet performs better than a PHP script, under optimal conditions [has] nothing to do with scalability. The point is can your application continue to deliver consistent performance as volume increases. PHP delegates all the ‘hard stuff’ to other systems.” H arry F uecks — http://blogs.sitepoint.com/t he- j2ee-guy-still-doesnt-get-php /
  • 64. “PHP is not about purity in CS principles or architecture; it is about solving the ugly web problem with an admittedly ugly, but extremely functional and convenient solution. If you are looking for purity, you are in the wrong boat. Get out now before you get hit by a wet cat!” Ras mus Lerdorf — http://news.php.net/article. php? group=php.internals&articl e=2715
  • 65. “PHP: It succeeds because it sucks.” —Me Simplicity + Scalability + Straightforward = Suck = Success!
  • 66. Rock and Hard Place Your drinking habits make me very, very worried for the future of PHP
  • 67. AJAX Rich sites do the UI in Javascript and the communication via JSON
  • 68. Speed Memcached Before: PHP waits for dB Now: Performance and Profiling
  • 69. Terry Chay doesn't profile his code, he Chayism just commands it to run better. http://phpdoc.info/chayism /
  • 70. Terry Chay's semicolons make Chayism that line of code 74% faster http://phpdoc.info/chayism /
  • 72.
  • 73.
  • 74. Part 2 What: Three Infrastructures
  • 75. 1. Your Infrastructure on a Shared Host
  • 76. Lesson: Do More with Less
  • 77. 2. Infrastructure as a Computer
  • 78. “The datacenter is the new box.” son Ho ffman, — Ja Joyent http://pro.gigaom.com/ 2010/11/the-data-center-is - the-new-box-are-you-ready /
  • 79. 3. Infrastructure as a Service
  • 80. Traditional Cloud Predict and purchase Elastic Shared->Colocation Economies of Scale Pay for server Pay as you go Capitalize No up-front investment Fixed Cost Variable CAPEX OPEX discreet allocations fine-grained allocation disassociated costs associated costs staging, RAAD experimentation is cheap9
  • 81. Facebook Open Compute Project http://www.facebook.com/n otes/ facebook-engineering/build ing-efficient- data-centers-with-the-open -compute-
  • 82. Open-source Data Center Design Commodity Hardware Power and cost efficiencies
  • 83. “It’s usually in a business’ best interests to commoditize its complements.” M arco A rment — http://www.marco.org/201 1/04/09/ facebooks-open-compute-p roject
  • 84. “Whenever iPhone succeeds, Google succeeds.” aniel A legre, —D -Pacific f Goog le Asia Head o http://www.adnews.com.au/ news/ google-we-want-iphone-to-gr ow
  • 85. Infrastructure as a Commodity http://www.readwriteweb.c om/cloud/2011/04/ what-facebooks-opencompu te-mea.php
  • 86. Part 3 How: Three Levels of Application
  • 87. 1. Infrastructure as a Service
  • 89. Start your own shit • database, Memcache, load balancing • svn/git/GitHub • trac, stats, (and other internal tools) • deployment solution like Capistrano (Ruby)
  • 90. Gentoo is for Ricers
  • 92. AWS Free http://aws.amazon.com/fre e/ • 750 hours of Amazon EC2 Linux Micro Instance usage (613 MB of memory and 32-bit and 64-bit platform support) – enough hours to run continuously each month* • 750 hours of an Elastic Load Balancer plus 15 GB data processing* • 10 GB of Amazon Elastic Block Storage, plus 1 million I/Os, 1 GB of snapshot storage, 10,000 snapshot Get Requests and 1,000 snapshot Put Requests*
  • 93. Three Tiers EC2, S3, Database (RDS, Base SimpleDB…) CloudFront, Route 53, Services SQS, SMS, FPS, Mechanical Turk Managment Console, Elastic Management Beanstalk, Toolkit for Eclipse,Virtual Private Cloud
  • 94. “Basically [AWS] is programmable infrastructure” f Barr, Senior —Jef Eva ngelis t AWS http://www.amazon.com/g p/product/ 0980576830?tag=terrych ay-20
  • 95. “Why Amazon's cloud Titanic went down.” —CNN http://money.cnn.com/201 1/04/22/ technology/amazon_ec2_c loud_outage/?
  • 96. 2. Platform as a Service
  • 98. Orchestra.io http://orchestra.io/
  • 100. Value adds • Language specification • Framework specialization/optimization • Application specialization • (ex. Expose tools for optimization, deployment, continuous testing, etc.) • (ex. NginX + PHP-FPS (fastcgi) over Apache) • (ex. HipHop compile and optimization for
  • 101. 3. Start Here -> Finish Somewhere
  • 102. Programmer as Operations; Operations as Programmer (DevOps) http://en.wikipedia.org/wik i/DevOps
  • 104. yism Security is low priority for Terry Chay because he Cha knows the internet's http://phpdoc.info/chayism / got his back[ups]
  • 105. PHP was never about PHP Without PHP, LAMP would just be LAM(e).
  • 106. Battle Wounds http://terrychay.com/artic le/ cuts-and-scars.shtml
  • 107. Cha yism http://phpdoc.info/chayism / When Terry Chay throws $10k into the air, he doesn't bother picking it up
  • 109. Tales of Virality Terry Chay OSCON (Business Track) August 28, 2011, 5PM (Room E146)
  • 110. Terry Chay doesn't get stage fright. Stages get frightened of Terry Chay.
  • 111. Terry Chay doesn't get stage fright. @tychay http:// Stages get terrychay.com/ frightened of Terry “I promise to blog Chay. tychay@php.net more.”
  • 112. Contact Me Terry Chay doesn't get stage fright. @tychay http:// Stages get terrychay.com/ frightened of Terry “I promise to blog Chay. tychay@php.net more.”
  • 113. Contact Me Terry Chay doesn't get stage fright. @tychay http:// Stages get terrychay.com/ frightened of Terry “I promise to blog Chay. tychay@php.net more.” http://www.oscon.com/ Leave a oscon2011/public/schedule/ comment! detail/18893
  • 114. Contact Me Terry Chay doesn't get stage fright. @tychay http:// Stages get terrychay.com/ frightened of Terry “I promise to blog Chay. tychay@php.net more.” http://www.oscon.com/ Leave a oscon2011/public/schedule/ comment! detail/18893 Slides from http://www.slideshare.net/tychay this talk posted soon!

Hinweis der Redaktion

  1. Abstract:\nIf a website architect is the quarterback, then site operations is the offensive line—overworked, underappreciated, and only noticed when it fails. They make you look good. However, four years ago cloud computing networks like Amazon Web Services and Slicehost have appeared. While deficiencies in frameworks in other languages have forced those worlds to adopt Infrastructure-as-a-Service, the PHP world—with it’s ultra-cheap shared-hosting (on one end) and tradition of dominance on some of the most trafficked websites (on the other)—has been slow to move. But as the technology continues to disrupt, modern web engineers will be expected to use their programming skills to not only build, but also provision and maintain fast, scalable websites.\n\nThe efficiencies of a web-based language and experience in scalable website architecture offer a unique opportunity for programmers to transfer their skills when wearing a sysop hat. Not to mention some of the best libraries for programming them are written in PHP! When going from a small pet project to a go-live site, maybe we can learn to live without our linemen.\n\n
  2. The need for rich sites\n
  3. I meant to say, “When I created the website.” Geez! One slip of the tougue is like hanging chad in your mouth.\n
  4. \n
  5. Because WordPress started before IaaS existed, Automattic runs systems in a more standard manner. Instead this is the experiences I have advising friends startups. (If you want to see how Automattic runs, talk to Barry Abrahamson. My extent of Automattic’s structure stops at, “Barry! I think I broke something!”)\n
  6. \n
  7. I DON’T think I can do your job, like some of the people you’ve worked with. ;-)\n
  8. I’m a PHP Programmer. At ZendCon, a PHP conference, in 2006, the host made these.\n\nhttp://www.flickr.com/photos/calevans/285999927/in/set-72157594355906012/\n
  9. I’m a PHP Programmer. At ZendCon, a PHP conference, in 2006, the host made these.\n\nhttp://www.flickr.com/photos/calevans/285999927/in/set-72157594355906012/\n
  10. And it occurred to me when someone puts your face on a deck of cards you must be a terrorist. (I guess he put these so that the Java Strike Force could hunt us down and kill us.) So, if some of what I say shocks you or seems a little extreme, you’ve been warned!\n\nhttp://www.flickr.com/photos/papernapkin/740945436/\n
  11. Let me explain a running theme: during a presentation at a PHP conference a number of years ago I said this… I meant to say, “When I created the website.” Geez! One slip of the tongue is hanging chad in your mouth.\n
  12. That inspired some in the community to put up this website (the PHP IRC channel robot also does this). Clearly, according to phpdoc (and the #php-* IRC robots), I am awesome. :-)\n
  13. Here is another. Apparently I didn’t need to fly to get to Portland… (That’s enough Keynote transitions).\n
  14. Start with the opening keynote. Three takeaways\n1) Lots on discussion of the performance of PHP: xdebug/cachegrind, inclued, HipHop analyser\n2) Diagram of a modern web stack\n3) Architecture considerations and deployment strategies\n
  15. Let’s preface each section with an anecdote. This one concerns an article I wrote during Christmas of 2009.\n
  16. A few startups ago, I worked with a guy who was a better programmer than any of us.\n\nOne day, we got into an argument over a piece of open source import code — written in Python — that he had ported to C++. He had just finished telling me how much faster he had made it, when I asked, “What’s the point in that? Now that you’ve rewritten it, you own the maintenance of it. There is no evidence this code is even the bottleneck.” \n\nAhmdahl's Law\n\nThe point? The code was crap, and he had fixed it — the massive improvement in efficiency was an added bonus.\n\n“Look you’re right. It’s true I prefer to use a crappy, ugly, underperformant language like PHP, and you crank out C++ like John Henry drives steel. But, while you’re busting code with a hammer in each hand, I’m the guy with the steam-powered jackhammer. Sure, you win, but your heart will burst, and you’ll die.”\n\n“And here’s the thing,” I added with a devilish grin, “There’s only one you; there are a lot of people like me out there.”\n\nImage from: http://www.postalmuseum.si.edu/artofthestamp/subpage%20table%20images/artwork/legends/John%20Henry/BIGjohnhenry.htm\n
  17. My friend said. “J2EE programmers only write five lines of code a day.” He’s a Java programmer so he added “They’re give REALLY GOOD lines.”\n\nImage: http://www.flickr.com/photos/tychay/1388234558/\n
  18. Here was a popular book from 2008. One interesting point Malcolm Gladwell makes is that it takes 10,000 hours of diligent practice to achieve mastery in nearly anything of worth. Pretty soon everyone is tweeting, all I have to do is spend 10k ours on it and I’ll master it.\n\nImage: http://www.flickr.com/photos/tychay/1388234558/\n
  19. But let’s break that down. Gladwell stole this from this book, but he deliberately misrepresents how much 10k hours is. Also, not just any practice (diligent practice is hard!). He makes 10k hours sound achievable, but it isn’t—its 10 years of work doing somehing nobody, even masters like Bobby Fisher, Tiger Woods, YoYo Ma find unenjoyable.\n\nImage: http://www.flickr.com/photos/tychay/1388234558/\n
  20. Similarly let’s look at what 1500 lines of code/day means. The Net result is I think C++ is crap because it only does 3 lines of (work) assembly for every line of code. PHP does much more (less efficiently).\n
  21. Either choose what you spend to spend your time coding wisely or get a lot of people with chainsaws\n
  22. \n
  23. This is an analogy a co-worker once told me.\n
  24. “You’re the architect, so you’re like the quarterback”\n
  25. “I’m a programmer so I’m like the Running Back\n
  26. …or wide Receiver.” I guess the difference between a Wide Receiver and a Running Back is one is back-end engineering and the other is front-end engineering. (Which is which? I don’t know.)\n
  27. And Systems is like the big burley guys up front. They make you look good.\n\nYou don’t notice them until the site goes down (get a holding penalty)\n\nHow many times have I had to field questions about “what do these people do? I dont’ see them working?” And I have to explain, “You don’t want them to look like they’re working. If they do, something is VERY wrong.”\n\nStory about an Christmas e-mail.\n
  28. “Have you tried turning it off and on?”\n\nThe Big Difference between SiteOps and an Offensive line is treating SiteOps won’t eat you out of house and home.\n
  29. \n
  30. There is someone from the Ruby on Rails world who should remain nameless. Let’s call him …“DHH.” This guys is the Jesus of the Ruby World—if Jesus shaved off his beard and starting dressing like a hipster.\n\n\nImage from: http://www.flickr.com/photos/x180/503574487/\nQuote From: http://www.wired.com/wired/archive/14.04/start.html?pg=3\n
  31. And, according to his talks, he has only two words for me (and you).\n\nThe Gospel According to David.\n
  32. Now, I’ve been known to swear on occasion . Sometimes I feel you could just replace all my talks with a recording of me saying “fuckity fuck fucking fuck fuck” (coincidentally, this is exactly what it sounds like when I’m conding).\n
  33. But there is a world of difference between saying this…\n
  34. And someone saying this to me (and you). This is awful because it ends debate.\n
  35. And someone saying this to me (and you). It’s bad because it removes all room for debate and discussion. For instance: “Hey, I can’t run Rails in mod_ruby on Apache because of shared memory collisio.”\n
  36. “Fuck You.” \n
  37. “Hey, reads and writes on your website growth don’t scale evenly with Moore’s Law so you can’t simply buy a bigger machine to solve your problems.”\n
  38. “Fuck You.” “Fuck You” is the “Your Momma” of the Rails world.\n
  39. That isn’t to say I never give a directed fuck.\n
  40. \n
  41. That isn’t to say I never give a directed fuck.\n
  42. That isn’t to say I never give a directed fuck.\n
  43. I mean the guy should be thanking me. :-)\n
  44. Even with PHP itself!\n
  45. …Oh wait, maybe I am.\n\n(It must be true, I read it on the internet.)\n
  46. Frameworks (like Rails) need to navigate stuck between a Rock and a Hard Place\n\nhttp://sarahdeming.typepad.com/spiralstaircase/2009/10/monsters-of-the-week-scylla-and-charybdis.html\n
  47. The Rock is Pareto’s principle. It means as your codebase matures, 80% of your time will be spent on 20% of the code… that the Framework doesn’t handle (correctly). In that case you’re better off building a framework that works.\n
  48. The hard place is maybe something pre-built solves your problem already.\n
  49. Maybe the problem is already mappable to a forum software and you can download Phorum. Look how much work went into it.\n
  50. So given the reasoning that Frameworks fail and Ruby on Rails is a framework. The Transitive Property of FAIL means that Rails FAILS. How is this wrong?\n
  51. It gets back to this Harvard B-school (B stands for bullshit) book.\n\nImage: http://www.flickr.com/photos/tychay/1388234558/\n
  52. Hard drive manufactures fell to smaller version, mainframes to the miniframe, miniframe to the workstation, workstations to the PC, Sears to WalMart, US Steel vs. small steel mills fail not because of failure to innovate, but because of the appearance of a disruptive technology\n
  53. In all examples he gives the salient feature of a “disruptive technology” is that it is inferior to the one it replaces. The problem is even in the 1997 book (written during the dotCom boom) he mentioned a lot of examples of disruptive technologies (like Pets.com). Most of them are in the dead pool today.\n
  54. So you might be thinking… Ahh Ruby on Rails is disruptive. No! That’s not it. Instead, Amazon’s Elastic Compute Cloud: Truly disruptive. On the same days as I got my hands on the PHP terrorist cards I showed on the beginning, this was what I was said during an interview. It is truely unique to be able to see a disruptive technology right from the outset. But cloud computing truly is. It’s inferior and more expensive (to scale) than colocation, but the writing was on the wall even then.\n
  55. Now compare to IaaS.\n\n1. Starts out more expensive/worse (hell yes!)\n2. Different attributes far from mainstream\n3. Eventually supplants existing system? (OpenStack, OpenCompute -> Nebula announced today)\n
  56. Now compare to IaaS (and the keynote talk today)\n\n1. Starts out more expensive/worse (hell yes!)\n2. Different attributes far from mainstream\n3. Eventually supplants existing system? (OpenStack, OpenCompute -> Nebula announced today)\n\nNote that shared hosting, managed hosting and colo aren’t going away, they’re shifting to the extremes. We still have supercomputers and compute clouds in a PC/laptop world. Apple still makes the iPod and even a model with a hard drive in it.\n
  57. Since Rails doesn’t work in shared hosts (remember that joke earlier?), they adopted EC2 (and other things)! And now they are thriving: Capistrano, Ruby version so CruiseControl, GitHub, Heroku… All of it owes it’s life to the disruption of IaaS. And Rails owes its newfound niche to its deficiency in a shared hosting environment.\n
  58. \n
  59. \n
  60. \n
  61. \n
  62. Yes, People can do stupid things like try to (re)write Map-Reduce in Rails (without a Reduce function), but that attitude allows them to adopt new things like Git and give us GitHub. The previous examples are Ruby, this is Ruby on Rails.\n
  63. A big value add in IaaS.\n
  64. \n
  65. This is why I choose PHP and why it has become the most popular web-language in the world. It’s our S3.\n
  66. SIMPLICITY Basically: It’s so simple any moron can learn it.\n
  67. SCALABLE Basically: Shared nothing means it has nothing to hang yourself with.\n
  68. STRAIGHTFORWARD Basically: PHP was only designed to solve the web problem. Solve other problems with something else (and link to it in PHP).\n
  69. This is the dirty little secret of web development: anyone can string together a “SELECT * from users where email=?”, what’s so hard about web development? So if you boil those S3 down to a single S, PHP too succeeds because it sucks. But that suckiness has 40 million developers worldwide!\n
  70. And now, PHP is ready for it’s own Schylla and Charibdis.\n\nImage from: http://www.flickr.com/photos/davidcoallier/2207776375/\n
  71. The need for rich ajax driven sites obsoletes traditional advantages fo templating\n
  72. PHP is an embedded templating language. What is the advantage of a template when everything is in Ajax?\n\nReference: http://antigonemythology.wikispaces.com/file/view/ajax.jpg/33165025/ajax.jpg\n
  73. Profiling PHP is now a big deal because speed of PHP is becomming the bottleneck\n
  74. means PHP is no longer waiting on the database. PHP is now the bottleneck. The language need to be performant and developers need to profile. (Note most developers don’t know how to profile code (in PHP it’s with XHProf and kCacheGrind/XDebug) or how to optimize their builds to be performant (replacing Apache with NginX/PHP FPM or using HipHop).\n\nReference: http://web1syndication.com/wp-content/uploads/2010/05/speed.jpg\n
  75. …except me.\n
  76. I’ll just chuck in some semicolons.\n
  77. Why did PHP 6 failed? It failed due to lack of participation. Nobody gave a shit about i18n and all the stuff people wanted (the stuff that helps in performance or building rich Ajax driven websites) was put in PHP 5.2 and 5.3\n
  78. Let’s talk about the “language needs to be performant part.” We’ll do this with an introductory vignette to part 2. A person at Facebook invented HipHop. Explain how this is different from a JIT (Java, dotNet, JRuby, etc.)\n
  79. \n
  80. \n
  81. This part we discuss the three infrastructures of operations.\n
  82. This is how PHP became popular. Look at WordPress: 1 click to install on Dreamhost, GoDaddy and the like. (And remember your problem may be mappable to wordpress)\n
  83. They’re taking away your O-line. Nowadays your ops team looks like this year’s Pittsburgh Steelers. The most difficult part of programming is not in the code, it is in the process. You have to do more with less: We have less testing, so we can release more often. We automate it so we can eliminate user-testing… we had to become more agile for releasing… Now we’ll have to become more agile at hosting. Shared hosting was the start of PHP, but it isn’t it’s end.\n
  84. Point is automating deployment and testing so you can be agile?\nReleasing often (story of Tagged)\nWhat does that mean?\n
  85. Most of the discussion isn't in the code, it's in the process. The process is the most ignored part of programming.\n
  86. This is how a modern high-performance and scalable website (like Facebook) is built.\n
  87. CPU, RAM, Disk -> Web Server, Memcached, Database.\n\nSomeday you’ll be buying datacenter like you buy a PC (only it’s in the cloud). Or maybe it’s that you’re now buying PC like you buy everything else (Think DropBox or BackBlaze—one of which is built on Amazon Cloud services).\n\nWe consume the same thing already today, they’re called web services. Now simply make the infrastructure a service…\n
  88. Oh yeah your PC connecting to the internet? That’s your website consuming web services. Remember PCs before the internet? They were islands: Ask yourself why you liked Lorna’s talk.\n
  89. …this is the cloud computing thing\n
  90. From “Host Your Web-Site in the Cloud” by Jeff Barr of Amazon\n\nThe big thing is the new model which is pay as you go. It may be more expensive at scale, but you don’t have to anticipate growth with CAPEX.\n
  91. Before we get to the last part, I want to revisit that “data center is a box” and something that happened recently. Facebook launched the “Facebook Open Compute Project”. What is it?\n
  92. Announcement: http://www.facebook.com/notes/facebook-engineering/building-efficient-data-centers-with-the-open-compute-project/10150144039563920\n\nCommodity hardware: http://joyeur.com/2011/04/07/facebooks-open-compute-the-dc-is-the-new-server-and-the-rise-of-the-taiwanese-tigers/\n\nhttp://www.readwriteweb.com/cloud/2011/04/what-facebooks-opencompute-mea.php\n
  93. “On a large scale like this … “opening” something is almost always an effort to commoditize it, leveling the playing field as much as possible and marginalizing competitive advantages that others might have had. [ QUOTE ABOVE ] “Nobody “opens” the parts of their business that make them money, maintain barriers to competitive entry, or otherwise provide significant competitive advantages”\n
  94. Microsoft and Open PC hardware (eliminated dependency on IBM (and Intel))\nGoogle and applications (browser), platforms (Android), web tech (video) because search business:\nApple and apps\n(I actually don’t look at it as iPhone versus Android. iPhone is a very strong driver of query growth for Google. We also monetize apps through the iPhone…we actually benefit from iPhone’s growth.”)\n
  95. “But the benefits of commoditization in this area to Facebook are very small…My best guess is that this is primarily for recruiting engineering talent” —Marco Arment.\n\nHe’s wrong with that part. The benefit is to turn Infrastructure into a Commodity. (Dependence on Amazon tools)\n\nRockerfeller and Trains. Impact on people who build large datacenter, Facebook free to move to Amazon services.\n\nWhat is being open sourced? Infrastructure\nOpen Source -> Commoditize your complement\nTherefore: Infrastructure as a Commodity\n\nIf you are a operations person now, then you better get into programming or your next job application will be to a company like Joyent or Amazon.\n
  96. \n
  97. \n
  98. This is what I use. Bought out by RackSpace. There are others\n
  99. You can go this route but it is a lot of work.\nOn the plus side, since you manage everything you have the least dependencies and are positioned right now to move to wherever is cheapest.\n
  100. Just don’t make your server look like this.\nOops I offended the one person in the room who uses Gentoo.\nBut look you dont want some person like me using your OS: Look I recompiled everything with CFLAGS=-O9\n
  101. \n
  102. \n
  103. The way to look at the tiers is: you need the base, the services are a nice convenience, and you should probably avoid the management as other competing companies (built on the Base) will do it better/cheaper.\n\nEC2\nS3\nDatabase (RDS, SimpleDB,etc)\n\nAmazon Cloudfrount\nAmazon Route 53\nAmazon Messaging: SQS, SNS\nAmazon Flexible Payment Systems (FPS): their version of PayPal API\nAmazon Mechanical Turk\n\nAWS Management Console\nAWS Elastic Beanstalk - Java.war file creates EC2, etc. instances\nAWS toolkit for Eclipse, Java, PHP etc.\nAWS Virtual Private Cloud (isolated network)\n\n
  104. This is where programming comes in.\nThere are libraries for this.\n
  105. \n
  106. Story of 365Main going down. Story of WP outages\n\nYet, like the famous ocean liner, Amazon's cloud crashed that week, taking with it Reddit, Quora, FourSquare, Hootsuite, parts of the New York Times, ProPublica and about 70 other sites\n
  107. \n
  108. Automated deploymnet (many platforms)\n
  109. This is trying to be the Heroku of the PHP world.\n\nBasically you just point it to your PHP repository and it handles the rest.\nAdd ons\n- Job queue\n- Error logging\n- Couchdb\n- Memcached\n- Mongodb\n\nIt even supports Frameworks like:\nFrameworks:\n- Zend Frameowork\n- Symphony\n- Lithum\n- Solar PHP\n- FRAPI\n\nFramework optimization handled by them is a huge possible performance gain where they can give you more bang for your Amazon buck than you can yourself. Just like Heroku does with Rails.\n
  110. Frameworks:\n- Zend Frameowork\n- Symphony\n- Lithuum\n- Solar PHP\n- FRAPI\n
  111. A bit about Frameworks advantages (like Rails)\n
  112. Vid Luther. Built on AWS. WordPress.\n
  113. \n
  114. \n
  115. Operations requires programming\nProgramming no longer has operations.\nPersonality makes for different peeps\n
  116. What is the barrier to entry now? vs. when you needed servers and colocation?\n
  117. Actually this one is true. Security is a low priority and I use services like BackBlaze and DropBox (one basically an Amazon S3 instances)\n
  118. Built on AWS\n
  119. Built on AWS\n
  120. \n
  121. Performance is important and the performance outside PHP itslef\n
  122. A Java person says, “Look at it this way, Java is like a knife. A knife can do many things: a good one is essential for cooking, it can cut open packages, cut a cord, and it really comes in handy in a fist-fight. Java can do a lot of things and do them very well.”\nA PHP person, if they had to fight, would rather have something that is designed to solve that one problem, and solve it well.\nA PHP person says, “That knife is nice, but I’d rather have a gun.”\n
  123. \n
  124. \n
  125. It’s on the business track, so after seeing this PHP programmer try to be an system adminstrator, now you see an engineer talk to biz guys.\n\n
  126. @tychay\ntychay@php.net\nhttp://terrychay.com/\n\nhttp://joind.in/talk/view/3351\n\nPromise to blog more\n
  127. @tychay\ntychay@php.net\nhttp://terrychay.com/\n\nhttp://joind.in/talk/view/3351\n\nPromise to blog more\n
  128. @tychay\ntychay@php.net\nhttp://terrychay.com/\n\nhttp://joind.in/talk/view/3351\n\nPromise to blog more\n
  129. @tychay\ntychay@php.net\nhttp://terrychay.com/\n\nhttp://joind.in/talk/view/3351\n\nPromise to blog more\n
  130. @tychay\ntychay@php.net\nhttp://terrychay.com/\n\nhttp://joind.in/talk/view/3351\n\nPromise to blog more\n
  131. @tychay\ntychay@php.net\nhttp://terrychay.com/\n\nhttp://joind.in/talk/view/3351\n\nPromise to blog more\n
  132. @tychay\ntychay@php.net\nhttp://terrychay.com/\n\nhttp://joind.in/talk/view/3351\n\nPromise to blog more\n
  133. @tychay\ntychay@php.net\nhttp://terrychay.com/\n\nhttp://joind.in/talk/view/3351\n\nPromise to blog more\n
  134. So all the speakers at this conference need to send my my cut stat! (That goes double for you, Paul) Triple?\n