mruby in HTTP server

mruby in HTTP server

2b692bd83f4418103142a053ecf5ff59?s=128

MATSUMOTO Ryosuke

September 26, 2015
Tweet

Transcript

  1. 2.

    ࣗݾ঺հ  দຊ྄հ!NBUTVNPUPSZ  (.0ϖύϘٕज़ج൫νʔϜΞυόϯευγχΞ  ෱Ԭࢧࣾ೥݄ೖࣾ  ΋ͱ΋ͱ͸ӡ༻ɾอकͷۀ຿͕த৺ 

    ݱࡏ͸ձࣾશମͷΠϯλʔωοτج൫ٕज़Λ୲౰  044׆ಈ΍ࣾ֎޲͚ͷٕज़ൃදͳͲ  IUUQSFTFBSDINBUTVNPUPSKQ 
  2. 4.
  3. 11.

    )551ͷ՝୊  ଟॏੑ͕ແ͍  355ʢ3PVOE5SJQ5JNFʣͰϦΫΤετϨεϙϯε  )551ύΠϓϥΠϯͷ࣮༻Խ͕ࠔ೉  355ͰϨεϙϯεΛ଴ͨͣʹෳ਺ϦΫΤετૹ৴ 

    ϦΫΤετͱϨεϙϯεͷॱং͸ಉظ͢Δඞཁ༗Γ  ͱ͋ΔϦΫΤετॲཧ͕஗͍ͱ݁ہޙଓ͕ϒϩοΫ  ϦΫΤετͷ࠶ૹ৴ʢಛʹ1045ͱ͔ʣͷ൑அ͕ࠔ೉  όά΋ଟ͘ඇඪ४ͷΦϓγϣϯѻ͍͕ଟ͍ 
  4. 13.

    )551ʢ3'$ʣ  355Ͱޮ཰ྑ͘σʔλΛ௨৴  ௨৴σʔλ͸ʮϑϨʔϜʯΛར༻  ʮετϦʔϜʯ্ʹʮϑϨʔϜʯ͕ྲྀΕΔ  ୯Ұ5$1ηογϣϯ্ʹଟॏͷʮετϦʔϜʯ 

    ಉ࣌ʹҎ্ͷϦΫΤετʢϑϨʔϜʣΛૹ৴Մೳ  ଟॏԽʹΑͬͯϨΠςϯγͷӨڹΛ௿ݮ  ϦΫΤετॲཧ͕ϒϩοΫ͞Εͳ͍ͷͰଟॏԽʹΑΓଳ ҬΛޮ཰తʹ࢖͍΍͘͢ͳΔ 
  5. 14.

    ୅දతͳ)551αʔό  )0  !LB[VIP͞Μ࡞ͷ5IF0QUJNJ[FE)551BOE)5514FSWFS  OHIUUQYʢͦͷଞϥΠϒϥϦɾπʔϧ܈Λ·ͱΊͯOHIUUQʣ  !UBUTVIJSP@U͞Μ࡞ͷ)551ϦϑΝϨϯε࣮૷ɺαʔό΍ϥΠϒϥϦ 

    όοΫΤϯυͱ)551௨৴͕Մೳʢݱঢ়͸།Ұʁʣ  "QBDIFIUUQE NPE@I  MJCOHIUUQΛར༻ɺ࣍ͷܥͷϦϦʔεͰऔΓࠐ·ΕΔʁ  OHJOYWXJUI)551  WͰ044ͱͯ͠ϦϦʔε  5SVTUFSE)5514FSWFS  !NBUTVNPUPSZ࡞Ͱ୅දతͰ͸ແ͍ɺMJCOHIUUQΛར༻ 
  6. 17.

    ୔ࢁ͋ΔͷͰ͕͢ʜ  ຊൃදͰ͸ҎԼͷͭʹݴٴ  αʔόϓογϡ  ༏ઌ౓੍ޚ  ୔ࢁಛ௃͕͋ΔͷͰৄ͘͠͸ԼهεϥΠυࢀߟ 

    !LB[VIP͞Μͷʮ)551࣌୅ͷ΢ΣϒαΠτઃܭʯ  IUUQZBQDBTJBPSHUBMLTIPX EFBECFBEDEDB  !+YDL͞Μͷʮ)551࣌୅ͷ8FCʯ  IUUQZBQDBTJBPSHUBMLTIPXFBF GCFBBCEDB 
  7. 23.

    όοΫΤϯυ)551͕αʔόϓογϡ  ϑϩϯτ)551αʔόʹ-JOLϔομͰαʔόϓογϡΛґཔ  ϑϩϯτଆͰόοΫΤϯυ΁ͷసૹલʹ௚઀αʔόϓογϡ΋Մೳ ΫϥΠΞϯτ )551 ϦόʔεϓϩΩγ )551 όοΫΤϯυ

    )551௨৴ )551௨৴ -JOLϔομ௥Ճ -JOLJOEFYKTSFMQSFMPBE ϦΫΤετసૹ JOEFYUYUΛϦΫΤετ Ϩεϙϯεసૹ JOEFYKTΛαʔόϓογϡ JOEFYUYUΛ Ϩεϙϯε 
  8. 24.

    όοΫΤϯυ)551͕αʔόϓογϡ  ݱঢ়͸OHIUUQYͷΈ͕όοΫΤϯυͱͷ)551௨৴ʹରԠ  ݱঢ়͸)551Ͱ΋όοΫΤϯυ͔Βͷ-JOLϔομΛར༻ͨ͠αʔόϓογϡ  ࠓޙόοΫΤϯυ͔Βͷ164)@130.*4&Λసૹ͢ΔՄೳੑ΋͋Δʁ  ϗοϓؒͷ4&55*/(4ΛͲ͏͢Δ͔౳՝୊͸৭ʑ͋Δ ΫϥΠΞϯτ

    )551 ϦόʔεϓϩΩγ OHIUUQY )551 όοΫΤϯυ )551௨৴ )551௨৴ -JOLϔομ௥Ճ -JOLJOEFYKTSFMQSFMPBE ϦΫΤετసૹ JOEFYUYUΛϦΫΤετ Ϩεϙϯεసૹ JOEFYKTΛαʔόϓογϡ JOEFYUYUΛ Ϩεϙϯε 
  9. 32.

    ࣮૷໘ͰؾΛ͚͍ͭͯΔࣄ  ϋΠύϑΥʔϚϯε  ΦʔόʔϔουʹͳΓʹ͍͘  ϝϞϦ͕୯ௐ૿Ճ͠ͳ͍Α͏ʹ͢Δ  ֶशίετΛݮΒ͢ 

    γϯϓϧͳΫϥεͱϝιουɾ౷Ұ࢓༷  ػೳ֦ு͸Ͱ͖Δ͚ͩNSCHFN˞ ˞$3VCZͷHFNʹ͋ͨΔNSVCZͷϞδϡʔϧ 
  10. 33.

    ϋΠύϑΥʔϚϯε  NSVCZΛ࠾༻ͯ͠ੑೳ໘ͱੜ࢈ੑΛཱ྆  +*4ن֨ʹ४ڌͨ͠࢓༷ʹΑΓܰྔ  ࣄલʹόΠτίʔυʹ͓ͯ͘͠ͱߴ଎ʹಈ࡞  3VCZίʔυͷෳ਺ճ࣮ߦͰ͸ܰྔͳΠϯλ ϓϦλ͕଎౓ʹ΋ޮ͍ͯ͘Δ

     ৄ͘͠͸࿦จͰ˞ ˞দຊ྄հɾԬ෦णஉ NPE@NSVCZɿεΫϦϓτݴޠͰߴ଎͔ͭলϝϞϦʹ֦ுՄೳͳ8FCαʔόͷػೳ֦ ுࢧԉػߏ ৘ใॲཧֶձ࿦จࢽ 7PM /P QQ ೥݄
  11. 46.

    NSVCZNFFUT)551  NSVCZ૊ࠐΈͷ)5514FSWFS͕ଓʑొ৔  )0ɺOHIUUQYɺ5SVTUFSE  "QBDIF΍OHJOYͷ)551αϙʔτ  NPE@NSVCZ΍OHY@NSVCZͰطʹ੍ޚՄೳ 

    ࠓޙαʔόϓογϡͷNSVCZԽʹ΋ରԠ༧ఆ  ͍ͭʹNSVCZJO)5514FSWFSͷ࣌୅͕དྷΔʁ  NPE@NSVCZ΍OHY@NSVCZ։ൃऀͱͯ͠ײ֒ਂ͍ 
  12. 59.

    େྔΞΫηεͷࣗಈ੍ޚ ˞  ϗετ୯ҐͰ੍ޚ  ϑΝΠϧ୯ҐͰ੍ޚ  ʙ୯Ґ͸ࣗ༝ʹܾΊΒΕΔ  େྔΞΫηεͱݕ஌ͨ͠Β೚ҙͷ੍ޚ

     ෳࡶͳ৚݅Ͱ΋؆୯ʹॻ͚ΔΑ͏ʹ ˞!IBSBTPV lؔ੢3VCZձٞʹొஃͤͯ͞΋Βͬͨ IUUQIBSBTPVHJUIVCJPؔ੢3VCZձ ٞʹొஃͤͯ͞΋Βͬͨ ؔ੢3VCZձٞ +VMZ 
  13. 60.

    NPE@NSVCZͰ࣮૷  IUUQEPTEFUFDUPS  ೚ҙͷΞΫηεύλʔϯΛݕ஌  ݕ஌தʹ೚ҙͷॲཧΛ࣮ߦ  IUUQBDDFTTDPVOUFS 

    ೚ҙͷଐੑʢϑΝΠϧ໊ɾVJE౳ʣΛΧ΢ϯτ  Χ΢ϯτ͕ᮢ஋Λ௒͑ͨΒݕ஌  ݕ஌தʹ೚ҙͷॲཧΛ࣮ߦ 
  14. 61.

    ུ֓ਤ  IUUQEPTEFUFDUPSIUUQBDDFTTMJNJUUFS "QBDIF ਌ϓϩηε NSVCZ XPSLFS NSVCZ XPSLFS NSVCZ

    XPSLFS NSVCZ XPSLFS NSVCZ ڞ༗ϝϞϦ HMPCBMMPDL ᶄΧ΢ϯλ ΠϯΫˠॲཧˠσΫϦ MPDBMNFNDBDIF ,74 ᶃUSZ@MPDL ᶅVOMPDL 
  15. 67.
  16. 68.

    ऩ༰αʔό ऩ༰αʔό ϦόʔεϓϩΩγ %# OHY@NSVCZ MPDBMNFNDBDIF %# NSVCZ ϦόʔεϓϩΩγ UFYBNQMFKQ

    UFYBNQMFKQ UFYBNQMFKQ -# )PTUUFYBNQMFKQ ϨϓϦέʔγϣϯ %#ߋ৽͋Ε͹Ωϟογϡ࡟আ Ωϟογϡͳ͚Ε͹औಘͯ͠ΩϟογϡԽ όοΫΤϯυ৘ใऔಘ ϦόʔεϓϩΩγ ऩ༰αʔό ऩ༰αʔό
  17. 71.

    BQBDIFͱOHJOY NSVCZ ͷੑೳൺֱ SFRTFD      ૯ΞΫηε਺

              BQBDIF OHJOY NSVCZ ಉ࣌઀ଓ਺
  18. 74.

    ϝϯςφϯεը໘੾Γସ͑ ˞  WBSUNQNBJOU͕ଘࡏͨ͠Βϝϯςφϯεը໘  WBSUNQNBJOU@JHOPSF@P⒏DF͕ଘࡏͯ͠ɺ ׌ͭΞΫηεݩ͕Ͱ͋Ε͹ɺͦ͜͸ ௨ৗ௨ΓϨεϙϯε  OHJOYDPOGʹͦͷ··ίʔυΛهड़

    ˞!MBNBOPUSBNB lOHY@NSVCZΛ࢖ͬͯಛఆϗετҎ֎͔ΒͷΞΫηεΛϝϯςφϯεը໘ʹ͢Δz  IUUQMBNBOPUSBNBIBUFCMPKQFOUSZ "VH 
  19. 77.

    ಈతը૾ม׵αʔόͷ63-Ճ޻ ˞  63-ϕʔεͷಈతը૾ม׵ॲཧ  ΫϥΠΞϯτ͕উखʹը૾ม׵Ͱ͖ͳ͍ Α͏ʹ63-ͷҰ෦ΛϋογϡԽ  OHY@NSVCZͰ63-Λղੳ͠όοΫΤϯ υͷը૾ετϨʔδ΁

    ˞!ZBOP l%ZOBNJDJNBHFUSBOTGPSNBUJPOTFSWFS0LBSB#&5"z IUUQTTQFBLFSEFDLDPNZBOP EZOBNJDJNBHFUSBOTGPSNBUJPOTFSWFSPLBSBCFUB ୈҰճϖύϘςοΫΧϯϑΝϨϯε "QS 
  20. 82.

    ը૾αʔϏεͷΞΫηε੍ޚ ˞  ηογϣϯ*%ͷೝূ  NFNDBDIFEʹηογϣϯ*%อଘ  63-ϕʔεͷೝূ  *1ΞυϨεϕʔεͷೝূ

    ˞!ITCU l.JEEMFXBSFBT$PEFXJUINSVCZz IUUQXXXTMJEFTIBSFOFUITCUNJEEMFXBSFBT DPEFXJUINSVCZ 3FE%PU3VCZ$POG  +VOF 
  21. 90.
  22. 92.

    NSVCZJO)5514FSWFS  )0΍OHIUUQYΛNSVCZͰ੍ޚͯ͠)551ʢαʔόϓογϡ ౳ʣΛମݧͯ͠Έ·͠ΐ͏  5SVTUFSE΋๨Εͳ͍Ͱ͋͛ͯԼ͍͞  ͦͷ্Ͱ)551ͱ)551ͷαʔό࿈ܞΛNPE@NSVCZ΍ OHY@NSVCZͱ૊Έ߹Θͤͯઃܭͯ͠Έ·͠ΐ͏ 

    NSVCZͰ੍ޚग़དྷΔ͜ͱͷརศੑ͕ମײͰ͖Δ͔΋͠Ε·ͤΜ  ૝૾Ͱ͖ͳ͔ͬͨΑ͏ͳߴ౓ͳ࿈ܞΛࢥ͍͔ͭ͘΋͠Ε·ͤΜ  NSVCZJO)551TFSWFSΛ࢖ͬͯΑΓߴ౓ͳ8FCγεςϜΛ։ ൃ͍͖ͯ͠·͠ΐ͏ʂ