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

Hono v4

Yusuke Wada
February 09, 2024

Hono v4

YAPC::Hiroshima 2024 前夜祭
Feb 9, 2024. Yusuke Wada

Yusuke Wada

February 09, 2024
Tweet

More Decks by Yusuke Wada

Other Decks in Programming

Transcript

  1. )POPW
    :"1$)JSPTIJNBલ໷ࡇ
    'FC :VTVLF8BEB

    View full-size slide

  2. ࣗݾ঺հ
    w :VTVLF8BEB
    w 8FCGSBNFXPSLEFWFMPQFS
    w %FWFMPQFS"EWPDBUF!$MPVE
    fl
    BSF
    w #PLFUFDPGPVOEFS
    w $SFBUPSPG)POP
    w IUUQTHJUIVCDPNZVTVLFCF

    View full-size slide

  3. ࠓ೔ͷτϐοΫ
    )POPͷݱঢ়
    7FSTJPOʹ͍ͭͯ
    )POPͷ։ൃʹ͍ͭͯ

    View full-size slide

  4. )POPͱ͸ʁ
    w ͲΜͳ+BWB4DSJQUͷϥϯλΠϜͰ΋ಈ͘8FCϑϨʔϜϫʔΫ
    w 'BTU -JHIUXFJHIU 8FCTUBOEBSET
    w 8PSLTPOʜ
    w $MPVE
    fl
    BSF8PSLFST1BHFT
    w %FOP
    w #VO
    w /PEFKT
    w 'BTUMZ$PNQVUF
    w "84-BNCEB
    w 7FSDFM
    w 0UIFST
    IUUQTIPOPEFW

    View full-size slide

  5. )POPͷಛ௃
    w খ͍͞ίΞIPOPUJOZ,#NJOJ
    fi
    FE
    w ϛυϧ΢ΣΞͱϔϧύʔͰػೳ௥Ճ
    w ڧྗͳܕγεςϜ31$NPEF
    w ૊ΈࠐΈͷ+49͕͋ΔIPOPKTY
    w ࠷ۙ$44JO+4 9
    ͕Ͱ͖ͨIPOPDTT

    View full-size slide

  6. ࠷৽όʔδϣϯ
    W
    ೥೥͔Β࡞Γग़ͯ͠೥ͪΐ͍

    View full-size slide

  7. ⭐4UBS)JTUPSZ
    :"1$)JSPTIJNB
    ,
    :"1$,ZPUP
    ,
    :"1$+BQBO0OMJOF
    ,

    View full-size slide

  8. )POPͱ:"1$
    :"1$+BQBO0OMJOF :"1$,ZPUP
    W 4UBST
    W4UBST

    View full-size slide

  9. 8IPJTVTJOH)POP
    w DEOKT"1*4FSWFS
    w %FOP%PDT
    w 6MUSB
    w $MPVE
    fl
    BSF
    w 8PSLFST4%,
    w 1SJTNB
    w 8BLV
    w 6OLFZ
    w %SJWMZ
    w 4UJD"*
    w 4LJMM4USVDL
    w 3FFKT
    w UPEEMF
    w -BOEFS-BC
    w 0QFO4UBUVT
    w -PHMJC
    w 6TF4DSBQFS
    w SFQFBUEFW
    w /PEFDSBGU
    w )XZ
    w 6OLFZ
    w "*-4
    w &YQFO4FF
    w 7PDT
    w (PFOT
    w 5SJHHFSEFW
    w /05")05&-
    w $ZCFS"HFOU
    w "*TIJGU
    w 1BSUZ,JU
    w "[VMF
    w 0OMJOF0S/PU
    w 0UIFST
    ͨ͘͞Μʂ

    View full-size slide

  10. lIPOP&YQSFTTPS,0"z
    w #Z$PMJO.D%POOFMM$SFBUPSPG;PE %FWFMPQFS"EWPDBUFBU#VO
    #VOJTIFSF

    View full-size slide

  11. l%PO`UVTF&YQSFTT VTF)POPz
    w #Z3ZBO%BIM $SFBUPSPG/PEFKT %FOP

    View full-size slide

  12. l&YQSFTJTUIFOFX+2VFSZz
    w #Z#FO)PMNFT1SFTJEFOUPG8IJUFCPBSETBU"TUSP

    View full-size slide

  13. ͪͳΈʹ
    )POPͷ޷͖ͳϛυϧ΢ΣΞ͸ʜ

    View full-size slide

  14. +493FOEFSFS.JEEMFXBSF

    View full-size slide

  15. )POPͰ͸૊ΈࠐΈͷ+49
    IPOPKTY͕࢖͑Δ
    ͦͷϨΠΞ΢τΛ૊Ή࣌ʹศརͳϛυϧ΢ΣΞ

    View full-size slide

  16. 3FOEFSFSΛఆٛ

    View full-size slide

  17. ϛυϧ΢ΣΞͱͯ͠ొ࿥ͯ͠ɺDSFOEFSͰඳը

    View full-size slide

  18. TUSFBNΦϓγϣϯ
    3FTQPOTF͕ετϦʔϜʹͳΔ

    View full-size slide

  19. αʔόʔαΠυ4VTQFOTF
    ඵ଴ͭඇಉظίϯϙʔωϯτ

    View full-size slide

  20. Ҏ্ɺ)POPͷݱࡏ
    ͷঢ়گͰͨ͠

    View full-size slide

  21. ϝδϟʔόʔδϣϯΞοϓ͸͍ͭͩͬͨʁ
    wW
    wW
    wW
    wWXIFO

    View full-size slide

  22. 5IF9EBZJT5PEBZ

    View full-size slide

  23. ϦϦʔε͠·ͨ͠
    🎉🎉🎉🎉🎉🎉🎉

    View full-size slide

  24. ͜ΕͰW͕ೖΓ·͢

    View full-size slide

  25. Wͷ໨ۄػೳͭΛ
    ঺հ͠·͢

    View full-size slide

  26. 4UBUJD4JUF(FOFSBUJPO
    $MJFOU$PNQPOFOUT
    'JMFCBTFE3PVUJOH

    View full-size slide

  27. 4UBUJD4JUF(FOFSBUJPO

    View full-size slide

  28. 44()FMQFSͱ#VOͱ%FOPͷΞμϓλʔ
    w )POPΞϓϦ͔Β੩తͳ)5.-Λॻ͖ग़͢
    #Z!XBUBOZEFW

    View full-size slide

  29. 44()FMQFSͷ࢖͍ํ̍
    CVJMEUT

    View full-size slide

  30. 44()FMQFSͷ࢖͍ํ̎
    #VOͷ৔߹
    CVJMEUT

    View full-size slide

  31. 44()FMQFSͷ࢖͍ํ̏
    ࣮ߦ

    View full-size slide

  32. 44()FMQFSͷ࢖͍ํ̐
    )5.-͕Ͱ͖ͯΔ

    View full-size slide

  33. 44()FMQFSͷ࢖͍ํ̑
    ͦͷ··$MPVE
    fl
    BSF1BHFT΁σϓϩΠ

    View full-size slide

  34. 7JUF1MVHJO
    w !IPOPWJUFTTHΛ࡞ͬͨ
    w !IPOPWJUFEFWTFSWFSͱ૊Έ߹ΘͤΔͱ։ൃʙϏϧυʙσϓ
    ϩΠ͕ϊϯετοϓͰ͖Δ
    ։ൃαʔόʔΛ্ཱͪ͛Δ Ϗϧυ͢Δ σϓϩΠ͢Δ

    View full-size slide

  35. ͜Ε͸ഒ଎ɺͱ͸͍͑଎͍

    View full-size slide

  36. $MJFOU$PNQPOFOUT

    View full-size slide

  37. )POPͷ+49ͷྺ࢙̍
    w αʔόʔαΠυͷςϯϓϨʔτΤϯδϯͱͯ͠.VTUBDIFΛ࢖͍ͬͯͨ
    w ଞʹ΋ཉ͍͕͠΄ͱΜͲͷςϯϓϨʔτΤϯδϯ͸FWBMGTʹґଘ͢Δ
    w NJDSPUFNQMBUFKT.JEEMFXBSFΛݕ౼͕ͨ͠ʜ
    lNJDSPUFNQMBUFKTNJEEMFXBSFz
    ʮ+49ͷγϯλοΫεͰ)5.-Λฦͤ͹ςϯϓϨʔτΤϯδϯͷ୅ସʹͳΔͷͰ͸ʁʯ
    DPNNFOUCZ!VTVBMPNB

    View full-size slide

  38. )POPͷ+49ͷྺ࢙̎
    w αʔόʔαΠυͰͷΈ࣮ߦ͞ΕΔ͜ͱΛ૝ఆͨ͠+49࣮૷
    w ೥݄ʹ͸΋͏ग़͍ͯͨ
    w WͰ.VTUBDIF.JEEMFXBSF͸ഇࢭ
    lGFBUKTYNJEEMFXBSFz CZ!ZVTVLFCF

    View full-size slide

  39. )POPͷ+49ͷྺ࢙̏
    w +49Λจࣈྻͱͯ͠ѻ͑Δ
    w 3FBDUͷSFOEFS5P4USJOH
    Λ૬౰Λ͠ͳͯ͘΋͍͍ͷͰαʔόʔͱ૬ੑ͕͍͍
    w ʮߴ଎ͳαʔόʔαΠυ+49ʯͱͯ͠)5.9΍"MQJOFKTͱ࢖͏ਓ΋૿͑ͨ
    ͜ͷίʔυ͸࣮ࡍʹಈ͘
    )5.-ͷλάͰΠϯλϥΫγϣϯΛ௥ՃͰ͖Δ

    View full-size slide

  40. ʮ)POPͷ+49͸αʔόʔαΠυ͚ͩͰ͍͍ʯ
    ͦ͏ࢥ͍ͬͯ·͕ͨ͠ʜ

    View full-size slide

  41. αʔόʔαΠυIPOPKTYͱΫϥΠΞϯτ+4ͷ૬ੑͷѱ͞
    w ΠϯλϥΫγϣϯΛ଍͢खஈ
    w ૉͰ+BWB4DSJQUΛॻ͘ˡ΍Γͨ͘ͳ͍
    w )5.9΍"MQJOFKTͳͲΛ࢖͏ˡࠓͷͱ͜ΖελοΫʹͳͬͯΔ͕ࣗ෼Ͱ
    +BWB4DSJQUΛॻ͖ͨ͘ͳΔ͕࣌͋Δ
    w 3FBDU΍1SFBDUΛϋΠυϨʔτ͢Δˡ+49͕ࠞ͟ΔͷͭΒ͍

    View full-size slide

  42. ͔͔ͤͬͩ͘ΒΫϥΠϯτ΋
    IPOPKTYͰॻ͖͍ͨ

    View full-size slide

  43. $MJFOU$PNQPOFOUT஀ੜ
    #Z!VTVBMPNB
    $MJFOU$PNQPOFOUTIPOPKTYEPNͷ࣮૷͕࢝·Δ

    View full-size slide

  44. $MJFOU$PNQPOFOUTIPOPKTYEPN
    w 3FBDUͱಉ͡ίʔυ͕ಈ͘ʂ

    View full-size slide

  45. ΄Μͱʹಈ͘
    w ͜ΕΛ7JUFͰ্ཱͪ͛Ε͹Χ΢ϯλʔ͕ಈ͘

    View full-size slide

  46. ͘͢͝ͳ͍Ͱ͔͢ʁ

    View full-size slide

  47. IPOPKTYEPNͷϑοΫ
    w VTF$POUFYU
    w VTF&GGFDU
    w VTF4UBUF
    w VTF$BMMCBDL
    w VTF
    w TUBSU5SBOTJUJPO
    w VTF%FGFSSFE7BMVF
    w VTF.FNP
    w VTF-BZPVU&GGFDU
    w .FNP
    w JT7BMJE&MFNFOU
    w VTF%FGFSSFE7BMVF
    w VTF7JFX5SBOTJUJPO
    3FBDUͱಉ͡Α͏ͳ࢖͍৺஍

    View full-size slide

  48. !VTVBMPNB͞Μ͕΄ͱΜͲ
    ͻͱΓͰ࣮૷ͨ͠

    View full-size slide

  49. ʮԶͨͪ͸3FBDUΛงғؾͰ࣮૷͍ͯ͠Δʯ
    IUUQTUXJUUFSDPNVTVBMPNBTUBUVT

    View full-size slide

  50. !VTVBMPNB͞Μ͍͢͝

    View full-size slide

  51. ΊͪΌͪ͘Όখ͍͞
    w ʮ%0.ͷΈʯઐ༻ͷখ͍͞+49ϥϯλΠϜ͕͋Δ
    w UTDPO
    fi
    HKTPOͳͲͰࢦఆ͢Δ
    w αʔόʔͰ͸IPOPKTYɺΫϥΠΞϯτͰ͸IPOPKTYEPNΛ࢖͑Δ

    View full-size slide

  52. IPOPKTYEPN,#
    w Χ΢ϯλʔͷྫ͸#SPUMJѹॖͰ,#

    View full-size slide

  53. ΤσΟλ։͘ͱ͜Ε͚ͩ

    View full-size slide

  54. 3FBDU,#
    w SFBDUSFBDUEPNͩͱΧ΢ϯλʔͷྫ͸#SPUMJѹॖͰ,#

    View full-size slide

  55. ͜ΕͰαʔόʔ΋ΫϥΠΞϯτͰ΋ಈ͘
    w খͯ͘͞଎͍3FBDUͷαϒηοτ
    w 'VODUJPO$PNQPOFOUT͚ͩͰ$MBTT$PNQPOFOUT͸࣮૷ͯ͠ͳ͍
    w *TMBOETΞʔΩςΫνϟΛલఏͱͨ͠΋ͷ
    w ʮαʔόʔͰϨϯμϦϯάͨ͠)5.-ʹϋΠυϨʔτͯ͠ίϯϙʔωϯτ
    Λಈ͔͢ʯ
    w $44JO+4ͷIPOPDTT΋͋ΔͷͰ6*͕ͻͱͱ͓Γ࡞ΕΔ

    View full-size slide

  56. ͜ΕͰ໾ऀ͕ἧͬͨ
    wͭͷϧʔλʔ
    w)POP&YQSFTT
    w31$NPEFU31$
    wIPOPKTY3FBDU
    wIPOPDTTTUZMFEDPNQPOFOUT
    w44()FMQFS/FYUKT(BUTCZ"TUSP
    w'JMFCBTFE3PVUJOH /FYUKT
    ϑϧελοΫࣗ࡞ͨ͠ʂ

    View full-size slide

  57. 'JMFCBTFE3PVUJOH

    View full-size slide

  58. AIPOPAͱ͸
    ผύοέʔδͰఏڙ

    View full-size slide

  59. IUUQTHJUIVCDPNIPOPKTIPOPY

    View full-size slide

  60. ࠓ͙͢ࢼͤ·͢

    View full-size slide

  61. )POP9͸)POPͱ7JUF ։ൃ؀ڥɺόϯυϥ
    Λ
    ૊Έ߹ΘͤͨϝλϑϨʔϜϫʔΫ
    ϑΝΠϧϕʔεͷϧʔςΟϯάؔ৺ࣄΛΘ͚ͯΞϓϦέʔγϣϯΛ࡞Ε·͢ɻ
    ଎͍443)POPͷ͓͔͛ͰαʔόʔαΠυͰͱͯ΋଎͘ϨϯμϦϯά͞Ε·
    ͢ɻ
    #:03#SJOH:PVS0XO3FOEFSFSIPOPKTY͚ͩͰ͸ͳ͘ଞͷ6*ϥΠϒϥΠΛ
    ࢖ͬͨϨϯμϥʔΛ࢖͑·͢ɻ
    *TMBOETϋΠυϨʔγϣϯ΋͠ΠϯλϥΫγϣϯ͕ཉ͚͠Ε͹ɺ*TMBOEΛ࡞Ε
    ͹ɺ͚ͦͩ͜ΫϥΠϯτͷ+BWB4DSJQU͕஫ೖ͞Ε·͢ɻ
    ϛυϧ΢ΣΞ)POPͦͷ΋ͷͱͯ͠ಈ͘ͷͰɺ)POPͷϛυϧ΢ΣΞ͕ͦͷ·
    ·࢖͑·͢ɻ

    View full-size slide

  62. ϑΝΠϧϕʔεϧʔςΟϯά
    w BQQSPVUFTʹஔ͍ͨϑΝΠϧύεʹԠͯ͡ϧʔςΟϯά͞ΕΔ

    View full-size slide

  63. 3PVUFϑΝΠϧ
    w )POPͷ )BOEMFSc.JEEMFXBSF
    <>ΛFYQPSU͢Δ
    )POPͷ
    $POUFYUΦϒδΣΫτ
    1045ΛϋϯυϦϯά
    جຊతʹDSFOEFS
    Ͱ)5.-Λฦ͢
    ͭ·Γ
    3FTQPOTFΦϒδΣΫτ

    View full-size slide

  64. #:03#SJOH:PVS0XO3FOEFSFS
    w ϨϯμϥʔΛࣗ෼Ͱॻ͚ΔBQQSPVUFT@SFOEFSFSUTYʹஔ͘ͱదԠ͞ΕΔ
    w 3FBDUɺ1SFBDUɺ4PMJEͳͲͷ6*ϥΠϒϥϦʹ΋ରԠͰ͖Δ
    IPOPKTYΛ࢖ͬͨϨϯμϥʔ

    View full-size slide

  65. *TMBOETϋΠυϨʔγϣϯ
    w BQQJTMBOETҎԼʹஔ͍ͨίϯϙʔωϯτΛJNQPSU͢ΔͱΫϥΠϯτίʔυ͕ϋΠυ
    Ϩʔτ͞ΕΔ

    View full-size slide

  66. *TMBOETͷ$PVOUFSΛJNQPSUͯ͠࢖͏
    BQQSPVUFTJOEFYUTY
    αʔόʔαΠυ
    ΫϥΠΞϯταΠυ
    w Χ΢ϯλʔͷ6*ΛIPOPKTY͕αʔόʔ
    αΠυϨϯμϦϯά
    w Χ΢ϯλʔͷ6*ΛΠϯλϥΫγϣϯࠐΈ
    Ͱ443ͨ͠৔ॴ΁ϋΠυϨʔτ

    View full-size slide

  67. ϛυϧ΢ΣΞ
    w )POPͷ ͨ͘͞Μͷ
    ϛυϧ΢ΣΞ͕ͦͷ··࢖͑Δ

    View full-size slide

  68. σϓϩΠ
    w ࠓͷͱ͜Ζ$MPVE
    fl
    BSF1BHFTΛਪ঑ɺ8SBOHMFSͰσϓϩΠ
    w 443ɺ44(ͲͪΒͰ΋͍͚Δ
    443
    ΫϥΠΞϯτͷ+BWB4DSJQU΋
    ઃఆͰॻ͖ग़ͤΔ
    44(

    View full-size slide

  69. ͦͷଞ͍Ζ͍Ζ
    w !IPOPWJUFEFWTFSWFS͕$MPVE
    fl
    BSFͷ#JOEJOHTΛΤϛϡϨʔτ͢Δ
    w 7JUFͳͷͰ޻෉࣍ୈͰ5BJMXJOE$44΍.%9͕࢖͑Δ
    w IPOPKTYͷ+493FOEFSFS͸/FTUFE-BZPVUTʹରԠ͢Δ
    w 7JUFࣗମɺ7JUFΛ$MPVE
    fl
    BSFΛ૊Έ߹Θͤͨ΋ͷͷ%9͸ΑΓΑ͘ͳΔ
    ͭ·Γ͍Ζ͍ΖͰ͖Δʂ

    View full-size slide

  70. Ҏ্ɺ̏ͭͷ৽ػೳ
    4UBUJD4JUF(FOFSBUJPO
    $MJFOU$PNQPOFOUT
    'JMFCBTFE3PVUJOH
    ϑϧελοΫ΁

    View full-size slide

  71. )POPͷ։ൃ
    ʹ͍ͭͯ

    View full-size slide

  72. ΨϯΨϯ͍͘ελΠϧ
    w ͨ͘͞ΜͷϥϯλΠϜɺͨ͘͞ΜͷػೳˠϢʔβʔ΁ͷ઀఺Λ૿΍͢
    w Ϣʔβʔ਺͕૿΍ͯ͠ίΞͷΫΦϦςΟΛ͋͛Δ
    w ίΞͷখ͘͞Ωʔϓͨ͠··ػೳΛ௥ՃͰ͖Δϛυϧ΢ΣΞɺϔϧύʔ
    w ίϯτϦϏϡʔλʔʹதֶੜ͕̏ਓ͍ΔˠதֶੜʹେਓؾͷϑϨʔϜϫʔΫʂ

    View full-size slide

  73. զʑ͕WͰ΍Γ͍ͨ͜ͱ

    View full-size slide

  74. )POPͰ΍Γ͍ͨͷ͸/FYUKT͕
    3FBDUͱ͍͏ϑϩϯτΤϯυͷจ຺
    ͔Βग़͖ͯͨͷʹରͯ͠ɺզʑ͸
    αʔόʔαΠυ͔Β&YQSFTTͷ୅ସ
    ͱͯ͠8FC4UBOEBSETΛ෢ثʹԥ
    Δͱ͍͏νϟϨϯδͰ͋Δɻ
    IUUQTYDPNZVTVLFCFTUBUVT

    View full-size slide

  75. &YQSFTTΛஔ͖׵͑ͯ
    /FYUKTʹ௥͍ͭ͘

    View full-size slide

  76. Ҏ্
    )POPͷݱঢ়
    Wʹ͍ͭͯ
    )POPͷ։ൃʹ͍ͭͯ

    View full-size slide