FoundationDBã¯ã䞊ã¹æ¿ããããããŒãšå€ã®ã¹ãã¢ãã¢ãæ ŒçŽãããã·ãªã¢ã«åå¯èœãªACIDãã©ã³ã¶ã¯ã·ã§ã³ãåããåæ£NoSQLããŒã¿ããŒã¹ã§ãã ããŒãšå€ã¯ãä»»æã®ãã€ãã·ãŒã±ã³ã¹ã«ããããšãã§ããŸãã åäžã®çºçãã€ã³ãã¯ãããŸãã-ãã¹ãŠã®ã¯ã©ã¹ã¿ãŒãã·ã³ã¯åçã§ãã ã¯ã©ã¹ã¿ãŒãµãŒããŒéã§ããŒã¿ãåæ£ãããã®å Žã§ã¹ã±ãŒãªã³ã°ããŸããã¯ã©ã¹ã¿ãŒã«ãªãœãŒã¹ãè¿œå ããå¿ èŠãããå Žåãæ§æãµãŒããŒã«æ°ãããã·ã³ã®ã¢ãã¬ã¹ãè¿œå ããã ãã§ãããŒã¿ããŒã¹ã¯ãããèªåçã«ååŸããŸãã
FoundationDBã§ã¯ããã©ã³ã¶ã¯ã·ã§ã³ãäºãã«ãããã¯ããããšã¯ãããŸããã èªã¿åãã¯ãã«ãããŒãžã§ã³ããŒãžã§ã³ç®¡ç ïŒMVCCïŒã§å®è£ ãããæžã蟌ã¿ã¯æ¥œèŠ³çåæå®è¡å¶åŸ¡ ïŒOCCïŒã§å®è£ ãããŸãã éçºè ã¯ããã¹ãŠã®ã¯ã©ã¹ã¿ãŒãã·ã³ãåãããŒã¿ã»ã³ã¿ãŒã«ããå Žåãæžã蟌ã¿é 延ã¯2ã3ããªç§ã§ãèªã¿åãé 延ã¯1ããªç§æªæºã§ãããšäž»åŒµããŠããŸãã ããã¥ã¡ã³ãã«ã¯10ââã15ããªç§ã®æšå®å€ãå«ãŸããŠããŸãããããã¯ããããå®éã®æ¡ä»¶ã§ã®çµæã«è¿ãã§ãããã
*è€æ°ã®ã·ã£ãŒãã§ACIDããããã£ããµããŒãããŠããŸããã
FoundationDBã«ã¯ãèªåãªã·ã£ãŒãã£ã³ã°ãšãããŠããŒã¯ãªå©ç¹ããããŸãã DBMSèªäœã¯ãã¯ã©ã¹ã¿ãŒå ã®ãã·ã³ã®åçãªããŒããä¿èšŒããŸãã1ã€ã®ãµãŒããŒããã£ã±ãã«ãªããšãããã¯ã°ã©ãŠã³ãã§é£æ¥ãããµãŒããŒã«ããŒã¿ãåé åžããŸãã åæã«ããã¹ãŠã®ãã©ã³ã¶ã¯ã·ã§ã³ã®Serializableã®ã¬ãã«ã®ä¿èšŒãä¿æããã顧客ã«æ°ä»ãå¯äžã®å¹æã¯ãå¿çã®é 延ããããã«å¢å ããããšã§ãã ããŒã¿ããŒã¹ã«ãããè² è·ãæã倧ããã¯ã©ã¹ã¿ãŒãµãŒããŒãšæãå°ãªãã¯ã©ã¹ã¿ãŒãµãŒããŒã®ããŒã¿éã®å·®ã5ïŒ ä»¥äžã«ãªãããšãä¿èšŒãããŸãã
建ç¯
è«ççã«ãFoundationDBã¯ã©ã¹ã¿ãŒã¯ãç°ãªãç©çãã·ã³äžã®é¡äŒŒããããã»ã¹ã®ã»ããã§ãã ããã»ã¹ã«ã¯ç¬èªã®æ§æãã¡ã€ã«ããªãããã亀æå¯èœã§ãã ããã€ãã®åºå®ããã»ã¹ã«ã¯å°çšã®åœ¹å²ïŒã³ãŒãã£ããŒã¿ãŒïŒããããèµ·åæã®åã¯ã©ã¹ã¿ãŒããã»ã¹ã¯ã¢ãã¬ã¹ãç¥ã£ãŠããŸãã ã³ãŒãã£ããŒã¿ãŒã®ã¯ã©ãã·ã¥ã¯ã§ããã ãç¬ç«ããŠããããšãéèŠã§ãããã®ãããç°ãªãç©çãã·ã³ãŸãã¯ç°ãªãããŒã¿ã»ã³ã¿ãŒã«é 眮ããã®ãæé©ã§ãã
ã³ãŒãã£ããŒã¿ãŒã¯ã Paxosã³ã³ã»ã³ãµã¹ã¢ã«ãŽãªãºã ãä»ããŠäºãã«åæããŸãã 圌ãã¯Cluster Controllerããã»ã¹ãéžæãããã®åŸãæ®ãã®ã¯ã©ã¹ã¿ãŒããã»ã¹ã«åœ¹å²ãå²ãåœãŠãŸãã Cluster Controllerã¯ããã¹ãŠã®ã³ãŒãã£ããŒã¿ãŒã«ãèªåãçããŠããããšãç¶ç¶çã«éç¥ããŸãã ã»ãšãã©ã®ã³ãŒãã£ããŒã¿ãŒã圌ãæ»ãã ãšä¿¡ããŠããå Žåã圌ãã¯åã«æ°ãããã®ãéžæããŸãã Cluster ControllerãCoordinatorããã©ã³ã¶ã¯ã·ã§ã³åŠçã«é¢äžããŠããªããããäž»ãªã¿ã¹ã¯ã¯ã¹ããªãããã¬ã€ã³ã®ç¶æ³ãæé€ããããšã§ãã
ã¯ã©ã€ã¢ã³ããããŒã¿ããŒã¹ã«æ¥ç¶ãããå Žåãããã«çŸåšã®Cluster Controllerã®ã¢ãã¬ã¹ã®ãã¹ãŠã®ã³ãŒãã£ããŒã¿ãŒã«ã¢ãã¬ã¹ããŸãã ã»ãšãã©ã®åçãäžèŽããå ŽåãCluster ControllerããçŸåšã®å®å šãªã¯ã©ã¹ã¿ãŒæ§æãåãåããŸãïŒäžèŽããªãå Žåã¯ãã³ãŒãã£ããŒã¿ãŒãå床åŒã³åºããŸãïŒã
Cluster Controllerã¯å©çšå¯èœãªããã»ã¹ã®åèšæ°ãèªèãã圹å²ãé åžããŸããããã5ã€ã¯ãããã·ãããã2ã€ã¯ãªãŸã«ããŒããã®1ã€ã¯ãã¹ã¿ãŒã«ãªããŸãã ãããŠããããã®ãããããæ»äº¡ããå Žåã圌ã¯ããã«åœŒã®ä»£ãããèŠã€ããä»»æã®èªç±ãªããã»ã¹ã«å¿ èŠãªåœ¹å²ãå²ãåœãŠãŸãã ããã¯ãã¹ãŠãããã¯ã°ã©ãŠã³ãã§çºçããã¢ããªã±ãŒã·ã§ã³ããã°ã©ãã«ã¯èŠããŸããã
ãã¹ã¿ãŒããã»ã¹ã¯ãããŒã¿ã»ããã®çŸåšã®ããŒãžã§ã³ã®æ°ïŒããŒã¿ããŒã¹å ã®åã¬ã³ãŒãã§å¢å ããŸãïŒãããã³ã¹ãã¬ãŒãžãµãŒããŒãžã®å€ãã®ããŒã®é åžãšã¬ãŒã調æŽïŒè² è·ãé«ãå Žåã®ããã©ãŒãã³ã¹ã®äººå·¥çãªäœäžïŒã¯ã©ã¹ã¿ãŒãã¯ã©ã€ã¢ã³ããèªèããŠããå ŽåïŒãæ åœããŸãããããã®å°ããªãªã¯ãšã¹ããè¡ãã圌ã¯åŸ ã£ãŠã°ã«ãŒãåããäžåºŠã«ããã¯å šäœã«çããŸãïŒã
ãã©ã³ã¶ã¯ã·ã§ã³ãã®ã³ã°ãšã¹ãã¬ãŒãžã¯ã2ã€ã®ç¬ç«ããã¹ãã¬ãŒãžãµãã·ã¹ãã ã§ãã 1ã€ç®ã¯ãããŒã¿ãåä¿¡é ã«ãã°ãããã£ã¹ã¯ã«æžã蟌ãããã®äžæçãªã¹ãã¬ãŒãžã§ãã2ã€ç®ã¯ããã£ã¹ã¯äžã®ããŒã¿ãããŒã®æé ã§ãœãŒããããæ°žç¶çãªã¹ãã¬ãŒãžã§ãã åãã©ã³ã¶ã¯ã·ã§ã³ã®ã³ããããå°ãªããšã3ã€ã®tLogããã»ã¹ã¯ãã¯ã©ã¹ã¿ãŒãã¯ã©ã€ã¢ã³ãã«æåãå ±åããåã«ããŒã¿ãä¿åããå¿ èŠããããŸãã 䞊è¡ããŠãããã¯ã°ã©ãŠã³ãã®ããŒã¿ã¯tLogãµãŒããŒããã¹ãã¬ãŒãžãµãŒããŒã«ç§»åããŸãïŒã¹ãã¬ãŒãžãåé·ã§ãïŒã
ãªã¯ãšã¹ãåŠç
ãã¹ãŠã®ã¯ã©ã€ã¢ã³ãèŠæ±ããããã·ããã»ã¹ãåŠçããŸãã ãã©ã³ã¶ã¯ã·ã§ã³ãéããšãã¯ã©ã€ã¢ã³ãã¯ãããã·ã«ã¢ã¯ã»ã¹ããä»ã®ãã¹ãŠã®ãããã·ãããŒãªã³ã°ããã¯ã©ã¹ã¿ãŒããŒã¿ã®çŸåšã®ããŒãžã§ã³çªå·ãè¿ããŸãã ãã以éã®èªã¿åãã¯ãã¹ãŠããã®ããŒãžã§ã³çªå·ã§è¡ãããŸãã ãã©ã³ã¶ã¯ã·ã§ã³ãéããåŸã«å¥ã®ã¯ã©ã€ã¢ã³ããããŒã¿ãæžãçããå Žåããã®å€æŽã¯è¡šç€ºãããŸããã
競åã解決ããå¿ èŠãããããããã©ã³ã¶ã¯ã·ã§ã³ã®èšé²ã¯ããå°ãè€éã§ãã ããã«ã¯ãå€æŽããããã¹ãŠã®ããŒãäžå®æéã¡ã¢ãªã«ä¿åãããªãŸã«ããŒããã»ã¹ãå«ãŸããŸãã ã¯ã©ã€ã¢ã³ããæžã蟌ã¿ã®ã³ããããã©ã³ã¶ã¯ã·ã§ã³ãå®äºãããšããªãŸã«ããŒã¯èªã¿åãäžã®ããŒã¿ãå€ããã©ããã確èªããŸãã ïŒã€ãŸããç§ã®ãã©ã³ã¶ã¯ã·ã§ã³ãããåŸã«éããããã©ã³ã¶ã¯ã·ã§ã³ãå®äºããèªã¿åã£ãããŒãå€æŽããããã©ãããïŒãããçºçããå Žåããã©ã³ã¶ã¯ã·ã§ã³ã¯ããŒã«ããã¯ãããã¯ã©ã€ã¢ã³ãã©ã€ãã©ãªèªäœïŒïŒïŒãå床ã³ããããè©Šã¿ãŸãã éçºè ãèããå¿ èŠãããã®ã¯ããã©ã³ã¶ã¯ã·ã§ã³ãã¹ãçã§ãããšããããšã ãã§ããã€ãŸããç¹°ãè¿ã䜿çšããŠãåãçµæãåŸãããã¯ãã§ãã ãããå®çŸãã1ã€ã®æ¹æ³ã¯ããã©ã³ã¶ã¯ã·ã§ã³å ã§äžæã®å€ãä¿åãããã©ã³ã¶ã¯ã·ã§ã³ã®éå§æã«ããŒã¿ããŒã¹å ã§ãã®ååšã確èªããããšã§ãã
ãã¹ãŠã®ã¯ã©ã€ã¢ã³ã/ãµãŒããŒã·ã¹ãã ãšåæ§ã«ããã©ã³ã¶ã¯ã·ã§ã³ãæ£åžžã«å®äºããããåæã®ããã«ã¯ã©ã€ã¢ã³ãã確èªãåä¿¡ããªãã£ãå ŽåããããŸãã ã¯ã©ã€ã¢ã³ãã©ã€ãã©ãªã¯ãããããä»ã®ãšã©ãŒãšåæ§ã«æ±ããŸããåã«åè©Šè¡ããŸãã ããã«ããããã©ã³ã¶ã¯ã·ã§ã³å šäœãåå®è¡ãããå¯èœæ§ããããŸãã ãã ãããã©ã³ã¶ã¯ã·ã§ã³ãã¹ãçã§ããå Žåãããã«åé¡ã¯ãããŸãããæçµçµæã«ã¯åœ±é¿ããŸããã
ã¹ã±ãŒãªã³ã°
ã¹ãã¬ãŒãžãµãã·ã¹ãã ã«ã¯æ°åã®ãµãŒããŒãååšããå ŽåããããŸãã ç¹å®ã®ããŒã«é¢ããããŒã¿ãå¿ èŠãªå Žåãã¯ã©ã€ã¢ã³ãã¯ã©ã¡ãã«é£çµ¡ããå¿ èŠããããŸããïŒ Cluster Controllerãããã¯ã©ã€ã¢ã³ãã¯ã¯ã©ã¹ã¿ãŒå šäœã®å®å šãªæ§æãèªèããåã¹ãã¬ãŒãžãµãŒããŒã®ããŒç¯å²ãå«ãŸããŸãã ãã®ãããäžéãªã¯ãšã¹ããªãã§ãç®çã®ã¹ãã¬ãŒãžãµãŒããŒã«çŽæ¥ã¢ã¯ã»ã¹ããã ãã§ãã
ç®çã®ã¹ãã¬ãŒãžãµãŒããŒã䜿çšã§ããªãå Žåãã¯ã©ã€ã¢ã³ãã©ã€ãã©ãªã¯Cluster Controllerããæ°ããæ§æãååŸããŸãã ãµãŒããŒãã¯ã©ãã·ã¥ããçµæãã¯ã©ã¹ã¿ãŒãåé·æ§ãäžååã§ãããšèªèããå Žåãã¯ã©ã¹ã¿ãŒã¯ããã«ä»ã®ã¹ãã¬ãŒãžããæ°ããããŒãã®åéãéå§ããŸãã
ãã©ã³ã¶ã¯ã·ã§ã³ã§ã®ã¬ãã€ãã®ããŒã¿ãä¿åãããšããŸãã ã©ãããã°è¿ éã«å¯Ÿå¿ã§ããŸããïŒ æ¹æ³ã¯ãããŸããããããã£ãŠãFoundationDBã¯1ã€ã®ãã©ã³ã¶ã¯ã·ã§ã³ã®ãµã€ãºã10ã¡ã¬ãã€ãã«å¶éããŸããã ããã«ãããã¯ããã©ã³ã¶ã¯ã·ã§ã³ãé¢ä¿ãããã¹ãŠã®ããŒã¿ïŒèªã¿åããŸãã¯æžã蟌ã¿ïŒ ã«å¯Ÿããå¶éã§ãã ããŒã¿ããŒã¹ã®åãšã³ããªãå¶éãããŠããŸããããŒã¯10ãããã€ããè¶ ããããšã¯ã§ããŸãããå€ã¯100ãããã€ãã§ãã ïŒåæã«ãæé©ãªããã©ãŒãã³ã¹ã®ããã«ãéçºè ã¯32ãã€ãã®é·ãã®ããŒãš10ãããã€ãã®é·ãã®å€ãæšå¥šããŸããïŒ
ãã©ã³ã¶ã¯ã·ã§ã³ã¯æœåšçã«ç«¶åã®åå ã«ãªãå¯èœæ§ããããããããŒã«ããã¯ããå¿ èŠããããŸãã ãããã£ãŠãã³ãããã³ãã³ããå°çãããŸã§ãé床ã®ããã«ãçŸåšã®å€æŽããã£ã¹ã¯ã§ã¯ãªãRAMã«ä¿æããã®ãçã«ããªã£ãŠããŸãã 1GB /ç§ã®è² è·ã§ããŒã¿ããŒã¹ã«ããŒã¿ãæžã蟌ããšããŸãã ãã®åŸã極端ãªå Žåã®ã¯ã©ã¹ã¿ãŒã¯æ¯ç§3GBã®RAMãå²ãåœãŠãŸãïŒ3å°ã®ãã·ã³ã«ãã©ã³ã¶ã¯ã·ã§ã³ãæžã蟌ã¿ãŸãïŒã ãã®ãããªäœ¿çšæžã¿ã¡ã¢ãªã®éªåŽ©ã®ãããªæé·ãå¶éããæ¹æ³ã¯ïŒ æ倧ãã©ã³ã¶ã¯ã·ã§ã³æéãå¶éããã®ã¯éåžžã«ç°¡åã§ãã FoundationDBã§ã¯ããã©ã³ã¶ã¯ã·ã§ã³ã¯5ç§ãè¶ ããããšã¯ã§ããŸããã ãã©ã³ã¶ã¯ã·ã§ã³ãéãããŠãã5ç§åŸã«ã¯ã©ã€ã¢ã³ããããŒã¿ããŒã¹ã«ã¢ã¯ã»ã¹ããããšãããšãã¯ã©ã¹ã¿ãŒã¯æ°ããã³ãã³ããéããŸã§ãã¹ãŠã®ã³ãã³ããç¡èŠããŸãã
ææ°
人ã®ãªã¹ããä¿æããå人ãäžæã®èå¥åãæã¡ããããããŒãšããŠäœ¿çšããå€ã«ä»ã®ãã¹ãŠã®å±æ§ïŒååãæ§å¥ã幎霢ãªã©ïŒãæžã蟌ããšããŸãã
ã㌠| äŸ¡å€ |
12345 | ïŒIvanov Ivan IvanovichãMã35ïŒ |
培åºçãªæ€çŽ¢ãããã«30æ³ã®ãã¹ãŠã®äººã®ãªã¹ããååŸããæ¹æ³ã¯ïŒ éåžžããã®ããã«ããŒã¿ããŒã¹ã«ã€ã³ããã¯ã¹ãäœæãããŸãã ã€ã³ããã¯ã¹ã¯ãè¿œå ã®å±æ§ããã°ããæ€çŽ¢ããããã«èšèšãããå¥ã®ããŒã¿ãã¥ãŒã§ãã 次ã®åœ¢åŒã®ãšã³ããªãç°¡åã«è¿œå ã§ããŸãã
ã㌠| äŸ¡å€ |
ïŒ35ã12345ïŒ | '' |
å¿ èŠãªãªã¹ããååŸããã«ã¯ãããŒã®ç¯å²ïŒ30ã*ïŒãæ€çŽ¢ããã ãã§ãã FoundationDBã¯ããŒã§ãœãŒããããããŒã¿ãä¿åããããããã®ãããªã¯ãšãªã¯éåžžã«é«éã«å®è¡ãããŸãã ãã¡ãããã€ã³ããã¯ã¹ã¯è¿œå ã®ãã£ã¹ã¯é åãå æããŸãããããªãã®éãå¿ èŠã§ãã ãã¹ãŠã®å±æ§ãè€è£œãããããã§ã¯ãªãã幎霢ãšèå¥åã®ã¿ãè€è£œãããããšã«æ³šæããŠãã ããã
ã¬ã³ãŒãèªäœãšããã«ã€ã³ããã¯ã¹ãè¿œå ããæäœã1ã€ã®ãã©ã³ã¶ã¯ã·ã§ã³ã§å®è¡ãããããšãéèŠã§ãã
ä¿¡é Œæ§
FoundationDBã¯C ++ã§èšè¿°ãããŠããŸãã èè ã¯2009幎ã«äœæ¥ãéå§ããæåã®ããŒãžã§ã³ã¯2013幎ã«ãªãªãŒã¹ããã2015幎3æã«Appleã«è²·åãããŸããã 3幎åŸãAppleã¯äºæãããœãŒã¹ã³ãŒããéããŸããã åã§ã¯ ãAppleãiCloudãµãŒãã¹ã®ããŒã¿ãä¿åããããã«ããšãããããã䜿çšããŠãããšããã
çµéšè±å¯ãªéçºè ã¯éåžžãããã«æ°ãããœãªã¥ãŒã·ã§ã³ãä¿¡é ŒããŸããã æè¡ã確å®ã«ç¢ºç«ããããŸã§ã«ã¯æ°å¹Žãããå Žåãããã補åã§å€§éã«äœ¿çšãããããã«ãªããŸãã ãã®æéãççž®ããããã«ãèè ã¯C ++ã®èå³æ·±ãæ¡åŒµæ©èœã§ãããããŒèšèªãäœæããŸããã ããã«ãããããã°ã©ã å®è¡ã®å®å šã«äºæž¬å¯èœãªç¹°ãè¿ãã®å¯èœæ§ã«ãããä¿¡é Œã§ããªãå€éšã³ã³ããŒãã³ãã䜿çšããŠäœæ¥ãæ£åžžã«ãšãã¥ã¬ãŒãã§ããŸãã ãããã¯ãŒã¯ãŸãã¯ãã£ã¹ã¯ãžã®ååŒã³åºãã¯ã©ãããŒïŒã¢ã¯ã¿ãŒïŒã«ã©ãããããåã¢ã¯ã¿ãŒã«ã¯ããã€ãã®å®è£ ããããŸãã æšæºå®è£ ã§ã¯ãæå³ãããšããã«ããŒã¿ããã£ã¹ã¯ãŸãã¯ãããã¯ãŒã¯ã«æžã蟌ã¿ãŸãã ãããŠãä»ã¯1000åã®ãã¡999åãã£ã¹ã¯ã«æžã蟌ã¿ã1000åã®ãã¡1å倱ãããŸãã 代æ¿ã®ãããã¯ãŒã¯å®è£ ã§ã¯ãããšãã°ããããã¯ãŒã¯ãã±ããå ã®ãã€ãã亀æã§ããŸãã äžæ³šæãªã·ã¹ãã 管çè ã®äœæ¥ãæš¡å£ããã¢ã¯ã¿ãŒããããŸãã ããã«ãããããŒã¿ãã©ã«ããŒãåé€ããããã2ã€ã®ãã©ã«ããŒãã¹ã¯ãããããå ŽåããããŸãã éçºè ã¯æ°åã®ã·ãã¥ã¬ãŒã·ã§ã³ãå®è¡ã ãããŸããŸãªã¢ã¯ã¿ãŒã眮ãæããFlowã䜿çšããŠ100ïŒ ã®åçŸæ§ãå®çŸããŸãããã¹ããã¯ã©ãã·ã¥ããå Žåãã·ãã¥ã¬ãŒã·ã§ã³ãåéããŠåãå Žæã§ã¯ã©ãã·ã¥ããããšãã§ããŸãã ç¹ã«ãã¹ã¬ãããåãæ¿ãããšãã«OSã¹ã±ãžã¥ãŒã©ãŒã«ãã£ãŠçããäžç¢ºå®æ§ãæé€ããããã«ãåFoundationDBããã»ã¹ã¯å³å¯ã«ã·ã³ã°ã«ã¹ã¬ããã§ãã
ã»ãŒãã¹ãŠã®äžè¬çãªNoSQLãœãªã¥ãŒã·ã§ã³ã§ããŒã¿æ倱ã®ã·ããªãªãçºèŠããç 究è ãFoundationDBããã¹ãããããã«é ŒãŸãããšããèè ã¯å·šå€§ãªä»äºãããèªåèªèº«ãããã¯ããã«æ·±ã培åºçã«ãã¹ãã ãããããã€ã³ããããããªããšææããŠæåŠããŸããã
ã¯ã©ã¹ã¿ãŒé害ã¯ã©ã³ãã ã§ãããšèããã®ãæ £ç¿ã§ãããçµéšè±å¯ãªéçºè ã¯ãããã±ãŒã¹ãšã¯çšé ãããšãç¥ã£ãŠããŸãã åãã¡ãŒã«ãŒãšåãæ°ã®ä»ã®ãã£ã¹ã¯ã1äžå°æã£ãŠããå Žåãæ éçã¯ç°ãªããŸãã FoundationDBã§ã¯ãã©ã®ãã·ã³ãåãããŒã¿ã»ã³ã¿ãŒã«ãããã©ã®ããã»ã¹ãåããã·ã³ã«ããããã¯ã©ã¹ã¿ãŒã«äŒããããšãã§ããããããããã·ã³å¯Ÿå¿ã®æ§æãå¯èœã§ãã ããŒã¿ããŒã¹ã¯ããã·ã³éã§è² è·ãåæ£ãããšãã«ãããèæ ®ããŸãã ãŸããã¯ã©ã¹ã¿ãŒå ã®ãã·ã³ã«ã¯éåžžãç°ãªãç¹æ§ããããŸãã FoundationDBã¯ãããèæ ®ã«å ¥ãããªã¯ãšã¹ããã¥ãŒã®é·ãã調ã¹ããã©ã³ã¹ã®åããæ¹æ³ã§è² è·ãååæ£ããŸãããã匱ããã·ã³ã¯ããå°ãªããªã¯ãšã¹ããåä¿¡ããŸãã
ãã®ãããFoundationDBã¯ãACIDãã©ã³ã¶ã¯ã·ã§ã³ãšæé«ã¬ãã«ã®åé¢ã§ããSerializableãæ°åå°ã®ãã·ã³ã®ã¯ã©ã¹ã¿ãŒã§æäŸããŸãã é©ãã¹ãæè»æ§ãšé«æ§èœã䜵ãæã€ãéæ³ã®ããã«èãããŸãã ãã ãããã¹ãŠã®è²»çšãæ¯æãå¿ èŠããããããæè¡çãªå¶éããããŸãã
å¶éäºé
ãã©ã³ã¶ã¯ã·ã§ã³ã®ãµã€ãºãšé·ãã«é¢ããåè¿°ã®å¶éã«å ããŠã次ã®æ©èœã«æ³šæããããšãéèŠã§ãã
- ã¯ãšãªèšèªã¯SQLã§ã¯ãããŸãããã€ãŸããSQLã®çµéšãããéçºè
ã¯ååŠç¿ããå¿
èŠããããŸãã
- ã¯ã©ã€ã¢ã³ãã©ã€ãã©ãªã¯ã5ã€ã®é«ã¬ãã«èšèªïŒPhytonãRubyãJavaãGolangãããã³CïŒã®ã¿ããµããŒãããŸãã CïŒã®å
¬åŒã¯ã©ã€ã¢ã³ãã¯ãŸã ãããŸããã REST APIããªããããå¥ã®èšèªããµããŒãããå¯äžã®æ¹æ³ã¯ãæšæºCã©ã€ãã©ãªã®äžã«ã©ãããŒãèšè¿°ããããšã§ãã
- å
±æã¡ã«ããºã ã¯ãããŸããããã®ããžãã¯ã¯ãã¹ãŠã¢ããªã±ãŒã·ã§ã³ã§æäŸããå¿
èŠããããŸãã
- ããŒã¿ã¹ãã¬ãŒãžåœ¢åŒã¯ææžåãããŠããŸããïŒéåžžãåçšããŒã¿ããŒã¹ã«ãææžåãããŠããŸããïŒã ããã¯ãªã¹ã¯ã§ããã¯ã©ã¹ã¿ãŒãçªç¶ã¢ã»ã³ãã«ãããªãå Žåãäœããã¹ãããããã«ã¯ããããããœãŒã¹ãã¡ã€ã«ãæãäžããå¿
èŠãããããã§ãã
- å³å¯ã«éåæã®ããã°ã©ãã³ã°ã¢ãã«ã¯ãåå¿è
ã®éçºè
ã«ãšã£ãŠã¯è€éã«æãããããããŸããã
- ãã©ã³ã¶ã¯ã·ã§ã³ã®ã¹ãçæ§ã«ã€ããŠåžžã«èããå¿
èŠããããŸãã
- é·ããã©ã³ã¶ã¯ã·ã§ã³ãå°ããªãã©ã³ã¶ã¯ã·ã§ã³ã«åå²ããå¿
èŠãããå Žåã¯ãã°ããŒãã«ã¬ãã«ã§æŽåæ§ãèªåã§ç®¡çããå¿
èŠããããŸãã
è±èªãã翻蚳ãããšããFoundationãã¯ãFoundationããæå³ãããã®DBMSã®äœæè ã¯ãã®ããã«ãã®åœ¹å²ãç解ããŸããåçŽãªã¬ã³ãŒãã®ã¬ãã«ã§é«ãã¬ãã«ã®ä¿¡é Œæ§ãæäŸããä»ã®ããŒã¿ããŒã¹ã¯åºæ¬æ©èœã®ã¢ããªã³ãšããŠå®è£ ã§ããŸãã ãããã£ãŠãFoundationDBã®äžã«ãããã¥ã¡ã³ããã°ã©ããªã©ãããŸããŸãªä»ã®ã¬ã€ã€ãŒãæœåšçã«äœæã§ããŸãã åé¡ã¯ãããã©ãŒãã³ã¹ãæãªãããšãªããããã®ã¬ã€ã€ãŒãã©ã®ããã«æ¡åŒµãããã§ãã ããšãã°ãCockroachDBã®äœæè ã¯æ¢ã«RocksDBïŒããŒã«ã«ããŒããªã¥ãŒã¹ãã¢ïŒã®äžã«SQLã¬ã€ã€ãŒãæ§ç¯ããããšã§ãã®éãæ©ãã§ããããªã¬ãŒã·ã§ãã«çµåã«åºæã®ããã©ãŒãã³ã¹ã®åé¡ãæ±ããŠããŸãã
ãããŸã§ã«ãAppleã¯FoundationDBã®äžã«2ã€ã®ã¬ã€ã€ãŒãéçºããå ¬éããŠããŸãïŒ ããã¥ã¡ã³ãã¬ã€ã€ãŒ ïŒMongoDB APIããµããŒãïŒããã³ã¬ã³ãŒãã¬ã€ã€ãŒ ïŒ ãããã³ã«ãããã¡ãŒåœ¢åŒã§ãã£ãŒã«ãã»ãããšããŠã¬ã³ãŒããä¿åããã€ã³ããã¯ã¹ããµããŒãããJavaã§ã®ã¿äœ¿çšå¯èœïŒã æŽå²çã«ééãããAppleã®äŒæ¥ãä»æ¥GoogleãšMicrosoftã®è¶³è·¡ããã©ããå éšã§äœ¿çšãããŠããæè¡ã®ãœãŒã¹ã³ãŒããå ¬éããŠããã®ã¯åã°ãããé©ãã¹ãããšã§ãã
èŠèŸŒã¿
ãœãããŠã§ã¢éçºã«ã¯ãã®ãããªå®åçãªççŸããããŸããããžãã¹ã¯åžžã«è£œåã®å€æŽãšæ¹åãæãã§ããŸãã ãããåæã«ã圌ã¯ä¿¡é Œã§ãããœãããŠã§ã¢ãæ±ããŠããŸãã ãŸãããœãããŠã§ã¢ãå€æŽããããšãã°ãçºçããããžãã¹ãããã«èŠããããããããã®2ã€ã®èŠä»¶ã¯äºãã«ççŸããŸãã ãããã£ãŠã補åã§ä¿¡é Œæ§ã®ããå®èšŒæžã¿ã®æè¡ã«äŸåããèªåã§ã³ãŒããèšè¿°ããªããŠæžãå Žåãããã¯åžžã«äŸ¡å€ããããŸãã ãã®æå³ã§ãç¹å®ã®å¶éã«ãããããããæŸèæãç°ãªãNoSQLããŒã¿ããŒã¹ã«ã¹ã«ã«ããããã®ã§ã¯ãªããACIDããããã£ãåããå®çšŒåå®èšŒæžã¿ã®ãœãªã¥ãŒã·ã§ã³ã䜿çšã§ããã®ã¯ã¯ãŒã«ã§ãã
1幎åãç§ãã¡ã¯å¥ã®ãã¯ãããžãŒã§ããCockroachDBã«ã€ããŠæ¥œèŠ³çã§ããããããã©ãŒãã³ã¹ã«å¯ŸããæåŸ ã«å¿ããããšãã§ããŸããã§ããã ãã以æ¥ãåæ£ããŒãšå€ã®ã¹ãã¢äžã®SQLã¬ã€ã€ãŒã®ã¢ã€ãã¢ã«å¯Ÿãã欲æ±ã倱ãããã®ãããããšãã°TiDBã泚ææ·±ãèŠãŠããŸããã§ãã ã FoundationDBã¯ããããžã§ã¯ãã®æ倧ã®ããŒã¿ã»ããã®ã»ã«ã³ããªããŒã¿ããŒã¹ãšããŠæ éã«è©Šãäºå®ã§ãã FoundationDBãŸãã¯TiDBãå®çšŒåã§å®éã«äœ¿çšããçµéšãããå Žåã¯ãã³ã¡ã³ãã§ãæèŠããèãããã ããã