Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Why I hate Caching. And the Things I'm Trying t...

Why I hate Caching. And the Things I'm Trying to do to Change it.

Ivayr Farah Netto

September 24, 2015
Tweet

More Decks by Ivayr Farah Netto

Other Decks in Technology

Transcript

  1. WHY I HATE CACHING AND THE THINGS I'M TRYING TO

    DO TO CHANGE IT @nettofarah 1 / 65
  2. IFTTT Millions of Users Website (desktop & mobile) 8 Apps

    (IF & DO) Billions of Requests and Transactions every day 5 / 65
  3. What if I told you That some times looking up

    memcached could be slower than performing a lookup in your database 37 / 65
  4. Search Engines (SOLR, ElasticSearch) Try and understand how indexes are

    constructed. When commit operations are performed, analyze your indexes at write and read time. 44 / 65
  5. class Person include Kashmir def initialize(name, age) @name = name

    @age = age end representations do rep :name rep :age end end Person.new('Netto Farah', 27).represent(:name, :age) => {:name=>"Netto Farah", :age=>"27"} 54 / 65
  6. class Recipe < OpenStruct include Kashmir representations do rep(:title) rep(:chef)

    end end class Chef < OpenStruct include Kashmir representations do rep(:name) end end netto = Chef.new( name: 'Netto Farah' ) beef_stew = Recipe.new( title: 'Beef Stew', chef: netto ) beef_stew.represent( :title, { :chef => :name } ) => { :title => "Beef Stew", :chef => { :name => 'Netto Farah' } } 55 / 65
  7. Chef.all.each do |chef| chef.recipes.to_a end SELECT * FROM chefs SELECT

    "recipes".* FROM "recipes" WHERE "recipes"."chef_id" = 1 SELECT "recipes".* FROM "recipes" WHERE "recipes"."chef_id" = 2 ... SELECT "recipes".* FROM "recipes" WHERE "recipes"."chef_id" = N 61 / 65