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

Developer Productivity in Cookpad

Developer Productivity in Cookpad

クックパッドはなぜ開発しやすいのか

At AWS Summit Tokyo 2015 Developer Conference
2015/06/03

Issei Naruta

June 03, 2015
Tweet

More Decks by Issei Naruta

Other Decks in Technology

Transcript

  1. '# ຊ൪%# ։ൃ%# ։ൃऀ .Z42- .Z42- NZTRMEVNQ ( # ։ൃऀͷ୭͔͕ؾ͕޲͍ͨ࣌ʹ

    ຊ൪μϯϓσʔλ͔Β։ൃ DB Λߋ৽ ʢ൒೥ʹ1౓͘Β͍ʣ d
  2. ' ' ' # # # ຊ൪%# ։ൃ%# NBTUFS TMBWF

    SFBE X SJUF ։ൃऀ .Z42- .Z42- ݱࡏ ։ൃऀ͸ৗʹຊ൪ͷ࠷৽σʔλ͕ೖͬͨDBͰ։ൃ
  3. JE OBNF  ΧϨʔ  ͔Β͋͛  ೑͡Ό͕ JE OBNF

     ΧϨʔ  ͔Β͋͛  ೑͡Ό͕  ͦ͹ '# ຊ൪%# ։ൃ%# */4&35 ϨϓϦέʔγϣϯ  ϥʔϝϯ ௨ৗɺslave ʹॻ͖ࠐΜͰ͠·͏ͱ AUTO_INCREMENT ͍ͯ͠Δ id ͕িಥ͢Δ
  4. JE OBNF  ΧϨʔ  ͔Β͋͛  ೑͡Ό͕ JE OBNF

     ΧϨʔ  ͔Β͋͛  ೑͡Ό͕  ͦ͹  ͏ͲΜ  ੜᇙম͖ '# ຊ൪%# ։ൃ%# */4&35 ϨϓϦέʔγϣϯ AUTO_INCREMENT ʹڊେͳΦϑηοτΛઃఆ͢Δ͜ͱͰ ຊ൪ͱিಥ͠ʹ͘͘͢Δ  ϥʔϝϯ
  5. JE OBNF  ΧϨʔ  ͔Β͋͛  ೑͡Ό͕ JE OBNF

     ΧϨʔ  ͔Β͋͛  ೑͡Ό͕  ͦ͹  ͏ͲΜ  ੜᇙম͖ ຊ൪%# ։ൃ%# εςʔτϝϯτϕʔε ϨϓϦέʔγϣϯ ࠷৽ͷ݅Λʮম೑ʯʹมߋ UPDATE recipes SET name=‘ম೑’ ORDER BY id DESC LIMIT 1 ম೑ ম೑ εςʔτϝϯτϕʔεϨϓϦέʔγϣϯͰ͸ ։ൃ DB ͷσʔλ͕յΕ΍͍͢
  6. JE OBNF  ΧϨʔ  ͔Β͋͛  ೑͡Ό͕ JE OBNF

     ΧϨʔ  ͔Β͋͛  ೑͡Ό͕  ͦ͹  ͏ͲΜ  ੜᇙম͖ ຊ൪%# ։ൃ%# ߦϕʔε ϨϓϦέʔγϣϯ ࠷৽ͷ݅Λʮম೑ʯʹมߋ UPDATE recipes SET name=‘ম೑’ ORDER BY id DESC LIMIT 1 ম೑ ম೑ ߦϕʔεϨϓϦέʔγϣϯʹ͢Δ͜ͱͰ ։ൃ DB ͷσʔλ͕յΕʹ͘ͳΔ
  7. ' ' ' # # # ຊ൪%# ։ൃ%# NBTUFS TMBWF

    SFBE X SJUF ։ൃऀ .Z42- .Z42- ։ൃऀ͸ৗʹຊ൪ͷ࠷৽σʔλ͕ೖͬͨDBͰ։ൃ
  8. ϕʔλػೳͷ6OJU طଘͷ$POUSPMMFSͷίʔυ " # Chanko Ͱ͸ɺUnit ͱ͍͏ϑΝΠϧʹϕʔλػೳͷϩδοΫΛهड़͢Δ invoke ৚݅Λຬͨͨ͠৔߹ʹɺطଘϩδοΫ (A)

    ͷ୅ΘΓʹ Unit (B) ͕࣮ߦ͞ΕΔ B ͕ྫ֎Λىͨ͜͠৔߹͸ɺݩͷ A ͕࣮ߦ͞ΕΔͨΊɺϢʔβʹ͸Τϥʔ͕ฦΒͳ͍ JOWPLF৚݅
  9. $IBOLPͷӡ༻ঢ়گ 2011: Chanko ϦϦʔε + ಋೖ 2015: 200+ Chanko Units

    • εςʔδϯά༻ͷαʔό͸ଘࡏ͢Δ͕ɺར༻ස౓͸௿͍ • ։ൃதͷ΋ͷΛຊ൪ʹग़͢จԽ͕Ͱ͖͍ͯΔ
  10. // / / TMBWF TMBWF XPSLFS XPSLFS XPSLFS ʜ /

    ʜ ʜ ʜ / / / / NBTUFS ////ʜ
  11. DYMBSHF DYMBSHF DYMBSHF ˺ ˺ DYMBSHF DYMBSHF DYMBSHF ˺ ˺

    Ұ൪ίετύϑΥʔϚϯε͕͍͍
 ΠϯελϯεΛࣗಈతʹબ୒
  12. ϑΥʔϧττϨϥϯε ͍͔ʹͯ͠GBJM͠ʹ͍͘$*ʹ͢Δ͔ ·Εʹࣦഊ͢ΔFYBNQMFʹରͯ͠ɿ ۭ͍͍ͯΔ worker Ͱࣗಈతʹ࠶࣮ߦ
 Ұ౓Ͱ΋ success ͢Ε͹ success

    ͱͯ͠ѻ͏ 4QPU*OTUBODFͷࣗಈγϟοτμ΢ϯʹରͯ͠ɿ ଞͷ worker Ͱࣗಈతʹ࠶࣮ߦ ผλΠϓͷΠϯελϯεΛىಈ͠࠶࣮ߦ
  13. / / / / / / / / $*͕௨ͬͨϦϏδϣϯͷUBSCBMM͸ શ୆͕ৗʹࣗಈͰQVMM͍ͯ͠Δ

    ʢ͜ͷ࣌఺Ͱ͸·ͩຊ൪ͷίʔυ͸੾ΓସΘ͍ͬͯͳ͍ʣ /