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

iQONを支えるクローラー/iQON Crawler

iQONを支えるクローラー/iQON Crawler

IVS CTO Night & Day Spring 2015 のLTで発表した内容です /VASILY @kyuns

Masayuki Imamura

June 17, 2015
Tweet

More Decks by Masayuki Imamura

Other Decks in Programming

Transcript

  1. ࠓଜխ޾ @kyuns / Ωϡϯ VASILY,Inc औక໾CTO / Co-Founder 2006೥ʹYahoo!JAPANʹ৽ଔೖࣾ Yahoo!FASHIONɺXBRANDͳͲͷϝσΟΞͷ্ཱͪ͛

    2009೥ʹಠཱɺVASILYΛ૑ۀɺऔక໾CTOʹब೚ ޷͖ͳ"84αʔϏε͸4޷͖ͳ੠༏͸ਫथಸʑ
  2. ΧςΰϦ൑ఆͷࣗಈԽ w ͋ΒΏΔϑΝογϣϯ༻ޠΛ໢ཏͨ͠
 ϑΝογϣϯʹಛԽͨࣙ͠ॻΛੜ੒   w &$αΠτͷλΠτϧɺઆ໌จɺͺΜͣ͘Ϧετ͔ΒεςοϓΛܦͯ൑ఆ
 จ຺ͷ൑ఆͳͲ΋ߦ͍ͬͯΔ
 ྫʮΊͪΌͪ͘Ό͔Θ͍͍όοάʂεΧʔτʹ΋͋͏ʂʯ౳ͷઆ໌จͷ৔߹͸εΧʔ

    τʹޡ൑ఆ͠ͳ͍Α͏ͳจ຺Λҙࣝͨ͠ॲཧʣ w ͷ঎඼͸্هεςοϓ͔Β൑ఆͰ͖Δ w ϓϧΦʔόʔͱ͔5γϟπʹ΋ϒϥ΢εʹ΋෼ྨͰ͖ͯ͠·͏
 αΠτ͝ͱʹ΋ఆ͕ٛҧͬͨΓ͢Δ w ࢒Γͷෳࡶͳ΋ͷ͸ػցֶशʹ͔͚ͯ൑ఆ
  3. w %JTUSJCVUFE-PDLXJUI3FEJT %-. IUUQSFEJTJPUPQJDTEJTUMPDL w ಠࣗʹ࣌ݶ෇͖෼ࢄϩοΫSFEJTEJTUNVUFYΛ։ൃ WBTJMZKQSFEJTEJTUNVUFY  w ٕज़ϒϩάIUUQUFDIWBTJMZKQDSBXMTJUFTXJUISFEJTEJTUNVUFY

    w αΠτͷϨεϙϯεੑೳʹؔ܎ͳ͘ҰఆִؒͰޮ཰తʹΫϩʔϧͰ͖Δ Resque (fetch) Fetch worker &$4JUF Dist Mutex Resque (process) Fetch worker Fetch worker Sender 1.enqueue 2.dequeue 3.try_lock 4.get DB 5.save 6.enqueue