Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥

Hatena Blog Development Flow

Hatena Blog Development Flow

はてなブログの開発フロー
YAPC ASIA Tokyo 2013 で発表したものです

Yasuhiro Onishi

September 21, 2013
Tweet

More Decks by Yasuhiro Onishi

Other Decks in Technology

Transcript

  1. ϒϩάάϧʔϓͰɺ͸ͯͳεϖʔεͱ࿈ܞͯ͠ܝࣔ൘ΛઃஔͰ͖ΔΑ͏ʹ͠·ͨ͠ϒϩάͷίϝϯτ Λɺ͸ͯͳ*%Λࢦఆͯ͠ڋ൱Ͱ͖ΔΑ͏ʹ͠·ͨ͠εϚʔτϑΥϯJ1BEͰ΋ॻ͖΍͘͢ɺಡΈ΍͢ ͍ʂJ04ΞϓϦΛϢχόʔαϧΞϓϦԽ͠·ͨ͠'MJDLS͔Βͷը૾ͷݕࡧͱషΓ෇͚ʹରԠ͠·͠ ͨιʔείʔυΛ؆୯ʹڞ༗͠Α͏ʂ(JTU͔ΒͷషΓ෇͚ʹରԠ͠·ͨ͠Πϥ ετɾϚϯΨ࡞඼Λϒϩάʹ౤ߘ͠Α͏ʂQJYJW͔ΒͷషΓ෇͚ʹରԠ͠·ͨ͠͸ͯͳϒϩά"UPN1VC"1*Λެ ։͠·ͨ͠ɻαʔυύʔςΟͷϒϩά౤ߘπʔϧΛར༻ɾ࡞੒Ͱ͖·͢هࣄΛॻ͖ͳ͕ΒදࣔΛ֬ ೝʂฤूը໘ʹϦΞϧλΠϜϓϨϏϡʔػೳΛ௥Ճ͠·ͨ͠ϒϩάάϧʔϓʹࢀՃ͢Δࡍʹɺهࣄ ͷΧςΰϦʔΛࢦఆͰ͖ΔΑ͏ʹ͠·ͨ͠ϔομϝχϡʔΛϦχϡʔΞϧʂϒϩάΛॻ͘ͱ͖΋ಡΉ ͱ͖ʹ΋ศརʹͳΓ·͓ͨ͠ֆඳ͖ػೳΛύϫʔΞοϓʂʮಁ໌ϖϯʯʮృΓͭͿ͠ʯʮεϙΠ τʯΛ௥Ճ͠·ͨ͠ಈըͷషΓ෇͚ΛڧԽʂχίχίಈըͱ*OTUBHSBNಈըʹରԠ͠·ͨ͠

    ίϝϯτཝͳͲͰχοΫωʔϜΛදࣔɺϦϯΫϘλϯͰλΠτϧΛࣗಈऔಘɺͳͲͷػೳ௥ՃΛߦ͍· ͨ͠ϒϩάͰ؆୯ͳֆΛॻ͜͏ʂฤूαΠυόʔʹʮ͓ֆඳ͖ػೳʯΛ௥Ճ͠·ͨ͠ ฤूը໘ʹʮҾ༻ʯϘλϯΛ௥Ճɺஶ໊ਓϒϩάϖʔδΛެ։ɺ΄͔ϒϩάͰ஥ؒΛݟ͚ͭΑ ͏ʂ͸ͯͳϒϩάάϧʔϓΛެ։͠·ͨ͠5VNCMSͰڞ༗͠΍͘͢ͳͬͨ΄͔ɺଟ͘ͷػೳ௥Ճɾ मਖ਼Λߦ͍·ͨ͠.5ܗࣜͷϒϩάΠϯϙʔτʹରԠʂ͸ͯͳ֎ͷαʔϏε͔ΒҠߦ͠΍͘͢ͳΓ· ͨ͠ʮ-*/&ͰૹΔʯ΄͔ɺ͍͔ͭ͘ͷػೳ௥Ճɾमਖ਼Λߦ͍·ͨ͠σβΠϯς ʔϚςʔϚετΞΛ͞ΒʹڧԽͨ͠΄͔ɺԼॻ͖ҰཡͳͲΛ௥Ճ͠·͓ͨ͠଴ͨͤ͠·ͨ͠ɻ͸ͯ ͳϒϩάͱ͸ͯͳμΠΞϦʔͷશυϝΠϯͰ5XJUUFS$BSETʹରԠ͠·ͨ͠௕͍ϒϩά΋εοΩϦ ͱදࣔɻهࣄΛ෼ׂ͢Δʮଓ͖ΛಡΉʯه๏ΛϦϦʔε͠·ͨ͠͸ͯͳϒϩά͕5XJUUFS$BSETʹ ରԠ͠·ͨ͠ɻπΠʔτͰهࣄͷ֓ཁ͕දࣔ͞Ε·͢ʦ௥ه͋Γʧʦ࠶௥ه͋Γඒຯ͍͠৘ใΛϒϩ άʹʂฤूαΠυόʔ͔ΒϨετϥϯΛ঺հͰ͖ΔΑ͏ʹ͠·ͨ͠σβΠϯςʔϚςʔϚετΞΛ ڧԽʂͦͷ΄͔ଟ਺ͷػೳ௥Ճɾमਖ਼Λߦ͍·ͨ͠εϚʔτϑΥϯεϚϗͷฤूπʔϧόʔ͕ύϫ ʔΞοϓʂషΓ෇͚ػೳͰɺ͸ͯͳ5γϟπΛ΋Β͓͏ʂʂهࣄ͝ͱͷϒοΫϚʔΫ਺΍͍͍Ͷʂ ΛɺτοϓϖʔδͰ΋֬ೝͰ͖ΔΑ͏ʹ͠·ͨ͠σβΠϯςʔϚϒϩά͸΋ͬͱՄѪ͘ͳͪ͘Όʂ ެࣜσβΠϯςʔϚʹʮ#,6."ʯΛ௥Ճ͠·ͨ͠τϐοΫ͍·੝Γ্͕ͬͯΔ͋ͷ࿩୊ʹࢀՃ͠ Α͏ʂʮτϐοΫʯϖʔδΛϦϦʔε͠·ͨ͠σβΠϯςʔϚΦϦδφϧͷςʔϚΛڞ༗͠Α͏ʂ ि࿈ଓ ৽ػೳ ϦϦʔε
  2. PO

  3.  *TTVFొ࿥  ΞαΠϯ13  ϨϏϡʔґཔ  ϨϏϡʔத  ϦϦʔε଴ͪ

     TUBUJOHNBTUFS  NBTUFS ϦϦʔε ϥϕϧͰ ؅ཧ
  4. 18:25 hitode909: https://... ஶ໊࿮ʹΤϯδχΞΛ௥Ճ ͜ΕϦϦʔε͍͍ͯ͠Ͱ͔͢ > onishi 18:26 onishi ϦϦʔε͓Ͷ͕͍͠·͢

    > hitode909 18:30 hitode909: https://... ஶ໊࿮ʹΤϯδχΞΛ௥Ճ ϦϦʔε͠·ͨ͠ > #diary 18:31 hitode909: https://... ஶ໊࿮ʹΤϯδχΞΛ௥Ճ ຊ൪֬ೝ͓ئ͍͠·͢ > hitode909
  5. 18:25 hitode909: https://... ஶ໊࿮ʹΤϯδχΞΛ௥Ճ ͜ΕϦϦʔε͍͍ͯ͠Ͱ͔͢ > onishi 18:26 onishi ϦϦʔε͓Ͷ͕͍͠·͢

    > hitode909 18:30 hitode909: https://... ஶ໊࿮ʹΤϯδχΞΛ௥Ճ ϦϦʔε͠·ͨ͠ > #diary 18:31 hitode909: https://... ஶ໊࿮ʹΤϯδχΞΛ௥Ճ ຊ൪֬ೝ͓ئ͍͠·͢ > hitode909 ίϐϖ ίϐϖ ίϐϖ
  6. location / { proxy_set_header Host $http_host; set $upstream_socket ""; rewrite_by_lua

    ' local m = ngx.re.match( ngx.var.host, "^([^.]+[.]dev)[.]" ) if m then ngx.var.upstream_socket = "/tmp/"..m[1]..".sock" else ngx.exit(ngx.HTTP_NOT_FOUND) end '; proxy_pass http://unix:$upstream_socket; }