SlideShare a Scribd company logo
1 of 61
Download to read offline
To the Edge of Web
               Performance and
                    Beyond



Joshua Hull        @joshbuddy   http://github.com/joshbuddy
Preamble




Joshua Hull   @joshbuddy   http://github.com/joshbuddy
Preamble
                           Joshua Hull



                           @joshbuddy
                           http://github.com/joshbuddy
                           joshbuddy@gmail.com


                    (not switching to Python)

Joshua Hull   @joshbuddy                    http://github.com/joshbuddy
Preamble
                                                       m e !
                                     lo a d
                       o w n
                 D
     http://www.slideshare.net/joshbuddy/to-the-edge-of-web-performance-and-beyond




Joshua Hull                     @joshbuddy                     http://github.com/joshbuddy
To the Edge of Web
               Performance and
                    Beyond



Joshua Hull        @joshbuddy   http://github.com/joshbuddy
To the Edge of Web
               Performance and
                    Beyond



Joshua Hull        @joshbuddy   http://github.com/joshbuddy
To the Edge of Web
               Performance and
                    Beyond
                   (with solutions!)




Joshua Hull         @joshbuddy         http://github.com/joshbuddy
ESI




Joshua Hull   @joshbuddy   http://github.com/joshbuddy
ESI
              Edge     Side   Includes




Joshua Hull      @joshbuddy          http://github.com/joshbuddy
ESI
                  Edge           Side       Includes
              (not the origin)          (not only includes)




Joshua Hull            @joshbuddy                     http://github.com/joshbuddy
ESI
                           Edge
              http://www.w3.org/Icons/w3c_icon.svg
                                                           Side   Includes
                                                                        18/07/09 8:46 AM




Joshua Hull                                          @joshbuddy                http://github.com/joshbuddy
ESI
                     Edge       Side     Includes


      <esi:include src="http://www.example.com/new_user.html"/>




Joshua Hull               @joshbuddy              http://github.com/joshbuddy
ESI

                    Your caching is probably evil
              What does this ESI you speak of look like?
                     How can I actually use ESI?
                             Problems!




Joshua Hull               @joshbuddy          http://github.com/joshbuddy
Your caching is
               probably evil




Joshua Hull      @joshbuddy   http://github.com/joshbuddy
Your caching is
               probably evil


                       Fast




                       Fast
Joshua Hull      @joshbuddy   http://github.com/joshbuddy
Your caching is
                     probably evil



      (incorrect)


                           Correct
Joshua Hull            @joshbuddy    http://github.com/joshbuddy
Your caching is
               probably evil
 Caching is great                Caching really sucks




Joshua Hull         @joshbuddy        http://github.com/joshbuddy
Your caching is
               probably evil
 Caching is great




Joshua Hull         @joshbuddy   http://github.com/joshbuddy
Your caching is
                           probably evil
 Caching is great
         <html>
        <head>
        <title>
                My Page
       </head>          </title



                                           Cache
                                >
       <body>
         This pa
                 ge rock
      </body>            s.
      </html>


      Hard work



Joshua Hull                         @joshbuddy     http://github.com/joshbuddy
Your caching is
               probably evil
 Caching is great



Everything is peachy           Cache
                              Cache




Joshua Hull            @joshbuddy      http://github.com/joshbuddy
Your caching is
               probably evil




                   Victory?
Joshua Hull      @joshbuddy   http://github.com/joshbuddy
Your caching is
               probably evil
                              Caching really sucks




Joshua Hull      @joshbuddy        http://github.com/joshbuddy
Your caching is
               probably evil
                              Caching really sucks




Joshua Hull      @joshbuddy        http://github.com/joshbuddy
Your caching is
                       probably evil
                                      Caching really sucks
  Expensive DB call



Expensive filesystem
       magic




Joshua Hull              @joshbuddy        http://github.com/joshbuddy
Your caching is
                    probably evil
         User-specific
                                     Caching really sucks
        Result of web
           service
         DB intensive
         Other work

              ?

Joshua Hull             @joshbuddy        http://github.com/joshbuddy
Your caching is
               probably evil
                              Caching really sucks




Joshua Hull      @joshbuddy        http://github.com/joshbuddy
Your caching is
               probably evil
                                   Caching really sucks




                              1 4 0er   v ic es
                              webs


Joshua Hull      @joshbuddy                http://github.com/joshbuddy
Your caching is
               probably evil
                 Fragment caching




Joshua Hull       @joshbuddy        http://github.com/joshbuddy
Your caching is
               probably evil
                 Fragment caching
                <html>
                <head>
                <title>My Page</title>
                </head>
                <body>
                  <% cache do('my_fragment') %>
                    This fragment rocks.
                  <% end %>
                </body>
                </html>




Joshua Hull        @joshbuddy                     http://github.com/joshbuddy
Your caching is
                  probably evil
                      Fragment caching
                     <html>
                     <head>
                     <title>My Page</title>

          is this
                     </head>

    Who              <body>

           ents’
                       <% cache do('my_fragment') %>

    fragm
                         This fragment rocks.


             ller?
                       <% end %>

       ontro
                     </body>
     c               </html>




Joshua Hull             @joshbuddy                     http://github.com/joshbuddy
Your caching is
               probably evil
                  Fragment caching
              “Kitchen Sink” controllers
                    MainController
                 HomepageController
                NotAResourceController




Joshua Hull         @joshbuddy             http://github.com/joshbuddy
Your caching is
                probably evil
                     Fragment caching
                “Kitchen Sink” controllers
                       MainController
                    HomepageController
                   NotAResourceController
   Bake controller logic            Do a lot of extra logic
   into your fragments               in your controller


Joshua Hull            @joshbuddy            http://github.com/joshbuddy
Your caching is
                  probably evil
                        Fragment caching
                  “Kitchen Sink” controllers
                        MainController
                     HomepageController
                    NotAResourceController
   Bake controller logic              Do a lot of extra logic
   into your fragments                 in your controller
          Not correct                        Not fast
Joshua Hull              @joshbuddy            http://github.com/joshbuddy
Your caching is
               probably evil




Joshua Hull      @joshbuddy   http://github.com/joshbuddy
Your caching is
               probably evil
                http://upload.wikimedia.org/wikipedia/en/8/8b/Akamai_logo.svg             18/07/09 8:44 AM




Joshua Hull                     @joshbuddy                                      http://github.com/joshbuddy
Your caching is
                 probably evil
                    http://upload.wikimedia.org/wikipedia/en/8/8b/Akamai_logo.svg             18/07/09 8:44 AM




      A web page = A bunch of resources + a bit of logic




Joshua Hull                         @joshbuddy                                      http://github.com/joshbuddy
Your caching is
                 probably evil
                    http://upload.wikimedia.org/wikipedia/en/8/8b/Akamai_logo.svg             18/07/09 8:44 AM




      A web page = A bunch of resources + a bit of logic


                                                   E S I
                         http://www.w3.org/TR/esi-lang


Joshua Hull                         @joshbuddy                                      http://github.com/joshbuddy
What does this ESI you
          speak of look like?




Joshua Hull     @joshbuddy   http://github.com/joshbuddy
What does this ESI you
          speak of look like?

              include               try

               vars                choose


Joshua Hull           @joshbuddy          http://github.com/joshbuddy
What does this ESI you
          speak of look like?
        include                  <esi:include src="URI" alt="URI" onerror="continue" />




        Examples
        <esi:include src="/header" />
        <esi:include src="/header" alt="/alternate-header" />
        <esi:include src="/header" alt="/alternate-header" onerror="continue" />




Joshua Hull                         @joshbuddy                         http://github.com/joshbuddy
What does this ESI you
          speak of look like?
        try
                                 <esi:try>
                                   <esi:attempt> ... </esi:attempt>
                                   <esi:otherwise> ... </esi:otherwise>
                                 </esi:try>




         Example
         <esi:try>
           <esi:attempt>
             <esi:include src="/my-resource"/>
           </esi:attempt>
           <esi:except>This is bad</esi:except>
         </esi:try>




Joshua Hull                          @joshbuddy                           http://github.com/joshbuddy
What does this ESI you
          speak of look like?
        choose
                                 <esi:choose>
                                   <esi:when test=”...”> ... </esi:when>
                                   <esi:otherwise> ... </esi:otherwise>
                                 </esi:choose>




         Example
         <html><body>
           <esi:choose>
             <esi:when test="$(HTTP_ACCEPT_LANGUAGE{ja})">I speak Japanese</esi:when>
           </esi:choose>
           <esi:otherwise>
             I don't speak it, sorry bout that.
           </esi:otherwise>
         </body></html>




Joshua Hull                          @joshbuddy                        http://github.com/joshbuddy
What does this ESI you
          speak of look like?
        vars                     <esi:vars>...</esi:vars>




        Examples
        <esi:vars><img src="http://www.example.com/$(QUERY_STRING{greet})/hello.gif"/ ></esi:vars>
        <esi:vars>Your ID is $(HTTP_COOKIE{id})</esi:vars>




Joshua Hull                         @joshbuddy                         http://github.com/joshbuddy
What does this ESI you
          speak of look like?
        variable substitution

          HTTP_ACCEPT_LANGUAGE                Set (da, en-gb, en)
          HTTP_COOKIE                         Hash
          HTTP_HOST                           String
          HTTP_REFERER                        String
          HTTP_USER_AGENT                     Hash (os, version, browser)
          QUERY_STRING                        Hash



Joshua Hull                      @joshbuddy                         http://github.com/joshbuddy
What does this ESI you
          speak of look like?
        other bits

          ==, !=, <, >, <=, >=                Comparison
          !                                   Unary negation
          &                                   Logical and
          |                                   Logical or




Joshua Hull                      @joshbuddy                    http://github.com/joshbuddy
How can I actually use ESI?




Joshua Hull      @joshbuddy   http://github.com/joshbuddy
How can I actually use ESI?




                   Solutions!
Joshua Hull      @joshbuddy     http://github.com/joshbuddy
How can I actually use ESI?




              Actual working implementations
Joshua Hull           @joshbuddy         http://github.com/joshbuddy
How can I actually use ESI?
          Taf2 / nginx-esi
              http://github.com/taf2/nginx-esi
          Taf2 / mongrel-esi
              http://github.com/taf2/mongrel-esi
          Qerub / rack-esi
              http://github.com/Qerub/rack-esi
          Varnish
              http://varnish.projects.linpro.no/
          Joshbuddy / esi-for-rack
              http://varnish.projects.linpro.no/

Joshua Hull                       @joshbuddy       http://github.com/joshbuddy
How can I actually use ESI?
          Taf2 / nginx-esi
              http://github.com/taf2/nginx-esi
          Taf2 / mongrel-esi
                                                    A nd
              http://github.com/taf2/mongrel-esi
                                                       ba bly
          Qerub / rack-esi                         pro re!
              http://github.com/Qerub/rack-esi
                                                     mo
          Varnish
              http://varnish.projects.linpro.no/
          Joshbuddy / esi-for-rack
              http://varnish.projects.linpro.no/

Joshua Hull                       @joshbuddy       http://github.com/joshbuddy
How can I actually use ESI?




                Easy to work with
Joshua Hull      @joshbuddy         http://github.com/joshbuddy
How can I actually use ESI?
          Joshbuddy / spackle
              http://github.com/joshbuddy/spackle




Joshua Hull                     @joshbuddy          http://github.com/joshbuddy
How can I actually use ESI?
          Joshbuddy / spackle
               http://github.com/joshbuddy/spackle

          Controller
              esi(:user_bar, :path => ":variable/$(HTTP_COOKIE{esi-cookie})", :binds => [:cookie]) do |esi_params|
                render :text => "variable is #{params[:variable]}, cookie is #{params[:cookie]}"
              end




Joshua Hull                                  @joshbuddy                                http://github.com/joshbuddy
How can I actually use ESI?
          Joshbuddy / spackle
               http://github.com/joshbuddy/spackle

          Controller
              esi(:user_bar, :path => ":variable/$(HTTP_COOKIE{esi-cookie})", :binds => [:cookie]) do |esi_params|
                render :text => "variable is #{params[:variable]}, cookie is #{params[:cookie]}"
              end




                                                  def user_bar
                                                    # setup ...
                                                    user_bar_body
                                                  end

                                                  def user_bar_body
                                                    # your block
                                                  end




Joshua Hull                                  @joshbuddy                                http://github.com/joshbuddy
How can I actually use ESI?
          Joshbuddy / spackle
              http://github.com/joshbuddy/spackle

          View
              <%=esi_include(:user_bar, :test => "testing") %>



              <% esi_try do %>
                <% esi_attempt do %>
                  <%=esi_include(:user_bar, :test => "testing") %>
                <% end %>
              <% end %>



              <% esi_include do %>
                <%=esi_src(:user_bar, 'testing') %>
                <%=esi_alt("http://www.slashdot.org/") %>
              <% end %>



Joshua Hull                           @joshbuddy                     http://github.com/joshbuddy
How can I actually use ESI?




                     Security
Joshua Hull      @joshbuddy     http://github.com/joshbuddy
How can I actually use ESI?
          Joshbuddy / rack-tamperproof
              http://github.com/joshbuddy/rack-tamperproof




Joshua Hull                     @joshbuddy                   http://github.com/joshbuddy
How can I actually use ESI?
          Joshbuddy / rack-tamperproof
              http://github.com/joshbuddy/rack-tamperproof
                  use Rack::Tamperproof(:default_key => "123u9ew90uqn") do
                    delete_for :just_delete_this
                    exception_for :don_t_tamper
                  end

                  # delete_for cookies will delete if they are tampered
                  #   with and your request passes through normally
                  #
                  # exception_for produces an exception if the cookie
                  #   is tampered with




Joshua Hull                        @joshbuddy                         http://github.com/joshbuddy
Problems!




Joshua Hull   @joshbuddy   http://github.com/joshbuddy
Problems!
        Specification can be vague
        Implementations support different features
        Spackle doesn’t have tests




Joshua Hull             @joshbuddy          http://github.com/joshbuddy
Questions




Joshua Hull    @joshbuddy   http://github.com/joshbuddy

More Related Content

Recently uploaded

Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFMichael Gough
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Mark Simos
 

Recently uploaded (20)

Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDF
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

To the Edge of Web Performance and Beyond

  • 1. To the Edge of Web Performance and Beyond Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 2. Preamble Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 3. Preamble Joshua Hull @joshbuddy http://github.com/joshbuddy joshbuddy@gmail.com (not switching to Python) Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 4. Preamble m e ! lo a d o w n D http://www.slideshare.net/joshbuddy/to-the-edge-of-web-performance-and-beyond Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 5. To the Edge of Web Performance and Beyond Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 6. To the Edge of Web Performance and Beyond Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 7. To the Edge of Web Performance and Beyond (with solutions!) Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 8. ESI Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 9. ESI Edge Side Includes Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 10. ESI Edge Side Includes (not the origin) (not only includes) Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 11. ESI Edge http://www.w3.org/Icons/w3c_icon.svg Side Includes 18/07/09 8:46 AM Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 12. ESI Edge Side Includes <esi:include src="http://www.example.com/new_user.html"/> Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 13. ESI Your caching is probably evil What does this ESI you speak of look like? How can I actually use ESI? Problems! Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 14. Your caching is probably evil Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 15. Your caching is probably evil Fast Fast Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 16. Your caching is probably evil (incorrect) Correct Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 17. Your caching is probably evil Caching is great Caching really sucks Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 18. Your caching is probably evil Caching is great Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 19. Your caching is probably evil Caching is great <html> <head> <title> My Page </head> </title Cache > <body> This pa ge rock </body> s. </html> Hard work Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 20. Your caching is probably evil Caching is great Everything is peachy Cache Cache Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 21. Your caching is probably evil Victory? Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 22. Your caching is probably evil Caching really sucks Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 23. Your caching is probably evil Caching really sucks Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 24. Your caching is probably evil Caching really sucks Expensive DB call Expensive filesystem magic Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 25. Your caching is probably evil User-specific Caching really sucks Result of web service DB intensive Other work ? Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 26. Your caching is probably evil Caching really sucks Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 27. Your caching is probably evil Caching really sucks 1 4 0er v ic es webs Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 28. Your caching is probably evil Fragment caching Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 29. Your caching is probably evil Fragment caching <html> <head> <title>My Page</title> </head> <body> <% cache do('my_fragment') %> This fragment rocks. <% end %> </body> </html> Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 30. Your caching is probably evil Fragment caching <html> <head> <title>My Page</title> is this </head> Who <body> ents’ <% cache do('my_fragment') %> fragm This fragment rocks. ller? <% end %> ontro </body> c </html> Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 31. Your caching is probably evil Fragment caching “Kitchen Sink” controllers MainController HomepageController NotAResourceController Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 32. Your caching is probably evil Fragment caching “Kitchen Sink” controllers MainController HomepageController NotAResourceController Bake controller logic Do a lot of extra logic into your fragments in your controller Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 33. Your caching is probably evil Fragment caching “Kitchen Sink” controllers MainController HomepageController NotAResourceController Bake controller logic Do a lot of extra logic into your fragments in your controller Not correct Not fast Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 34. Your caching is probably evil Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 35. Your caching is probably evil http://upload.wikimedia.org/wikipedia/en/8/8b/Akamai_logo.svg 18/07/09 8:44 AM Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 36. Your caching is probably evil http://upload.wikimedia.org/wikipedia/en/8/8b/Akamai_logo.svg 18/07/09 8:44 AM A web page = A bunch of resources + a bit of logic Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 37. Your caching is probably evil http://upload.wikimedia.org/wikipedia/en/8/8b/Akamai_logo.svg 18/07/09 8:44 AM A web page = A bunch of resources + a bit of logic E S I http://www.w3.org/TR/esi-lang Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 38. What does this ESI you speak of look like? Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 39. What does this ESI you speak of look like? include try vars choose Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 40. What does this ESI you speak of look like? include <esi:include src="URI" alt="URI" onerror="continue" /> Examples <esi:include src="/header" /> <esi:include src="/header" alt="/alternate-header" /> <esi:include src="/header" alt="/alternate-header" onerror="continue" /> Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 41. What does this ESI you speak of look like? try <esi:try> <esi:attempt> ... </esi:attempt> <esi:otherwise> ... </esi:otherwise> </esi:try> Example <esi:try> <esi:attempt> <esi:include src="/my-resource"/> </esi:attempt> <esi:except>This is bad</esi:except> </esi:try> Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 42. What does this ESI you speak of look like? choose <esi:choose> <esi:when test=”...”> ... </esi:when> <esi:otherwise> ... </esi:otherwise> </esi:choose> Example <html><body> <esi:choose> <esi:when test="$(HTTP_ACCEPT_LANGUAGE{ja})">I speak Japanese</esi:when> </esi:choose> <esi:otherwise> I don't speak it, sorry bout that. </esi:otherwise> </body></html> Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 43. What does this ESI you speak of look like? vars <esi:vars>...</esi:vars> Examples <esi:vars><img src="http://www.example.com/$(QUERY_STRING{greet})/hello.gif"/ ></esi:vars> <esi:vars>Your ID is $(HTTP_COOKIE{id})</esi:vars> Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 44. What does this ESI you speak of look like? variable substitution HTTP_ACCEPT_LANGUAGE Set (da, en-gb, en) HTTP_COOKIE Hash HTTP_HOST String HTTP_REFERER String HTTP_USER_AGENT Hash (os, version, browser) QUERY_STRING Hash Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 45. What does this ESI you speak of look like? other bits ==, !=, <, >, <=, >= Comparison ! Unary negation & Logical and | Logical or Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 46. How can I actually use ESI? Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 47. How can I actually use ESI? Solutions! Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 48. How can I actually use ESI? Actual working implementations Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 49. How can I actually use ESI? Taf2 / nginx-esi http://github.com/taf2/nginx-esi Taf2 / mongrel-esi http://github.com/taf2/mongrel-esi Qerub / rack-esi http://github.com/Qerub/rack-esi Varnish http://varnish.projects.linpro.no/ Joshbuddy / esi-for-rack http://varnish.projects.linpro.no/ Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 50. How can I actually use ESI? Taf2 / nginx-esi http://github.com/taf2/nginx-esi Taf2 / mongrel-esi A nd http://github.com/taf2/mongrel-esi ba bly Qerub / rack-esi pro re! http://github.com/Qerub/rack-esi mo Varnish http://varnish.projects.linpro.no/ Joshbuddy / esi-for-rack http://varnish.projects.linpro.no/ Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 51. How can I actually use ESI? Easy to work with Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 52. How can I actually use ESI? Joshbuddy / spackle http://github.com/joshbuddy/spackle Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 53. How can I actually use ESI? Joshbuddy / spackle http://github.com/joshbuddy/spackle Controller esi(:user_bar, :path => ":variable/$(HTTP_COOKIE{esi-cookie})", :binds => [:cookie]) do |esi_params| render :text => "variable is #{params[:variable]}, cookie is #{params[:cookie]}" end Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 54. How can I actually use ESI? Joshbuddy / spackle http://github.com/joshbuddy/spackle Controller esi(:user_bar, :path => ":variable/$(HTTP_COOKIE{esi-cookie})", :binds => [:cookie]) do |esi_params| render :text => "variable is #{params[:variable]}, cookie is #{params[:cookie]}" end def user_bar # setup ... user_bar_body end def user_bar_body # your block end Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 55. How can I actually use ESI? Joshbuddy / spackle http://github.com/joshbuddy/spackle View <%=esi_include(:user_bar, :test => "testing") %> <% esi_try do %> <% esi_attempt do %> <%=esi_include(:user_bar, :test => "testing") %> <% end %> <% end %> <% esi_include do %> <%=esi_src(:user_bar, 'testing') %> <%=esi_alt("http://www.slashdot.org/") %> <% end %> Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 56. How can I actually use ESI? Security Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 57. How can I actually use ESI? Joshbuddy / rack-tamperproof http://github.com/joshbuddy/rack-tamperproof Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 58. How can I actually use ESI? Joshbuddy / rack-tamperproof http://github.com/joshbuddy/rack-tamperproof use Rack::Tamperproof(:default_key => "123u9ew90uqn") do delete_for :just_delete_this exception_for :don_t_tamper end # delete_for cookies will delete if they are tampered # with and your request passes through normally # # exception_for produces an exception if the cookie # is tampered with Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 59. Problems! Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 60. Problems! Specification can be vague Implementations support different features Spackle doesn’t have tests Joshua Hull @joshbuddy http://github.com/joshbuddy
  • 61. Questions Joshua Hull @joshbuddy http://github.com/joshbuddy