Slide 1

Slide 1 text

F#1'ͱ͔͍͏ࠓྲྀߦͬͯΔ΍ͭ 6DIJP,POEP(.01FQBCP *OD 4IJOKVLVST 3VTUͰ࡞Δ-JOVYτϨʔα 1IPUPCZ)FSCFSU#JFTFSIUUQTQJYBCBZDPNJNBHFTJE

Slide 2

Slide 2 text

γχΞɾϓϦϯγύϧΤϯδχΞ ۙ౻ Ӊஐ࿕ / @udzura https://blog.udzura.jp/ Uchio Kondo ٕज़෦ ٕज़ج൫νʔϜ @ GMOϖύϘ / ෱Ԭ ΤϯδχΞΧϑΣʢ෱Ԭࢢ੺ẂנจԽձؗʣ αϙʔλʔ Duolingo Diamond Leaguer 💎 #Rust #Ruby #mruby #Containers #eBPF #CRIU #Seccomp #RubyKaigi #CloudNativeDays #Zumba #γϨϯ #FitBoxing2

Slide 3

Slide 3 text

ࠓճ࿩͢΋ͷҎ֎ʹ࡞ͬͨ΋ͷ •octx wίϚϯυҰൃͰࡶʹ(JU)VCͷBDUJWJUZΛ$47ʹͯ͘͠ΕΔ΍ͭ ͦͷ··#JH2VFSZͰϩʔυՄೳɻ wPDUPDSBC SFRXFTU UPLJP

Slide 4

Slide 4 text

5P$ w࡞Ζ͏ͱ͍ͯ͠Δπʔϧͷ࿩ wF#1'ͱ͸ wࠓࠓͰ͖͍ͯΔ΋ͷ wMJCCQGSTͷ࢖͍ํ w3VTUͰΑ͔ͬͨ఺

Slide 5

Slide 5 text

F#1'

Slide 6

Slide 6 text

F#1' wFYUFOEFE#FSLMFZ1BLFU'JMUFS w೥͔Β-JOVYͰಋೖʢݩͷ࣮૷͸-JOVYͰ͸͔Βʣ wMJCQDBQͰ࢖ΘΕ͍͕ͯͨɺTFDDPNQ΍ͦͷଞΧʔωϧػೳͰར༻ w-JOVYΧʔωϧ಺෦Ͱಈ͘ϓϩάϥϜΛɺϢʔβϥϯυͰهड़ wػೳʹ੍ݶ͕͋ΓɺϑΟϧλϦϯά΍ूܭ͕ओͳ໾ׂ wৄࡉ͸ʮ͓͍ͯͭ͘͠Α͘ͳΔF#1'ʯͰݕࡧ

Slide 7

Slide 7 text

F#1'ʹΑΔτϨʔα wF#1'ͷେ͖ͳ༻్ͷҰͭʹɺΧʔωϧ಺෦Ͱͷؔ਺ݺͼग़͠΍ ੩తͳΠϕϯτͳͲΛτϨʔε͠ɺूܭ͢Δ͜ͱ͕͋Δɻ w#4%4PMBSJTͰ͍͏%5SBDF wCQGUSBDFίϚϯυ΍ #$$ #1'$PNQJMFS$PMMFDUJPO ͷ։ൃ IUUQXXXCSFOEBOHSFHHDPNCMPHCQGQFSGPSNBODFUPPMTCPPLIUNM

Slide 8

Slide 8 text

#1'$03& wͦΕ·Ͱͷ#1'πʔϧ͸ɺͦͷ৔Ͱ#1'ϓϩάϥϜΛੜ੒ɺίϯύΠ ϧ͢ΔͳͲʢॊೈͰ͸͋Δ͕ʣΦʔόʔϔου͕͋ͬͨɻ wͦͷ݁Ռɺಈ࡞ʹDMBOHόΠφϦ͕ඞཁͩͬͨΓɺಋೖ͕ϋʔυ w΋͏গ͠खܰʹಈ͔ͤΔΑ͏ɺΧʔωϧͷܕ৘ใΛऔಘ͢Δ#5'΍ɺ $03& $PNQJMF0ODF 3VO&WFSZXIFSF ͳͲͷٕज़͕ग़ͯ͘Δ w$03&ʹͳΔͱϫϯόΠφϦπʔϧ Χʔωϧͷઃఆ͍͔ͭ͘ ΛΠ ϯετʔϧ͢Ε͹τϨʔε͕Ͱ͖ΔΑ͏ʹɻ

Slide 9

Slide 9 text

࣮૷ͷྫ w#1'ͷϓϩάϥϜΛϏϧυ͢Δ $Ͱॻ͘ඞཁ͕͋ΔɻϓϩάϥϜͷҰ෦ ίϯύΠϧ࣌ͷΦϓγϣϯ

Slide 10

Slide 10 text

࣮૷ͷྫ w#1'ϓϩάϥϜͷΦϒδΣΫτ͔ΒTLFMʢϔομʣΛੜ੒͠ɺ Ϣʔβϥϯυͷ$ϓϩάϥϜ͔Β࢖͑ΔΑ͏ʹ͢Δ CQGUPPMͱ͍͏ίϚϯυͰੜ੒ ϓϩάϥϜͷόΠφϦࣗମ͕ϔομʹຒΊࠐ·ΕΔ

Slide 11

Slide 11 text

࣮૷ͷྫ wͦͷϔομΛ࢖ͬͯόΠφϦπʔϧΛ࡞Δɻ w$ݴޠͰɻ wͪͳΈʹCDDͰͷSFGFSFODF࣮૷ w IUUQTHJUIVCDPNJPWJTPSCDDUSFFNBTUFSMJCCQGUPPMT

Slide 12

Slide 12 text

ग़དྷ্͕ͬͨόΠφϦͷΠϝʔδ Ϣʔβϥϯυ Χʔωϧ಺෦ ϓϩάϥϜʢϫϯόΠφϦʣ #1'ϓϩάϥϜ ϩʔυ σʔλ΍ΓऔΓ ϓϩάϥϜ ࣮ߦɾूܭ Φϓγϣϯͷղੳ ग़ྗ Ճ޻ #1' ࣮ߦ࣌ݕࠪ #1'.BQ 1FSGCV⒎FS ར༻ऀ

Slide 13

Slide 13 text

͜͜·Ͱͷͬ͘͟Γͨ͠·ͱΊ wF#1'͍ͬͯ͏-JOVYͷτϨʔαͳͲΛ࡞Δศརٕज़͕͋Δ wF#1'πʔϧ͸ɺҎલ͸DMBOHͰͦͷ৔ͰίϯύΠϧ͍͕ͯͨ͠ɺ ࠷ۙϫϯόΠφϦͰ഑ΕΔΑ͏ʹͳͬͨ ཁ৽͍͠Χʔωϧ wͦ͏͢ΔͱίϚϯυϥΠϯπʔϧ෦෼΋ؚΊͯϫϯόΠφϦʹ͍ͨ͠ wͦͷSFGFSFODF࣮૷͸$ݴޠɻ$ݴޠɻ ʮ1SPEVDUJPOͰ͸#$$ΑΓMJCCQG#1'$03&Λ࢖͏ํ͕ྑ͍ʯ IUUQTJUJTLKIBUFOBCMPHDPNFOUSZͳͲ΋ࢀর

Slide 14

Slide 14 text

Ϣʔβϥϯυ΋$ݴޠͰ͋Δඞཁ wͬͯɺຊ౰ʹ͋Δʁ w$ݴޠͷ೉͠͞ wΦϓγϣϯύʔεҰͭͰ΋จࣈྻͷѻ͍ʹۤ࿑͢Δ wͪΐͬͱͨ͜͠ͱͰ΋ෆ҆શͳίʔυ͕ wϝϞϦͷѻ͍͕ϝϞϦ͕ w#1'ϓϩάϥϜ͸࢓ํͳ͍ʢWFSJpFS΋͋Δʣ͚ͲɺϢʔβϥϯυ΋ $ͬͯେม͡Όͳ͍ʁ

Slide 15

Slide 15 text

ͦ͜Ͱ3VTU

Slide 16

Slide 16 text

ͭͬͨ͘΋ͷ

Slide 17

Slide 17 text

DPOUBJOFSUSBDFST wίϯςφؔ܎ͷτϨʔεʹಛԽͨ͠πʔϧ܈Λ࡞Ζ͏ͱ͍ͯ͠Δ w൚༻తͳ΋ͷ͸͢Ͱʹ͋ΔͷͰ w3VTUMJCCQGST w$03&ͳͷͰΧʔωϧ͕ ͔ͳΓ৽͘͠ͳ͍ͱͰ͕͢ IUUQTHJUIVCDPNVE[VSBDPOUBJOFSUSBDFSTɹ

Slide 18

Slide 18 text

DPOTUBU wίϯςφ୯ҐͰͷ γεςϜίʔϧݺͼग़͠ͷ ౷ܭΛදࣔ͢Δ

Slide 19

Slide 19 text

VOTIBSFTOPPQ wVOTIBSF ͱ͍͏ɺίϯςφΛ࡞੒͢Δ্ͰॏཁͳγεςϜίʔϧ ͷݺͼग़͠ͱɺͦͷϑϥάΛτϨʔε͢Δ

Slide 20

Slide 20 text

DPOCJPHSBQI wίϯςφ୯ҐͰɺCMPDL*0ͷঢ়گΛՄࢹԽ͢Δɻ wάϥϑදࣔͰ͸ͬͪΌ͚͗ͨ͢ͷͰɺ΋͏গ͠ݟ΍͍͢දࣔΛࠓޙ࣮ ૷͍ͨ͠ʜ

Slide 21

Slide 21 text

%FNP wDPOTUBU ࠓࢥ͏ͱQFSGͰ΋Ͱ͖Δؾ΋ ҰԠύϑΥʔϚϯεʹ༏ΕΔ ͸ͣ ˞ಈը͸Ͳ͔͜ʹΞοϓ͠·͢

Slide 22

Slide 22 text

MJCCQGST

Slide 23

Slide 23 text

MJCCQGSTͱ͸ wF#1'ͷػೳΛ΋͏গ͠ΞΫηε͠΍͘͢ϥοϓͨ͠ϥΠϒϥϦͱ͠ ͯMJCCQGͱ͍͏΋ͷ͕͋Δɻ w#1'ϓϩάϥϜͷϩʔυ w#1'.BQ΍QFSGCV⒎FSͳͲσʔλͷ΍ΓऔΓͷΠϯλϑΣʔε wMJCCQG͸$ϥΠϒϥϦͳͷͰɺ3VTU͔Β࢖͍΍ͨ͘͢͠΋ͷ͕ MJCCQGSTɻ

Slide 24

Slide 24 text

جຊతͳ࢖͍ํ wCQGϓϩάϥϜΛॻ͘ w cargo libbpf buildͰίϯύΠϧͰ͖Δ w cargo libbpf genͰ3VTUͷTLFMΛੜ੒ w͋ͱ͸ͦͷTLFMΛ࢖ͬͯ3VTUϓϩάϥϜΛॻ͘ wMJCCQGSTͷػೳʹՃ͑ͯɺTUSVDUPQU DUSMD BOZIPX ͦͷଞී௨ͷ 3VTUͷίϚϯυϥΠϯπʔϧͱͯ͠ϓϩάϥϜΛॻ͚͹0,

Slide 25

Slide 25 text

NBJOͷྫ ϏϧμʔΛܦ༝ͯ͠ TLFMΛ։͘ ύϥϝʔλΛೖΕͯ TLFMΛϩʔυɺΞλον F#1'ͷΠϯλϑΣʔε͔Β σʔλΛऔಘɺදࣔ

Slide 26

Slide 26 text

σʔλදࣔͷྫʢQFSGCV⒎FSʣ wσʔλදࣔ༻ͷίʔϧόοΫؔ਺Λఆٛɻσʔλࣗମ͸&[u8]Ͱ ΍ͬͯ͘ΔͷͰɺQMBJODSBUFͰม׵ͷඞཁ͕͋Δɻ SFQS D ͳߏ଄ମʹ1MBJOΛ࣮૷

Slide 27

Slide 27 text

σʔλදࣔͷྫʢ#1'.BQʣ w#1'.BQͱ͍͏σʔλूੵମΛܦ༝ͯ͠ɺΧʔωϧͰूΊͨσʔλ ʹϢʔβϥϯυ͔ΒΞΫηεɺදࣔͰ͖Δɻ ߏ଄ମఆٛΛ$3VTUͰ߹ΘͤΔ LFZWBMVFͱ΋ʹ&[u8]ͳͷͰɺ͜͜Ͱ΋ม׵

Slide 28

Slide 28 text

Ϣʔβϥϯυ͔Β#1'.BQΛߋ৽ wඵຖʹΧ΢ϯλϦηοτ͢ΔΑ͏ͳϓϩάϥϜΛॻ͚Δɻ ॻ͚Δ͚ͲɺMap::update()͕LFZWBMVFͱ΋ʹ&[u8]Λཁٻ͢Δͷ Ͱɺ͜͜΋ม׵͔͠΋VOTBGF plain::as_bytes()ͰͰ͖Δ͚Ͳ

Slide 29

Slide 29 text

<3VTU௿ϨΠϠϝϦοτ>

Slide 30

Slide 30 text

θϩίετந৅Խͷڧ྽͞ w؆ܿʹએݴతʹॻ͍ͯ΋ɺεϐʔυͷ͜ͱΛؾʹ͠ͳ͍͍ͯ͘ɺͱ͍ ͏ͷ͸͍͍ମݧɻ wΤϥʔΛResultͰѻ͑Δ͚ͩͰ΋ੜ࢈ੑΊͬͪΌߴ͍ w΋ͪΖΜϝϞϦ΋ʢجຊతʹ͸ʣ҆શ wίϚϯυϥΠϯπʔϧͰ͸TUSVDUPQU͕͍͍ wͱʹ͔͘TUSVDUPQU͕͍͍ʢճ໨ʣ

Slide 31

Slide 31 text

๛෋ͳDSBUFΛ࢖͑Δ wίΞͰͳ͍෦෼ͷ࠶ൃ໌͸ਏ͍ͷͰɺ͍͍ײ͡ͷ࣮૷ʹ৐͔ͬΓ͍ͨ wΦϓγϣϯύʔαɺ''*ɺՄࢹԽ wUFYUQMPUT͍͍ wDBSHP͕ͦ΋ͦ΋ ͍͍ɺXZDBUT

Slide 32

Slide 32 text

''*ʹڧ͍ wࠓճͷMJCCQGͷΑ͏ʹɺ$ݴޠϕʔεʢ͔͠΋-JOVYΧʔωϧͱҰॹʹ ϝϯς͞Ε͍ͯΔʣͷͰ͔͍ϥΠϒϥϦΛૉ௚ʹ࢖͑Δͷ͸͍͍ w3VTU$Ͱߏ଄ମɺϙΠϯλΛ΍ΓͱΓ͠΍͍͢ͷ͸ॿ͔Δ w࣌ʹ͸VOTBGFʹͳΔ͚Ͳ

Slide 33

Slide 33 text

ࠔͬͯΔ͜ͱͱ͔ࠓޙ

Slide 34

Slide 34 text

ࠓޙͷ՝୊ wͱ͸͍͑VOTBGF͕ଟ͍ؾ͕͢ΔɺͳΜͱ͔ͳΒͳ͍͔ͳ w1MBJODSBUFʹཔ͍ͬͯΔͱ͜ΖΛ΋ͬͱ͏·͘Ӆ͢ͱ͍͍ͷ͔΋ wͱ͍͏͔ɺMJCCQG@ST͕&[u8]Λཁٻ͗͢͠ w''*पΓͷػೳ͸·ͩௐ΂࢝Ίͨ͹͔ΓͰɺ$ݴޠΈ͍ͨͳॻ͖ํʹ ͳͬͯ͠·͏ɻཁݚڀɻ

Slide 35

Slide 35 text

ͦͷଞ΍Γ͍ͨ͜ͱ wπʔϧͱͯ͠΋͏গ͠খճΓΛྑ͍ͨ͘͠ɻ wΦϓγϣϯ૿΍ͨ͠Γɺ΋ͬͱ৭ʑͳϝτϦοΫΛऔΓ͍ͨ wӳޠͱ͔ͰهࣄΛॻ͍ͨํ͕ड͚ͦ͏ɻॻ͘ɻ w͋ͱ͸ɺࣗ෼Ͱ͋·Γ࢖͑ͯͳ͍ͷͰ࢖ͬͯΈΔɻ