Slide 1

Slide 1 text

࿦ཧ࡟আͱɺͦ͜Ͱͷ &MBTUJDTFBSDI׆༻ ࿦ཧ࡟আ$BTVBM5BMLT!NJTPPCV

Slide 2

Slide 2 text

ࣗݾ঺հ ࢓ࣄ SBJMTΞϓϦΛͭͬͯ͘ӡ༻ ॴଐ υϦίϜʹ೥൒ʢࡀʙʣ ໊લ !NJTPPCVʢদ࡚ʣ ࿦ཧ࡟আΛͨ͘͞Μ͖ͯ͠·ͨ͠

Slide 3

Slide 3 text

࿩͢͜ͱ ✦ ͓͜ͳ͖ͬͯͨ࿦ཧ࡟আʹ͍ͭͯ ✦ ࿦ཧ࡟আΛ΍ΊɺϩάΛ&MBTUJDTFBSDIʹ
 ೖΕΔΑ͏ʹͨ͜͠ͱ ࡟আํ๏બ୒ͷࢀߟʹͯ͠΋Β͑Ε͹!

Slide 4

Slide 4 text

લஔ͖ ✦ ϚελʔσʔλͰͳ͍ ✦ ͨ͘͞Μ͋Δ ✦ ࡟আޙ͸ɺΞϓϦຊମ͔Βࢀর͠ͳ͍ɺ෮׆͠ͳ͍ ✦ ӡ༻্ɺޙ͔Β࡟আσʔλΛݟΕΔඞཁ͕͋Δ ͜͜Ͱ͸ɺ࡟আ͢Δσʔλ͸ҎԼͷ৚݅ͷ΋ͷ

Slide 5

Slide 5 text

࡟আ͢Δ࣌ͷํ๏ ✦ ࡟আϑϥά ✦ ࡟আςʔϒϧ ✦ &MBTUJDTFBSDIͰϩά

Slide 6

Slide 6 text

࡟আϑϥά

Slide 7

Slide 7 text

࡟আϑϥά ✦ 3%#͔ΒϨίʔυΛ෺ཧ࡟আ͢ΔͷͰ͸ͳ͘ɺ
 ʮ࡟আͷঢ়ଶʯΛ࣋ͨͤΔ ✦ ීஈͷࢀরͰ͸ɺ࡟আঢ়ଶͷϨίʔυΛӅ͢
 ΫΤϦ΍WJFXΛ͔ͭ͏ ✦ ࡟আͷঢ়ଶʹ͸ɺCPPM΍JOUɺEBUFUJNF͕࢖ΘΕΔ

Slide 8

Slide 8 text

࡟আϑϥάྫ user_comments id: int user_id: int comment: text deleted_at: datetime ࢀর SELECT * FROM user_comments WHERE user_id = 1 AND deleted_at IS NULL; ࡟আ UPDATE user_comments SET deleted_at = NOW() WHERE id = 1;

Slide 9

Slide 9 text

࡟আϑϥάར఺ ✦ ςʔϒϧʹΧϥϜΛͭ௥Ճ͢Δ͚ͩ ✦ ࡟আͨ͠σʔλͷࢀর΍෮׆ָ͕
 ʢ΄΅΍Βͳ͍૝ఆʜʣ ✦ %&-&5&ΑΓ61%"5&ͷํ͕ύϑΥʔϚϯε͕
 ͍͍

Slide 10

Slide 10 text

࡟আϑϥάܽ఺ ✦ ςʔϒϧ༰ྔ͕૿Ճ͠΍͍͢ ✦ ΫΤϦ͕ඇ௚ײతʹͳΔ ✦ ࢀরͰ͸৚݅௥Ճɺ࡟আʹ͸61%"5& ✦ 3%#ʹΑͬͯ͸ɺ6/*26&*/%&9͕࢖͍ʹ͍͘ ✦ 3%#ͱͯ͠ɺઃܭ͕Ϗϛϣʔ

Slide 11

Slide 11 text

࡟আςʔϒϧ

Slide 12

Slide 12 text

࡟আςʔϒϧ ✦ ෺ཧ࡟আͨ͠ϨίʔυΛɺͦͷ··ΞʔΧΠϒ༻ͷ
 ςʔϒϧʹҠ͢ ✦ ཤྺςʔϒϧͱݺ͹ΕΔ΋ͷ΋ɺࣅͨܗΛ
 ͱΔ͜ͱ͕͋Δ

Slide 13

Slide 13 text

࡟আςʔϒϧྫ ίϝϯτΛ࡟আ͢Δ user_comments id: int user_id: int comment: text archived_user_comments id: int user_id: int comment: text archived_at: datetime %&-&5& */4&35

Slide 14

Slide 14 text

࡟আςʔϒϧྫ ΧʔυΛച٫͢Δ user_cards id: int user_id: int card_id: int level: int user_card_sale_histories id: int user_id: int card_id: int level: int money: int sold_at: datetime %&-&5& */4&35

Slide 15

Slide 15 text

࡟আςʔϒϧར఺ ✦ ݩʹͳΔςʔϒϧͷ༰ྔ͸૿Ճ͠ʹ͍͘ ✦ ࡟আςʔϒϧͰύʔςΟγϣϯΛ੾Δͱɺ
 ݹ͍σʔλΛָʹফͤΔ

Slide 16

Slide 16 text

࡟আςʔϒϧܽ఺ ✦ ֎෦Ωʔ੍໿͕࢖͑ͳ͍

Slide 17

Slide 17 text

͜͜·Ͱͷ·ͱΊ ✦ ࡟আϑϥά͸ਏ͍ ✦ ࡟আςʔϒϧ͸ѱ͘ͳ͍͕ʜଞͷख΋ߟ͑Δ

Slide 18

Slide 18 text

࡟আϩά

Slide 19

Slide 19 text

࡟আϩά ✦ 3%#͔Β෺ཧ࡟আ͠ɺ࡟আσʔλΛ
 ผ్ϩάͱͯ͠ه࿥͢Δ ✦ 3%#ଆΛγϯϓϧʹͰ͖Δ ✦ ϩάʹ͸ɺ&MBTUJDTFBSDIΛ࢖͍ͬͯΔ

Slide 20

Slide 20 text

&MBTUJDTFBSDIͱ͸ ✦ ෼ࢄυΩϡϝϯτετΞ ✦ 3&45+40/ ✦ Α͘ݟΔར༻ྫ ✦ શจݕࡧΤϯδϯ ✦ ϩάΛೖΕΔ ✦ ௕͍ͷͰɺ͔͜͜Β&4ͱলུදه͢Δ!

Slide 21

Slide 21 text

&4ʹϩάΛೖΕΔ ࡟আͨ͠σʔλΛ&4ʹೖΕΔ { "user_comment_deleted_log": { "properties": { "user_id": { "type": "integer" }, "comment": { "type": "string" }, “deleted_at": { "type": "date" } } } } user_comments id: int user_id: int comment: text %&-&5& */4&35

Slide 22

Slide 22 text

&4Ͱͷσʔλઃܭ { "app_log_20150831": { "mappings": { "user_comment_deleted_log": { "properties": { "user_id": { "type": "integer" }, "comment": { "type": "string" }, "deleted_at": { "type": "date" } } } } } } index RDBͷσʔλϕʔεΈͨ ͍ͳ΍ͭɻ ೔୯ҐͰindex͢Δɻ type RDBͷςʔϒϧ Έ͍ͨͳ΍ͭɻ छྨͰtypeΛ෼͚Δɻ JOEFYͱUZQFʢͱVTFS@JEʣΛࢦఆͯ͠ɺϩάΛऔΓग़͢ field RDBͷΧϥϜΈ͍ͨͳ ΍ͭɻ

Slide 23

Slide 23 text

✦ ΞΫγϣϯͰ3%#ͷෳ਺ͷϨίʔυΛফ͢৔߹͸ɺ ϩά͸·ͱΊͯͭ෼ͰೖΕΔ ✦ ࣮ࡍ͸ɺVTFS@JEͳͲͷݕࡧͰ࢖͍͍ͨ΋ͷҎ֎ͷ ϑΟʔϧυ͸ɺѹॖͯͭ͠ʹ·ͱΊΔ ✦ ༰ྔରࡦ΍ɺϚοϐϯάʢσʔλߏ଄ʣఆٛͷ
 ൚༻Խ ✦ VTFS@JEͰSPVUJOHͯ͠ύϑΥʔϚϯε޲্ &4Ͱͷσʔλઃܭ

Slide 24

Slide 24 text

&4ͷϩάͷࢀর ✦ ઐ༻ͷϥΠϒϥϦΛͭ͘ΓɺͦΕΛ௨͍ͯ͠Δ ✦ औಘͨ͠σʔλ͸ɺѹॖΛҙࣝͤͣɺ3%#ͱࣅͨ
 ײ֮Ͱ࢖͑Δ

Slide 25

Slide 25 text

'MVFOUEͰɺઐ༻ͷϩά ϑΝΠϧΛऩू Hadoop Elasticsearch 'MVFOUE ϩάΛऩूͯ͠؅ཧͰ͖Δπʔϧ )BEPPQ ฒྻ෼ࢄॲཧΛ࣮ݱ͢Δϛυϧ΢ΣΞ App App App CBUDIͰ
 CVMLJOTFSU ΞϓϦ͔Β௚઀ೖΕͳ͍ߏ੒ ϩά͕&4ʹ֨ೲ͞ΕΔ·Ͱ

Slide 26

Slide 26 text

)BEPPQ ू໿ɾ෼ੳ &MBTUJDTFBSDI Ϣʔβʔ୯ҐͰͷϩάݕࡧ )BEPPQͱ&4ͷ࢖͍෼͚

Slide 27

Slide 27 text

✦ 3%#ଆΛγϯϓϧʹग़དྷΔ ✦ 3%#ͷ༰ྔΛؾʹ͢Δ͜ͱ͕ݮΔ ✦ σʔλͷ஝ੵ͕͠΍͍͢ ✦ ৽ͨͳϩάͷ௥Ճָ͕ &4Ͱͷ࡟আϩάར఺

Slide 28

Slide 28 text

✦ ࡟আޙɺ&MBTUJDTFBSDI͔ΒݟΒΕΔΑ͏ʹͳΔ
 ·Ͱʹ͕͔͔࣌ؒΔ ✦ ڐ༰Ͱ͖ͳ͍ͱ͖͸ɺ3%#Λ࢖ͬͨΓɺ
 3%#ͱ&MBTUJDTFBSDIΛ߹Θͤͯ࢖ͬͨΓ ✦ ৴པੑΛΑΓߴ͍ͨ͘͠ͱ͖΋ɺ3%#Λ࢖͏ &4Ͱͷ࡟আϩάܽ఺

Slide 29

Slide 29 text

·ͱΊ ✦ ಛʹن໛͕େ͖Ίͩͱɺ࡟আϑϥά͸ਏ͍ࣄ͕ଟ͍ ✦ &MBTUJDTFBSDIʹ࡟আϩάΛ͍ΕΔͱָ ✦ ঢ়گʹԠͯ͡ɺద੾ʹ࡟আํ๏ΛબΜͰ͍͖·͠ΐ͏