Asakusaã¨ã¡ãã¼ã³ã¢
ã¢ããã³ãã«ã¬ã³ãã¼ã®ã¨ã³ããªã¼ãªãã§ã軽ãã«ã
Asakusaã¯ãã¨ãã¨Hadoopã§ãããå¦çãéçºã»å®è¡ããããã®ãã¬ã¼ã ã¯ã¼ã¯ã ãããã¯å¥ã«ä»ã§ãããã£ã¦ããªãããã ããå®è¡åºç¤ã¯å¢ãã¦ããããæ¨å¥¨åºç¤ãå¤ããã¤ã¤ãããç¾å¨ã®ã¨ããã®æ¨å¥¨åºç¤ã¯ããããããã§å©ç¨ãããã¼ã¿å¦çã®è¦æ¨¡ãåãã¼ãã§å®äºãããããªå ´åã¯M3BPã§ãããã§ãªãå ´åããªãã¡è¤æ°ãã¼ãã«ã¾ããããããªå ´åã¯ãSparkãæ¨å¥¨ãã¦ãããããã¯åããçµé¨ããããã¹ã¦ã®ã¯ã¼ã¯ãã¼ããã§Spark/M3BPãHadoopã®ç¹ã«Mapreduceã§ã®å®è¡çµæãåé§ãã¦ããããã ãAsakusaDSLã¯ã©ã®ãã©ãããã©ã¼ã ã§ãå®å ¨äºæãªã®ã§ãã³ã³ãã¤ã«ãç´ãã ãã§ãã®ã¾ã¾åããMapreduceããSparkã®ç§»è¡ã¯é常ã«ç°¡åã ãã¨ãããã¨ã§å¯è½ãªãSpark/M3BPã®æ¹ãéãã®ã§ããã£ã¡æ¹ãããã®ã§ã¯ãªãã§ãããããã¨ãããªæãã ã
ç¾ç¶ã®å®éã®æ¡ä»¶ã®ã¯ã¼ã¯ãã¼ãã¯ãå¾ã ã«M3BPã«è¿ã¥ãã¤ã¤ãããããã¯ãã¼ãåºåã®åä¸ã«ãããããªãã¡ã¡ãã¼ã³ã¢åã®é²å±ã¨ã¡ã¢ãªã¼ã®å¤§å®¹éåã«ããã¨ããã大ããããã®åºåã®åä¸ã¯ããã«é²ãã§ãããããæ¥å¹´ã¯ãã¼ããããã®ã¹ã¬ããæ°ã¯100ãè¶ããã¡ã¢ãªã¼ã1Tããããæ¨æºã«ãªã£ã¦ããã ããã
Asakusaã ã¨ãã¯ãæ¥åç³»ã®å¦çãå¤ãã®ã§ãä¸ããããããã®ãã¼ã¿ãµã¤ãºã1Tãè¶ããã¨ãããã¨ã¯ã»ã¨ãã©ãªããå®éã®å®è¡ã¯1ãµã¼ãã§éã«åã£ã¦ãã¾ãããã¼ãééä¿¡ããªããM3BPãã¡ãã¼ã³ã¢ã使ãåãããã¤ä¸è¦ãªdiskã¸ã®æ¸ãåºããè¡ããªãã®ã§ãï¼éã«ããã¨OOMã ã¨æ½ãè½ã¡ãï¼ããã©ã¼ãã³ã¹ã¯é常ã«åºãã8~16ã³ã¢ã§64Gã¡ã¢ãªã¼ã¨ããããªã¹ããã¯ã®ãã·ã¼ã³ã§8~10æéããã£ã¦ããããããã44ã³ã¢w/ 512Gã¨ããããªãã·ã¼ã³ã§æ®éã«2åã§çµäºã¨ãããããªæãã«ãªãã
ããã¯ãããããããã®ä½ãæ¹ã®åé¡ã¨ããããããç¾è¡ã®RDBMSã®ã¢ã¼ããã¯ãã£ã§ãããå¦çãè¡ã£ãå ´åã8~16ã³ã¢ã§ãããã¹ã¦ããããã«ä½¿ãåããã¨ãå°é£ã§ããã対ãã¦ãM3BPã¯ç¾ç¶ã®ç©çã¹ããã¯ãåæ£å¦çã§ãããã«ä½¿ãåãã®ã§ãåç´ã«æ¯ä¾ããã³ã¢æ°ä»¥ä¸ã®çµæãã§ããã¨ã«ããã¨æããã³ã¢æ°ãå¢ãã¦ããã°ãã®å·®ã¯ãã£ã¨éãæ°ãããã
ãã®ç¶æ³ã¨ä»å¾ã®ãã¼ãã¹ããã¯ãè¦ãã°ãã¾ãM3BPã®ãããªã¡ãã¼ã³ã¢ã¸ã®ç§»è¡ã¯é åçã ãç¹ã«Asakusaã ã¨ç§»è¡ã¨ãã£ã¦ããªã³ã³ãã¤ã«ã ããªã®ã§ãããã»ã©è² è·ããªãã
ãã¦ãããã§ã¯ä»å¾ã®ã¡ãã¼ã³ã¢ç°å¢ãå ·ä½çã«ã©ãã¿ã¦ãããï¼ã¨ãããã¨ã ãã©ãAsakusaçã«ã¯ãããã¯ããç©æ¥µçã«ãã£ã¦ããã¨ããæ¹åã«ãªãã¨æããã¨ã«ããå¦çãéãã¨ãããã¨ã¨ãã¼ãã®éçºããã£ã¡ã«é²ãã§ããã¨ãããã¨ã¯ãã¯ã大ããããã¨ãããã«é¢ãã¦ã¯éãã¯æ£ç¾©ã§ãæéåä½ã§ããã£ã¦ããå¦çããåã¨ãç§ã¨ãã®ãªã¼ãã¼ã«ãªã段éã§ãé常ã®ãããå¦çã¨ã¯éã£ã¦ãã¦ããªã«ãã¨ä½¿ãåæãä¸ããã
ã§ãããããã¬ã³ã¸ã«ãªãã¨ããããããã¼ã¿ãã©ãããã£ã¦è©±ã«ã¯å½ç¶ãªãã
â ãã¼ã¿å±¤ã®åé¡
ãªã®ã§ãã¡ãã¼ã³ã¢åã¨ãã話ã¨æ°¸ç¶å層ãã©ããããï¼ã£ã¦ã®ã¯å®ã¯ä»å¾ãè¦ãã¨ãã«å¤§ããã
確ãã«ç¾ç¶ã§ã¯åãã¼ãã§å¦çã«ãªã£ã¦ããããå¦çãembarrassing parallelã«ã§ãããã¨ã¯å¤ãããã®å ´åããã¼ã¿ã®partitioningãè¡ããã®ã§ããã°ãæ®éã«è¤æ°ãã¼ãããã¦ã¦ãçã£ç«¯ããjobãçªã£è¾¼ãã¨ããã®ã¯ããã ã¨æããããã®è¾ºãã¯ç®æ¨ã«ãã¦åãã¤ã¤ããã5-10å°ç¨åº¦ã®ã¡ãã¼ã³ã¢ãã·ã¼ã³ã§ã¯ã©ã¹ã¿ã¼çµãã§ããããã¼ã¿ãã©ãããã¨ãã話ã ã
ã»HDFSãªã®ãï¼
ã¾ãæ®éã«HDFSã¨ããé¸æè¢ã¯ãããç¾ç¶ã®Hadoopã®ä¸»ããæ©è½ã³ã³ããã³ãã¯ãHDFSï¼ã¾ãã¯ãã®APIï¼ã ã¨å人çã«æã£ã¦ãããYARNäºã
ã¨ããã¾ãããããããã¨ã¯æãããããããHadoopãHDFSã¨Mapreduceã®ãã¢ãªã³ã°ã§æ¯ãããã¦ãããã¬ã¼ã ã¯ã¼ã¯ã§ãã£ãéå»ãèããã°ãådistributionããªããæ®éã«Sparkæ¼ãã«ãªã£ã¦ããç¾ç¶ã§ã¯ãHadoopæ¬ä½èªä½ã¨ãã¦ã¯çèºç¶æ
ã§ãHDFSãã»ã¼ã¬ã¬ã·ã¼åãã¤ã¤ããããã«è¦ãããããã¯ä»ã«ä»£æ¿ããªããã¨ãããã¨ã§ãããªããè¦ããã«åæ£fsã¨ãã¦ã¯æ¯ãã¦ãããããã使ãã°ããã§ããã£ã¦è©±ã ãå®éã5-10å°ç¨åº¦ã§ãHDFSãã¦ãã®ã±ã¼ã¹ã ã¨MapRfsããã¡ã¼ã¹ããã§ã¤ã¹ã«ã¯ãªã£ã¦ãããããå©ç¨ããã¨ããã¹ã¿ã³ã¹ã¯æ®éã ãã¾ããããã§ããã®ã§ã¯ãªããã¨ããã¹ã¿ã³ã¹ã
ãã ãããã®ã¾ã¾ã¡ãã¼ã³ã¢ã«ãããã§è¡ãã¨ããããã大ããªãã¼ãæ°ã¯ãããªãããHDFSèªä½ãæ¬å½ã«ããã®ãï¼ã¨ãããã¨ã«ãªããå®éã«åãã¼ãã§çµããã±ã¼ã¹ã§ããã°ãã¾ã£ããä¸è¦ã ã
ã»RDBMSã®æ代ãªã®ãï¼
åãã¼ãï¼Î±çãªè©±ã§ããã°ãã¾ãæ®éã«RDBMSã§ããããã¨ãã話ã¯ãããåãåããã¢ãããã¯ã¯ã¨ãªã¼ã¯RDBMSã§å¦çãã¦ããããçã«ãã¼ã¿ãä½ãã¨ããã§ã¯Asakusaã¨ããæãã®çµã¿åããã«ãªããã¾ããããªã«ã§ããããªæããããªããããããjoinã«å¿
è¦ãªãã¼ã¿ã¯æ¥åçã«ã¯RDBMSã«æ ¼ç´ããã¦ããã®ãæ®éãªã®ã§ãåççã§ã¯ããã
ãã ããã¡ãã¼ã³ã¢ï¼å¤§éã¡ã¢ãªã¼ã¸ã®å¯¾å¿ã¨ããæå³ã§ã¯ãç¾ç¶ã®RDBMSã¯æ ¹æ¬çãªã¢ã¼ããã¯ãã£ã§é½é½¬ããããããã©ã¼ãã³ã¹ãååã«å¼ãåºããªããä»å¾ãè¦ãã®ã§ããã°ãç¸å½ã®ã¢ã¼ããã¯ãã£ã®å¤æ´ãå¿ è¦ã§ããããã®æå³ã§ã¯å¤§éã®äººå¡ãè³éãæå ¥ã§ããOracleã¨ãã£ãåç¨RDBMSããã¾ãæ¬å½ã¨ãã¦å¦¥å½ãªæãããã¦ãããOSSç³»ã¯ãå¤ããè¦ã¦ããã¨æ©è½è¿½å ã«ã¤ãã¦ã¯ã¬ã¤ã ããã¯ç¶æ ã§ãããã¨ã«å ãã¦ãã¢ã¼ããã¯ãã£å¤æ´ã¸ã®æå ¥è³æºã確ä¿ãããã¨ãå³ããæ°ãããã
ã»ç¬¬3ã®é¸æè¢
ä»å¾ãè¦ãã®ã§ããã°ãåæ£OLTPãææååè£ã ã¨æã£ã¦ãããè¨ã£ã¦ã¿ãã°ãã¡ãã¼ã³ã¢ã»å¤§éã¡ã¢ãªã¼Nativeãªã®ã§ããããããã ãããæ°ããé
ã¯æ°ããé©è¢ã«ããã ããç¾å¨ãããªãã®ãã©ãã«ããã®ãï¼ã¨ããã°ãç¾ç¶ã§ã¯R&Dã®å
é¨ã§ãããªãããã£ã¨ããã©ããå¿
æ»ã§å®è£
ä¸ã§ãTPC-Cã¬ãã«ã§ã¯ååããã©ã¼ãã³ã¹ã¯åºã¦ãããå ´åã«ãã£ã¦ã¯ãã©ã¤ã³ã°æ°å³ã§ãªãªã¼ã¹ãã¦ãã¨ããããããè¦ã¯ãéçºã¯é²ãã§ãããããªããªãåç¨ã§æ®éã«ã¨ããã¬ãã«ã§ã¯ããå°ãæéãããããã¨ããæãã ããã
è¦ããã«ãæå¿«ãªãã¹ãããªããã¨ããã®ãç¾ç¶ãAsakusaçã«ã¯ãã¾ãä»æ¹ããªãã®ã§ãã¦ã¼ã¹ã±ã¼ã¹ã«å¿ãã¦æ¡ç¨ãã¦ãããã¨ããèãæ¹ããç¾ç¶ã§ã¯åãå¾ãªããåæ£OLTPãããããã¾ã ã§ãã¦ããªãç¶æ ã§ã¯ãHDFSãRDBMSã®äºæã«ã¯ãªããã©ã¡ãã«ããã¦ãAsakusaçãªæºåã¯ããç¨åº¦ã§ãã¦ããã®ã§ãã¾ãç¡é£ã«ã¨ãããã¨ã«ãªããã©ãã¾ãé渡æã ãããã¨ããã®ãæ¬é³ãä¼ç¤¾äºã ã¯ã¨ããããèªåå人ã®å°æ¥ã®æ¹åæ§ã¨ããæå³ã§ã¯ããã®è¾ºããè¦ã¦ããã¨ãããã¨ã§ãæ¥å¹´è²ã åãã¦ããã¾ããããã¨ããæãã§ããã