Slide 1

Slide 1 text

'MVFOUE NPOHP%# ,JCBOB Λར༻ͨ͠ ͸ͯͳϒϩά"#ςετͷࣄྫ )BUFOB&OHJOFFS4FNJOBS JETIJCB@ZV

Slide 2

Slide 2 text

ຊ೔ͷΞδΣϯμ w͸ͯͳϒϩάͰͷ"#ςετࣄྫ঺հ w؆୯ʹ"#ςετΛߦ͏࢓૊Έ঺հ

Slide 3

Slide 3 text

ࣗݾ঺հ wJETIJCB@ZV !TIJCB@ZV wΞϓϦέʔγϣϯΤϯδχΞ ೥ೖࣾ

Slide 4

Slide 4 text

ࣗݾ঺հ w͸ͯͳϒϩάνʔϜ wཪଆΑΓͷ։ൃ͕ଟ͍ wσʔλूܭ wσϓϩΠपΓ wͦͷଞ৭ʑ

Slide 5

Slide 5 text

͸ͯͳϒϩάͰͷ "#ςετࣄྫ

Slide 6

Slide 6 text

͸ͯͳϒϩάͰ͸ wαʔϏεͷվળʹ"#ςετΛಋೖ wϥϯσΟϯάϖʔδͷվળ wฤूը໘ͷվળ

Slide 7

Slide 7 text

͸ͯͳϒϩάͰ͸ wαʔϏεͷվળʹ"#ςετΛಋೖ wϥϯσΟϯάϖʔδͷվળ wฤूը໘ͷվળ

Slide 8

Slide 8 text

ϥϯσΟϯάϖʔδվળ wొ࿥ϘλϯͷΫϦοΫ਺Λ৳͹͍ͨ͠ wϘλϯͱϑΥʔϜͲͪΒ͕ΫϦοΫ͞ ΕΔ

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

ςετ݁Ռ ΫϦοΫ཰্͕ঢ

Slide 11

Slide 11 text

"#ςετΛ͢Δͱ wਪଌͰ͸ͳ͘ɺ਺ࣈΛݕূ͠ͳ͕Βվ ળ͕ग़དྷΔ w։ൃऀͷצͰ࡞Βͳ͍ wࣦഊͯ͠΋ৼΓฦΓ͕ग़དྷΔ

Slide 12

Slide 12 text

೔ʑ"#ςετΛ͢Δʹ͸ w͸ͯͳϒϩάͰ͸೔ʑ"#ςετΛͯ͠ ͍Δ w࣮ࢪ͕ͱʹ͔͘؆୯Ͱͳ͍ͱବ໨ w೉͍͠ͱ΍Βͳ͍

Slide 13

Slide 13 text

؆୯ʹ"#ςετΛ ͢Δ࢓૊Έ

Slide 14

Slide 14 text

ϥϯσΟϯάϖʔδͷ "#ςετखॱ wදࣔΛग़͠෼͚Δ wϘλϯΛΫϦοΫͨ࣌͠ʹϩάΛه࿥ wू·ͬͨϩάΛूܭɾάϥϑԽ͢Δ

Slide 15

Slide 15 text

දࣔͷ੾ସ ू·ͬͨϩάͷ ूܭɾάϥϑԽ ΫϦοΫ৘ใͷه࿥ ɾͲͪΒͷύλʔϯʁ ɾͲͷϘλϯʁ

Slide 16

Slide 16 text

wදࣔΛग़͠෼͚ wDIBOLPͷΑ͏ͳ࢓૊Έ wΫϦοΫϩάͷه࿥ w+4ͰͷΠϕϯτૹ৴ɾ'MVFOUE wूܭɾάϥϑԽ w.POHP%#ɺ,JCBOBͷར༻ Ͱ͖Δ͚ͩ؆୯ʹ

Slide 17

Slide 17 text

wදࣔΛग़͠෼͚ wDIBOLPͷΑ͏ͳ࢓૊Έ wΫϦοΫϩάͷه࿥ w+4ͰͷΠϕϯτૹ৴ɾ'MVFOUE wूܭɾάϥϑԽ wNPOHP%#ɺ,JCBOBͷར༻ Ͱ͖Δ͚ͩ؆୯ʹ

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

දࣔͷग़͠Θ͚

Slide 20

Slide 20 text

දࣔͷ੾ସ ू·ͬͨϩάͷ ूܭɾάϥϑԽ ΫϦοΫ৘ใͷه࿥ ɾͲͪΒͷύλʔϯʁ ɾͲͷϘλϯʁ

Slide 21

Slide 21 text

දࣔͷग़͠Θ͚ wࠓճ͸͋·Γ࿩͠·ͤΜ w͜ͷ෦෼͸ग़དྷ͍ͯΔͱ͍͏લఏͰ࿩ ͠·͢

Slide 22

Slide 22 text

දࣔͷग़͠Θ͚ w*1ΞυϨεͳͲͰग़͠Θ͚ wSVCZͷDIBOLP wDPPLQBEࣾ੡ w͸ͯͳϒϩάͰ͸ಉ͡Α͏ͳ࢓૊ΈΛ ࡞͍ͬͯΔ

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

ΫϦοΫϩάͷه࿥

Slide 25

Slide 25 text

දࣔͷ੾ସ ू·ͬͨϩάͷ ूܭɾάϥϑԽ ΫϦοΫ৘ใͷه࿥ ɾͲͪΒͷύλʔϯʁ ɾͲͷϘλϯʁ

Slide 26

Slide 26 text

؆୯ͳྲྀΕ wΫϦοΫ͞ΕͨΒΠϕϯτ͕αʔόʹ ૹ৴ wαʔόͰ͸"#ςετ৘ใͱڞʹ+40/ Ͱه࿥ w+40/ͷϩά͸'MVFOUEͰதԝαʔόʹ ूΊΔ

Slide 27

Slide 27 text

ΫϦοΫ +4ͰΠϕϯτ ૹ৴ αʔόͰ৘ใ෇͚ͯ +40/ʹه࿥ ϩάΛ'MVFOUEͰ தԝʹ

Slide 28

Slide 28 text

ΫϦοΫ +4ͰΠϕϯτ ૹ৴ αʔόͰ৘ใ෇͚ͯ +40/ʹه࿥ ϩάΛ'MVFOUEͰ தԝʹ

Slide 29

Slide 29 text

+4ͰΠϕϯτૹ৴ wEBUBFWFOUOBNFଐੑΛॻ͍͓ͯͩ͘ ͚Ͱૹ৴ wσβΠφͳͲͰ΋؆୯ʹग़དྷΔΑ͏ʹ ͸ͯͳϒϩάΛ࢝ΊΔ(ແྉ)

Slide 30

Slide 30 text

࣮૷ wΫϦοΫΠϕϯτΛ؂ࢹ wEBUBFWFOUOBNF͕͋ΔཁૉͳΒ"1* ʹΞΫηε

Slide 31

Slide 31 text

࣮૷ྫ $(document).on('mousedown', '[data-event-name]', function(e) { $.ajax({ url: "/api/event", type: "POST", data: { event_name: $(this).attr('data-event-name') } }); });

Slide 32

Slide 32 text

ΫϦοΫ +4ͰΠϕϯτ ૹ৴ αʔόͰ৘ใ෇͚ͯ +40/ʹه࿥ ϩάΛ'MVFOUEͰ தԝʹ

Slide 33

Slide 33 text

αʔόͰ+40/ϩά wΞΫηεʹ߹Θͤͯ+40/ΛϑΝΠϧग़ ྗ͢Δ͚ͩ wBQJFWFOU FWFOU@OBNF w"#ςετ৘ใ΋ڞʹه࿥ wͲͪΒͷύλʔϯ͔ wͲͷϘλϯ FWFOU ͔

Slide 34

Slide 34 text

FLUENT({ tag => "event", event_name => "guide-register-button", }) { "tag" : "event", "event_name" : "guide-register-button", "units" : { "ABUnit::GuideForm" : 1, "ABUnit::EditorColor" : 0, }, "time" : 1384844834 }

Slide 35

Slide 35 text

ΫϦοΫ +4ͰΠϕϯτ ૹ৴ αʔόͰ৘ใ෇͚ͯ +40/ʹه࿥ ϩάΛ'MVFOUEͰ தԝʹ

Slide 36

Slide 36 text

ϩάΛதԝʹूΊΔ wͲ͜Ͱه࿥͞Εͯ΋͏·͘ूΊΒΕͨ ͍ wूܭ΍ՄࢹԽͷͨΊʹσʔλΛม׵͠ ͍ͨ

Slide 37

Slide 37 text

ϩάΛதԝʹूΊΔ wͲ͜Ͱه࿥͞Εͯ΋͏·͘ूΊΒΕͨ ͍ wूܭ΍ՄࢹԽͷͨΊʹσʔλΛม׵͠ ͍ͨ

Slide 38

Slide 38 text

'MVFOUE

Slide 39

Slide 39 text

'MVFOUE wγεςϜͷ֤ॴ͔Βग़ྗ͞ΕΔϩάΛ ഑ૹɾू໿͢ΔͨΊͷϛυϧ΢ΣΞ wϓϥάΠϯʹΑͬͯूΊͨϩάΛଞͷ σʔλʹม׵΋ग़དྷΔ

Slide 40

Slide 40 text

ϩάΛूΊΔߏ੒ w֤αʔό͸ϩάϑΝΠϧʹɺϩάߦ ͷ+40/ͱͯ͠ग़ྗ w֤αʔόͷϑΝΠϧΛUBJMͯ͠ɺBHFOU ͕தԝʹૹΔ͚ͩ

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

͜͜·Ͱͷ·ͱΊ wಠࣗσʔλଐੑΛ෇͚Δ͚ͩͰΫϦο Ϋϩά͕ग़དྷΔΑ͏ʹ wϩά͸ࣗಈͰ'MVFOUEͷதԝʹू໿͞Ε ΔΑ͏ʹ ΫϦοΫ +4ͰΠϕϯτ ૹ৴ αʔόͰ৘ใ෇͚ͯ +40/ʹه࿥ ϩάΛ'MVFOUEͰ தԝʹ

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

ूܭɾάϥϑԽ

Slide 45

Slide 45 text

දࣔͷ੾ସ ू·ͬͨϩάͷ ूܭɾάϥϑԽ ΫϦοΫ৘ใͷه࿥ ɾͲͪΒͷύλʔϯʁ ɾͲͷϘλϯʁ

Slide 46

Slide 46 text

ू໿͞Εͨϩά w+40/͕'MVFOUEͰू·͍ͬͯΔ͚ͩ w͜ͷ··Ͱ͸Կ΋Θ͔Βͳ͍

Slide 47

Slide 47 text

ूܭɾՄࢹԽՄೳʹ w"͸˓ΫϦοΫɺ#͸˚ΫϦοΫͱ͍͏ ৘ใΛूܭ wද΍άϥϑʹΑΔՄࢹԽ

Slide 48

Slide 48 text

ख๏ wॊೈʹूܭNPOHP%#Λར༻ w؆୯ʹάϥϑԽ,JCBOBΛར༻

Slide 49

Slide 49 text

ϩάΛूܭՄೳʹ wNPOHP%#Λར༻ w'MVFOUEͷ+40/NPOHP%#ʹ w+BWB4DSJQUΛ࢖ͬͯूܭ

Slide 50

Slide 50 text

'MVFOUENPOHP%# w'MVFOUEͰू໿͞Εͨϩά͕NPOHP%# ʹೖΔΑ͏ʹ

Slide 51

Slide 51 text

'MVFOUENPOHP%# wqVFOUQMVHJONPOHP਺ߦͷઃఆ w'MVFOUEͷUBH͝ͱͷDPMMFDUJPO͕ग़དྷ Δ

Slide 52

Slide 52 text

'MVFOUEઃఆྫ type mongo database fluent collection debug host mongohost port 10000 capped capped_size 100m

Slide 53

Slide 53 text

NPOHP%#Ͱूܭ w+BWB4DSJQUͰΫΤϦΛ࡞ΓɺूܭՄೳ

Slide 54

Slide 54 text

{ "tag" : "event", "event_name" : "guide-register-button", "units" : { "ABUnit::GuideForm" : 1, }, } ϩάͷܗࣜ "ύλʔϯͷΫϦοΫ਺ूܭ db.event.find({ "event_name":"guide-register-button", "units.ABUnit::GuideForm":1 }).count();

Slide 55

Slide 55 text

NPOHP%#Ͱूܭ wΫΤϦΛ࡞Ε͹ूܭՄೳʹ wΫΤϦΛ޻෉͢Ε͹ॊೈʹूܭͰ͖Δ

Slide 56

Slide 56 text

άϥϑԽՄೳʹ wॊೈʹूܭग़དྷΔ͚ͩͰ໨త͸ୡ੒ wͨͩ͠ຖճΫΤϦΛ࡞Δͷ͸େม wͬ͟ͱ"#ςετঢ়گΛάϥϑԽ͍ͨ͠

Slide 57

Slide 57 text

άϥϑԽՄೳʹ w&MBTUJD4FBSDI,JCBOBΛར༻

Slide 58

Slide 58 text

,JCBOB w&MBTUJDTFBSDIͷΠϯσοΫεΛར༻͠ ͯXFC্Ͱ༷ʑͳάϥϑΛ࡞Δπʔϧ w&MBTUJDTFBSDI͸4PMSͷΑ͏ͳશจݕࡧ γεςϜ

Slide 59

Slide 59 text

'MVFOUE,JCBOB w'MVFOUEͰू໿͞ΕͨϩάΛ &MBTUJDTFBSDIʹ wqVFOUQMVHJOFMBTUJDTFBSDI਺ߦͷ ઃఆ w,JCBOB͸&MBTUJDTFBSDIΛݟΔΑ͏ʹ

Slide 60

Slide 60 text

'MVFOUE,JCBOB

Slide 61

Slide 61 text

'MVFOUEઃఆྫ type elasticsearch host fluenthost port 9200 logstash_format true logstash_prefix service type_name service

Slide 62

Slide 62 text

,JCBOBͰάϥϑԽ w'MVFOUEͷσʔλ͸&MBTUJDTFBSDIʹೖ ΔΑ͏ʹͳͬͨ wXFC্Ͱ,JCBOBΛར༻ͯ͠άϥϑԽͰ ͖Δ

Slide 63

Slide 63 text

No content

Slide 64

Slide 64 text

άϥϑԽσϞ wશσʔλΛදͰදࣔ͠ wΫϦοΫσʔλͷΈʹݕࡧͰߜΓࠐΈ w"#ςετঢ়گ͕࣠ͷ๮άϥϑΛ௥Ճ

Slide 65

Slide 65 text

άϥϑԽσϞ { "tag" : "event", "event_name" : "guide-register-button", "units" : { "ABUnit::GuideForm" : 1, }, } ΫϦοΫσʔλΛݕࡧ "#ঢ়ଶΛ࣠ʹ๮άϥϑ

Slide 66

Slide 66 text

No content

Slide 67

Slide 67 text

͜͜·Ͱͷ·ͱΊ w'MVFOUEͷϩά͸NPOHP%# &MBTUJDTFBSDIʹ wNPOHP%#ͰॊೈʹूܭՄೳʹ w,JCBOBͰ؆୯ʹάϥϑԽՄೳʹ

Slide 68

Slide 68 text

࠷ऴతͳ࢓૊Έ

Slide 69

Slide 69 text

No content

Slide 70

Slide 70 text

؆୯ͳ"#ςετखॱ wϘλϯʹEBUBFWFOUOBNFͱ͍͏ଐੑ ௥Ճ wϦϦʔεޙ,JCBOBͰάϥϑԽ w࠷ऴతʹNPOHP%#Ͱूܭ͠ɺ݁ՌΛ ֬ೝ

Slide 71

Slide 71 text

·ͱΊ w͸ͯͳϒϩάͰ͸"#ςετ΍σʔλղ ੳͳͲͷ࢓ࣄ΋΍͍ͬͯ·͢ w'MVFOUE NPOHP%# ,JCBOBΛར༻͠ ͨ"#ςετΛ؆୯ʹߦ͏࢓૊ΈΛ঺հ wࣗࣾͰ࢓૊ΈΛ࡞ͬͨͷͰɺ΋ͬͱෳ ࡶͳ"#ςετ΋ग़དྷ·͢

Slide 72

Slide 72 text

͝ਗ਼ௌ͋Γ͕ͱ͏ ͍͟͝·ͨ͠