今あえて試行錯誤しながら"車輪の再発明"をする意味 / jtf2016-reinventing-the-wheel

今あえて試行錯誤しながら"車輪の再発明"をする意味 / jtf2016-reinventing-the-wheel

#jtf2016 ( http://2016.techfesta.jp/ ) にて『今あえて試行錯誤しながら"車輪の再発明"をする意味』というタイトルで発表しました。

28e154e6e0351c70091997d2f574295a?s=128

rrreeeyyy

July 25, 2016
Tweet

Transcript

  1. ࠓ͋͑ͯࢼߦࡨޡ͠ͳ͕Β "ंྠͷ࠶ൃ໌"Λ͢Δҙຯ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota

    ( @rrreeeyyy ) / Topotal 1
  2.          July

    Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 2
  3. ंྠͷ࠶ൃ໌ (reinven(ng the wheel) ंྠΛ୊ࡐʹͨ͠׳༻۟Ͱ͋Γɺ ੈքதͰ࢖ΘΕ͍ͯΔɻ ޿͘ड͚ೖΕΒΕཱ֬͞Ε͍ͯΔ ٕज़΍ղܾ๏Λ஌Βͣʹ ʢ·ͨ͸ҙਤతʹແࢹͯ͠ʣɺ ಉ༷ͷ΋ͷΛ࠶ͼҰ͔Β࡞Δ͜ͱ

    — h$ps://ja.wikipedia.org/wiki/ंྠͷ࠶ൃ໌ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 3
  4. ंྠͷ࠶ൃ໌޷͖ͳਓʁ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota (

    @rrreeeyyy ) / Topotal 4
  5. ंྠͷ࠶ൃ໌ݏ͍ͳਓʁ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota (

    @rrreeeyyy ) / Topotal 5
  6. ͳ͍ͥ·ंྠͷ࠶ൃ໌ͳͷ͔ʁ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota (

    @rrreeeyyy ) / Topotal 6
  7. എܠ 1. ΠϯϑϥΤϯδχΞ͸ϓϩτίϧɾ௿ϨΠϠͷ஌ࣝΛ࣋ͭඞཁ͕͋Δ • Infrastructure Complexity • Ճ͑ͯɺ೔໷৽͍֓͠೦ɾϓϩμΫτͳͲ͕ొ৔͢Δ 2. ΠϯϑϥΤϯδχΞ͸ίʔυ͕ॻ͚Δඞཁ͕͋Δ

    • Infrastructure as code • ΠϯϑϥͷίʔυԽ • Site Reliability Engineer • ϓϩμΫτࣗମͷίʔυϨϏϡʔͳͲ΋੹຿ͱ͍ͯ͠Δ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 7
  8. July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy

    ) / Topotal 8
  9. ͳ͍ͥ·ंྠͷ࠶ൃ໌ͳͷ͔ʁ 1. ϓϩτίϧɾ௿ϨΠϠͷཧղ͕ਂ·Δ • → ίʔυԽɾෳࡶԽ͕ਐΉࡢࠓͰඇৗʹྑ͍ษڧ๏ͱͳΔ 2. ίʔσΟϯάͷྑ͍࿅शʹͳΔ • →

    ιʔεɾ࢓༷ΛಡΈखΛಈ͔࣮ͯ͠૷·Ͱ͢ΔͷͰඇৗʹ࿅शʹͳΔ 3. ୅දతϓϩμΫτΛ࡞ΕΔՄೳੑ͕͋Δ • → ࠶ൃ໌ͨ͠΋ͷʹΞΠσΞΛՃ͑ΔࣄͰൃ໌ʹͳΓ͑Δ → ෳࡶԽɾίʔυԽ͕ਐΉࡢࠓɺΠϯϑϥΤϯδχΞʹΦεεϝͷษڧ๏ͩͱߟ͑Δ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 9
  10. Shut the fuck up and write some code? 1 1

    h$ps:/ /speakerdeck.com/mizzy/serverspec-at-j92014?slide=75 July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 10
  11. ... but How? July Tech Festa 2016 2016/07/24 - Yoshikawa

    Ryota ( @rrreeeyyy ) / Topotal 11
  12. Lv1. ࣸܦ Lv2. ंྠͷ࠶ൃ໌ Lv3. ୅දతϓϩμΫτ July Tech Festa 2016

    2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 12
  13. Lv1. ࣸܦ • ଟ͘ͷਓ͸͔͜͜Βελʔτ • ৽͘͠ϓϩάϥϛϯάΛ࢝ΊΔͱ͖ • ৽͍͠ϓϩάϥϛϯάݴޠΛ֮͑Δͱ͖ • ࣸܦ΋͋ΔҙຯͰ͸ंྠͷ࠶ൃ໌

    • ํ๏࿦ɾॻ੶ͱ΋ʹॆ࣮͍ͯͯ͠ଟ͘ͷਓ͸࣮ફͰ͖Δ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 13
  14. ࣸܦͷͦͷޙ... • ࡞Γ͍ͨ΋ͷ͕͋Δʁૉ੖Β͍͠ΞΠσΞ͕͋Δʁ • → ͥͻ࡞Γ·͠ΐ͏ʂ • → Ͱ΋ଟ͘ͷਓ͸͜͏Ͱ͸ͳ͍ •

    Α͘ฉ͘ݴ༿ • → ʮԿ΋࡞Γ͍ͨ΋ͷ͕ͳ͍...ʯ • → ंྠͷ࠶ൃ໌Λࢼͯ͠ΈΔ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 14
  15. Lv2. ंྠͷ࠶ൃ໌ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota

    ( @rrreeeyyy ) / Topotal 15
  16. Lv2. ंྠͷ࠶ൃ໌ • ϓϩάϥϛϯάͷ΍Γํ͕Կͱͳ͘෼͔͖ͬͯͨࠒ͔Β • ࣗ෼ͷษڧ͍ͨ͠ϓϩτίϧɾΞϧΰϦζϜΛ࣮૷͢Δ • ϓϩτίϧɾΞϧΰϦζϜͷษڧʹ΋ͳΓҰੴೋௗ • ࣗ෼ͷ࢖͍ͬͯΔϓϩμΫτʹࣅ͍ͯΔ΋ͷΛ࡞ͬͯΈΔ

    • Ͳ͏͍͏࣮૷ͳͷ͔ʁͲ͕͜ϘτϧωοΫʹͳΓͦ͏ͳͷ͔ʁ • ͳΜͱͳ͘૝૾Ͱ͖ΔΑ͏ʹͳΔ • ࣮ࡍʹݟͯΈΔͱ͍͢͝ίʔυ͕ॻ͍ͯ͋ͬͯษڧʹͳΔ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 16
  17. EX1. HTTP αʔόͷࣗ࡞ • HTTP ϓϩτίϧΛ஻Δ TCP αʔόΛࣗ࡞ͯ͠ΈΔ • جຊͰ͋Δ

    HTTP ϓϩτίϧΛ͔ͬ͠ΓཧղͰ͖Δ • HTTP ͱ͸Ͳ͏͍͏ϓϩτίϧͳͷ͔ʁ • Ͳ͏͍͏ϔομ͕͋ΓͲ͏͍͏໾໨͕͋Δͷ͔ʁ • Apache, Nginx ౳ͷ HTTP αʔόͷجຊతͳಈ͖΋෼͔ΔΑ͏ʹͳΔ • Apache ͱ Nginx Ͱ͸Ͳ͏͍͏ҧ͍͕͋ΓԿʹ͕ࠩͰΔͷ͔ʁͳͲ΋ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 17
  18. EX1. HTTP αʔόͷࣗ࡞ • ೉͍͔͠ͱࢥ͍͖΍ಈ͔͚ͩ͢ͳΒҙ֎ͱ؆୯ • ݴޠʹ΋ΑΔ͕ 100 ߦఔ౓͋Ε͹ϒϥ΢β͔ΒݟΕΔαʔό͕࡞ΕΔ •

    ࣮૷͢Δݴޠ͸࠷ॳ͸׳ΕͯΔݴޠɾษڧ͍ͨ͠ݴޠͰྑ͍ • ͔ͬ͠Γ࣮૷͠Α͏ͱࢥ͏ͱߋʹ৭ʑͳࣄֶ͕΂Δ • I/O (C10K ໰୊): select(), epoll() ͳͲʹ͍ͭͯͷ஌ࣝ • ֤छϔομͷৄࡉͳಈ͖: Keep-Alive, Range, Cache-Control ... • CGI ಈ࡞ͷ࢓૊Έ: CGI ͸ͲͷΑ͏ʹͯ͠ಈ࡞͍ͯ͠Δͷ͔ʁ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 18
  19. EX1. HTTP αʔόͷࣗ࡞ • HTTP ͸޿͘࢖ΘΕ͍ͯΔͷͰຊ౰ʹਖ਼͘͠ཧղͰ͖͍ͯΔͱศར • ҙ֎ͱͲ͏͍͏ϓϩτίϧɾ࣮૷ʹͳ͍ͬͯΔͷ͔෼͔Βͳ͍ਓ͸ଟ͍ • ࣗ෼Ͱ࡞ͬͨ

    HTTP αʔόͰϒϥ΢β͔Β HTML ͕ݟΕΔͱײಈ • ΠϯϑϥΤϯδχΞ͚ͩͰͳ͘ΞϓϦΤϯδχΞʹ΋Φεεϝ • ύϑΥʔϚϯεΛҙࣝͨ͠ίʔυɾHTTP ͷσόοάͳͲʹඇৗʹ໾ཱͭ • ࠷ۙຊ͕ग़͍ͯͨͷͰࢀߟʹ͢Δͱྑͦ͞͏ • ʰWebαʔόΛ࡞Γͳ͕ΒֶͿ جૅ͔ΒͷWebΞϓϦέʔγϣϯ։ൃೖ໳ʱ 2 2 h$p:/ /d.hatena.ne.jp/kmaebashi/20160605/p1 July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 19
  20. EX2. Linux ίϯςφΤϯδϯͷࣗ࡞ • Linux ͷίϯςφΤϯδϯΛࣗ࡞ͯ͠ΈΔ • Docker ͳͲͰίϯςφٕज़͕ҰൠԽ͖ͯͨ͠ •

    Docker ͸ඇৗʹڊେͳͷͰಈ͖͕෼͔ΓͮΒ͍͜ͱ΋ଟ͍ • ࣮૷͢Δ͜ͱͰதͰͲͷΑ͏ͳಈ͖ʹͳ͍ͬͯΔ͔ཧղͰ͖Δ • cgroup ΍ chroot, veth ͷΑ͏ͳٕज़΋ཧղͰ͖Δ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 20
  21. EX2. Linux ίϯςφΤϯδϯͷࣗ࡞ • ͜Ε΋೉͍͔͠ͱࢥ͍͖΍ಈ͔͚ͩ͢ͳΒҙ֎ͱ؆୯ • h#ps:/ /github.com/kazuho/jailing ͸ 200

    ߦఔ౓ͷ Perl εΫϦϓτ • Linux ίϯςφࣗମ͸େମ 10 ೥લ͙Β͍͔Β͋Δ • ࣮૷ͯ͠ΈΔͱ Docker ͸Կ͕ಛผͩͬͨͷ͔΋෼͔Δ • ٯʹ Docker ͸ԿΛ٘ਜ਼ʹͨ͠ͷ͔΋෼͔Δ • ίϯςφΤϯδϯͷࣗ࡞Λ͍ͯ͠Δਓ͸݁ߏ͍ΔͷͰࢀߟʹ͢Δͱྑͦ͞͏ • h#ps:/ /github.com/yuuki/droot ΍ h#ps:/ /github.com/haconiwa ͳͲ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 21
  22. ͦͷଞͷྫ • ݴޠॲཧܥΛ࡞ͬͯΈΔ • ϓϩϏδϣχϯάπʔϧΛ࡞ͬͯΈΔ • ϩάΠϯೝূαʔόΛ࡞ͬͯΈΔ • ؂ࢹαʔόΛ࡞ͬͯΈΔ •

    ෼ࢄγεςϜͷΞϧΰϦζϜΛ࣮૷ͯ͠ΈΔ • ... July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 22
  23. ंྠͷ࠶ൃ໌ͰಘΒΕΔ෺ • ϓϩτίϧɾ௿ϨΠϠͳͲͷීวతͰ௕͘࢖͑Δٕज़Λޮ཰Αֶ͘΂Δ • ࣅͨ΋ͷΛ࡞ΔͷͰݩͷιʔείʔυΛඞવతʹಡΉ͜ͱ͕૿͑Δ • ଞऀͷιʔείʔυΛେྔʹಡΉ͜ͱ͸ϓϩάϥϛϯά্ୡͷํ๏ͷҰͭ • Apache, Nginx,

    Docker(libcontainer) ౳ͷιʔεʹ׳ΕΔࣄ͕ग़དྷΔ • Կ͔τϥϒϧ͕͋ͬͨ࣌ʹιʔείʔυϨϕϧͰಈ࡞Λ௥͑Δ • RFC ͳͲͷ͔ͬ͠Γͨ͠࢓༷ΛݩʹιʔεΛॻ͘ܦݧ͕ग़དྷΔ • ৽͍͠࢓༷͕ެ։͞Εͨ࣌ͳͲʹ RFC ΛಡΈղ͘࿅शʹ΋ͳΔ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 23
  24. Lv3: ୅දతϓϩμΫτ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota

    ( @rrreeeyyy ) / Topotal 24
  25. ୅දతϓϩμΫτ 3 ʮΤϯδχΞͰ͋Ε͹୭Ͱ΋ͦ͏Ͱ͋ΔΑ͏ʹʯͱ͍͑Δ͜ͱͳͷ͔Ͳ͏͔͸Θ͔ Βͳ͍͕ɺʮ◦◦͞Μͱ͍͑͹□□Ͱ༗໊ʯͱ͍ΘΕΔΑ͏ͳɺ͜͜Ͱ͍͏ʮ୅දతϓ ϩμΫτʯΛ࣋ͭ͜ͱ͸ɺগͳ͘ͱ΋๻ʹͱͬͯ͸ಌΕΔͱ͜Ζͷେ͖͍΋ͷͩɻ ʮ୅දతϓϩμΫτʯͱݺ͹ΕΔʹ͸Ͳ͏͍ͬͨ৚͕݅ඞཁͳͷͩΖ͏͔ɻҎԼͷ4 ͙ͭΒ͍͕͙͢ʹࢥ͍ු͔ͿɻͦΕͳΓͷن໛ͷ΋ͷɺ޿͘࢖ΘΕΔ΋ͷɺٕज़త ৽نੑͷ͋Δ΋ͷɺ࡞ऀݸਓΛڧ͘૝ىͤ͞Δ΋ͷɻ্ه4ͭΛඞͣ͠΋͢΂ͯຬͨ ͍ͯ͠Δඞཁ͸ͳ͍͔΋͠Εͳ͍͕ɺຬ͍ͨͯ͠Δํ͕ΑΓʮ୅දੑʯ͕ߴ͔Ζ͏ ͜ͱ͕૝૾Ͱ͖Δɻ

    3 h$p:/ /kentaro.tumblr.com/post/66674445339/୅දతϓϩμΫτʹ͍ͭͯ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 25
  26. ंྠͷ࠶ൃ໌ + ΞΠσΞ = ୅දతϓϩμΫτ? • ंྠͷ࠶ൃ໌͸ࣗ਎ͷΞΠσΞΛՃ͑ΔࣄͰൃ໌ͨΓ͑Δ • ࡞ͬͨιϑτ΢ΣΞʹݩͷιϑτ΢ΣΞͱͷࠩ෼ΛՃ͑Δ •

    ex. طଘͷιϑτ΢ΣΞͷෆຬ఺Λղܾ͍ͯ͠Δ • ex. σϓϩΠ΍ӡ༻͕طଘͷιϑτ΢ΣΞΑΓ؆୯ʹͳ͍ͬͯΔ • Ճ͑Δ΂͖ΞΠσΞ͸࡞͍ͬͯΔ͏ͪʹݟ͑ͯ͘Δ͜ͱ΋ଟ͍ • ंྠͷ࠶ൃ໌Λ͍ͯ͠Δ͏ͪʹର৅υϝΠϯͷਂ͍஌͕ࣝಘΒΕΔͨΊ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 26
  27. ंྠͷ࠶ൃ໌ + ΞΠσΞͷྫ • ந৅Խ͗ͣ͢͠ಛఆͷن໛ɾυϝΠϯΛର৅ʹಛԽͯ͠ΈΔ • ࣗ෼ͷ૊৫ͷن໛ʹඞཁͳ෼͚ͩந৅Խ͢ΔΑ͏ʹ͢Δ • ॻ͖௚͢ͳΒ "ͲͷݴޠͰॻ͖௚͢ͷ͔ʁ"

    ͸݁ߏॏཁ • ݴޠͷಛੑ͝ͱʹ޲͍ͯΔɾ޲͍͍ͯͳ͍͕͋Δ • ϫϯόΠφϦͰσϓϩΠ͍ͨ͠ʁDSL Λ࡞Γ͍ͨʁ • ϢʔβΠϯλϑΣʔεͷߟ͑ํ΋݁ߏॏཁ • Ͳ͏͍͏ઃఆϑΝΠϧʹ͢Δ͔ʁ૝ఆӡ༻ϑϩʔ͸Ͳ͏͢Δ͔ʁ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 27
  28. ंྠͷ࠶ൃ໌ + ΞΠσΞͷྫ • Linux ίϯςφΤϯδϯ͸ෳࡶ͗͢Δ͜ͱ͕ଟ͍ • ࣗ෼ͷ૊৫ͷن໛ʹ࠷దԽͨ͠෦෼ͷΈΛ࣮૷͢Δํ਑ 4 •

    طଘͷπʔϧΛ Go ݴޠͰॻ͖௚͢ • ϫϯόΠφϦͰಈ͘ͷͰΫϥΠΞϯτπʔϧͳΒಋೖোน͕Լ͕Δ • ฒྻॲཧ͕࣮૷͠΍͍͢ͷͰ଎౓໘Ͱͷར఺΋ಘΒΕΔՄೳੑ͕͋Δ • ઃఆϑΝΠϧ΍ࣗಈԽ͕೉͍͠πʔϧΛ CRuby/mruby ͳͲͷݴޠͰ࣮૷ͯ͠ΈΔ • DSL ΋࡞Γ΍͘͢ Web ΤϯδχΞ΋Α͘࢖͏ݴޠͳͷͰड͚ೖΕΒΕ΍͘͢ͳΔ 4 h$p:/ /blog.yuuk.io/entry/diy-container July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 28
  29. ൃ໌Ξϯνύλʔϯ(ݏΘΕΔंྠͷ࠶ൃ໌)ͷྫ • طଘͷ෺ͷྼԽ඼Λ࡞ͬͯϓϩμΫγϣϯʹೖΕͯ͠·͏ • ϓϩμΫγϣϯʹೖΕΔͳΒطଘͷ෺ͱͷࠩ͸Կ͔ʁΛͪΌΜͱҙࣝ͢Δ • ͪΌΜͱઆ໌ग़དྷΔΑ͏ʹ͓ͯ͘͠ • υΩϡϝϯτͳͲͰͪΌΜͱ࢒͢Α͏ʹ͓ͯ͘͠ •

    طଘͷ෺ͷमਖ਼Ͱे෼ࡁΉͷʹ৽͍͠෺Λ࡞ͬͯಋೖͯ͠͠·͏ • ಋೖࡁΈͷ΋ͷͰमਖ਼ͰࡁΉͳΒमਖ਼͠·͠ΐ͏ • → ࣗ෼ͷൃ໌ʹ͢Δʹ͸࡞Ζ͏ͱ͍ͯ͠Δର৅ྖҬͷਂ͍஌ݟ͕ඞཁ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 29
  30. ·ͱΊ • ίʔσΟϯάͷ࿅शͷखஈͱͯ͠ंྠͷ࠶ൃ໌Λ঺հ • ௿ϨΠϠɾϓϩτίϧͷཧղɾϓϩάϥϛϯάͷྑ͍࿅शʹͳΔ • ंྠͷ࠶ൃ໌͔Βֶ΂Δࣄʹ͍ͭͯྫΛަ͑ͯ঺հ • ௿ϨΠϠɾϓϩτίϧͳͲ΁ͷਂ͍ཧղ •

    ࢓༷΍࣮ࡍͷڍಈ͔Β࣮૷·Ͱམͱ͠ࠐΊΔ࣮૷ྗ • ࣗ෼ͷυϝΠϯͰͷ஌ࣝɾܦݧΛՃ͑ΔࣄͰ୅දతϓϩμΫτʹ΋ͳΓ͑Δ • ͥͻ JTF2016 ͷςʔϚͰ͋Δ "΍ͬͯΈͨ" ଆʹͳͬͯΈ͍ͯͩ͘͞ • Shut the fuck up and write some code! July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 30
  31. Any ques)ons? July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota

    ( @rrreeeyyy ) / Topotal 31
  32. ࢀߟࢿྉ • https://speakerdeck.com/mizzy/serverspec-at-jtf2014 • http://d.hatena.ne.jp/kmaebashi/20160605/p1 • https://github.com/kazuho/jailing • https://github.com/yuuki/droot •

    https://github.com/haconiwa/haconiwa • http://blog.yuuk.io/entry/diy-container • http://kentaro.tumblr.com/post/66674445339/୅දతϓϩμΫτʹ͍ͭͯ • https://github.com/peco/peco July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 32
  33. ࣭ٙԠ౴༻εϥΠυ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota (

    @rrreeeyyy ) / Topotal 33
  34. Ϟνϕʔγϣϯͷҡ࣋ • ंྠͷ࠶ൃ໌Ͱ͸Ϟνϕʔγϣϯ͕ଓ͔ͳ͍ʁ • Ϟνϕʔγϣϯͷҡ࣋͸ਓͦΕͧΕ΍Γํ͕ҧ͏ • ΋ͷΛ࡞ͬͯಈ͔͢͜ͱࣗମʹָ͠ΈΛײ͡Δਓ • ंྠͷ࠶ൃ໌͸݁ߏ޲͍ͯΔ͔΋ʁ •

    ୅දతϓϩμΫτΛ࡞Δ͜ͱʹເΛײ͡Δਓ • ंྠͷ࠶ൃ໌͸݁ߏ޲͍ͯΔ͔΋ʁ • ࣗ෼ͷͨ͠ܦݧɾ࣋ͬͯΔ஌ࣝΛ൓өͰ͖Δ͔࣍ୈ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 34
  35. ࡞Βͳͯ͘΋෼͔Δͱ͍͏ਓ͸Ͳ͏͢Ε͹ʁ • ΋ͪΖΜͦͷ௨Γ • શͯͷษڧ͍ͨ͜͠ͱΛ࠶࣮૷͍ͯͨ͠Β͕࣌ؒ଍Γͳ͍ • ࣗ෼ͷ 1 ͭͷಛԽ͍ͨ͠ࣄ߲͙Β͍͸࣮૷Λܦݧ͓ͯ͘͠΂͖ •

    ࡞Δ͜ͱͰॳΊͯ෼͔ͬͯ͘Δࣄ΋͋Δͱࢥ͍ͬͯΔ • ࢖͏ଆ͔Β࡞Δଆ΁ͷస׵΋কདྷతʹ͸ٻΊΒΕΔͱࢥ͍ͬͯΔ • ࡞Βͳͯ͘΋෼͔Δ͙Β͍ݡ͍ਓ͸ͲΜͲΜ࡞ͬͯެ։͍ͯͩ͘͠͞ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 35
  36. ௿ϨΠϠɾϓϩτίϧͷ஌ࣝ͸ͳͥॏཁ͔ʁ • ͍ΘΏΔπʔϧͱ͍͏΋ͷ͸ҠΓมΘΓ͕ܹ͍͠ • πʔϧͷ࢖͍ํ͚ͩ௥͍ͬͯ͘ͱຊ࣭Λཧղ͢Δલʹ࣌ؒ੾ΕʹͳΔ • ͱ͸͍͑جຊతͳͱ͜Ζ͸ಉ͡(ྫ. HTTP ϓϩτίϧ) •

    ϓϩτίϧ΍௿ϨΠϠͷ஌ࣝ͸ීวతʹ௕͘࢖͑Δ • ௿ϨΠϠͷγεςϜίʔϧͳͲ͸େ͖͘มԽ͢Δ͜ͱ͸গͳ͍ • ϓϩτίϧ͸઴ਐతʹਐԽ͢Δ͜ͱ΋͋Δ • HTTP 1.0 -> HTTP 1.1 -> HTTP 2.0 • ϓϩτίϧͷ࢓༷ΛಡΉྗɾಡΜͰ࣮૷͢Δྗ͸͍ͭͰ΋ඞཁ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 36
  37. ंྠͷ࠶ൃ໌ͷ࣌ؒ؅ཧʹ͍ͭͯ • Q. • ࠶։ൃ͠Α͏ͱ͢Δͱͣͬͱग़དྷΔ • HTTP ϓϩτίϧશ෦࣮૷͖͠Δ·Ͱ... • A.

    • εϞʔϧΰʔϧΛܾΊΔ • HTTP αʔόͰ͋Ε͹Ұ୴ϒϥ΢βͰݟΕΔ·Ͱ • ͲΜͲΜཁ݅Λ૿΍͍ͯ͘͠ͷ͸݁ߏ໘ന͍ • ͭ͗͸͜ͷϔομ...͜ͷϔομ • ษڧ͍ͨ͠ྖҬʹΑ࣮ͬͯ૷Λ૿΍͍͚ͯ͠͹ྑ͍ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 37
  38. Ͳ͏΍ͬͯ࢓ࣄʹೖΕΔ͔ • Q. • ͍͟ϓϩμΫγϣϯʹೖΕΔͱ͖Ͳ͏ೖΕ͍͔ͯ͘ʁ • A. • ૊৫ɾνʔϜͷ߹ҙΛऔ͔ͬͯΒ࢓ࣄʹೖΕ͍ͯ͘ •

    શؔ͘܎ͳ͍ษڧͷίʔυΛ࢓ࣄͰͣͬͱॻ͘ͷ͸ม • ͜͏͍͏ٕज़͕ඞཁͰษڧ͢Δඞཁ͕͋Δ • ͜͏͍͏πʔϧΛ࢖ͬͯطଘΑΓ͜͏ྑ͍ͷͰ࢓ࣄͰॻ͖͍ͨ • ͜Ε͕૊৫ɾνʔϜͰ߹ҙग़དྷͯॳΊͯ࢓ࣄͰग़དྷΔͱࢥ͏ • ษڧ͕ग़དྷͨΓଞ࣮ࣾ੷ͳͲʹͱΒΘΕͳ͍Ͱग़དྷΔ૊৫ͩͱ͍͍Ͱ͢Ͷ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 38