Apache Igniteã³ãã¥ããã£ã®ã¡ã³ããŒã¯ãããã®ãããªéã®ããŒã¿ãããŒãããã«ã¯ãããã€ã®ããŒããšã¡ã¢ãªãå¿ èŠã§ããïŒããšããå°ããããŸããä»æ¥ãããã«ã€ããŠã話ããããšæããŸãã ä»åŸã®èŠéãïŒãã®ãããªäºæž¬ã¯ãäŸç¶ãšããŠããªãè€éã§ãããéèŠãªäœæ¥ã§ãã ãããè¡ãã«ã¯ãApache Igniteããã€ã¹ãå°ãç解ããå¿ èŠããããŸãã ãŸããäºæž¬ã¿ã¹ã¯ãåçŽåããæ¹æ³ãããã³é©çšã§ããæé©åã«ã€ããŠã説æããŸãã
ãã®ãããéåžžã«é »ç¹ã«ãŠãŒã¶ãŒãç§ãã¡ã®ãšããã«æ¥ãŠããèšããŸãããããŒã¿ã¯ãã¡ã€ã«åœ¢åŒã§è¡šç€ºãããŸãã ããã®ããŒã¿ãApache Igniteã«å€æããã«ã¯ã©ããããã®ã¡ã¢ãªãå¿ èŠã§ããïŒã
ãã®å®åŒåã§ã¯ãç°ãªããã¡ã€ã«åœ¢åŒãå®å šã«ç°ãªãã¢ãã«ã«å€æãããããã質åã«çããããšã¯ã»ãšãã©äžå¯èœã§ãã ããšãã°ããã¡ã€ã«ãå§çž®ãããŠããå ŽåããããŸãã ãŸããããçš®ã®å€å žçãªãã€ããªåœ¢åŒã«å§çž®ãããŠããªãããããŒã¿ãéè€æé€ã§ããå Žåããã¡ã€ã«ã¯æé»çã«å§çž®ãããŸãã
ãŸããApache Igniteã¯ããŸããŸãªããŒãŸãã¯SQLã€ã³ããã¯ã¹ã«ããããŒã¿ãžã®è¿ éãªã¢ã¯ã»ã¹ãæäŸããããšãå¿ããªãã§ãã ããããããã£ãŠããã¡ã€ã«ã«ããããŒã¿ã«å ããŠãè¿œå ã³ã¹ãã§è¿œå ã®ã€ã³ããã¯ã¹ãäœæããŸãã ãããã£ãŠãäžè¬çãªå Žåãã€ã³ããã¯ã¹ä»ããã£ãŒã«ãã®ãµã€ãºã¯ç°ãªãå¯èœæ§ããããããåäžã®ã€ã³ããã¯ã¹ãåèšããŒã¿éã®äžéšãè¿œå ãããšèšãã®ã¯æ£ãããããŸããã ã€ãŸããäžå®ã®å²åã®ã¡ã¢ãªãã€ã³ããã¯ã¹ã«å²ãåœãŠãããšã¯ééã£ãŠããŸãã
åé¡ãåå®åŒåããŸãããã ã¢ãã«ã¯ããã€ãã®ã¿ã€ãã§æ§æãããŠãããšèšããåã¿ã€ãã®æ§é ãããç解ããŠããŸãã ããã«ãã¢ãã«ã«å¯å€ãµã€ãºã®ãã£ãŒã«ãïŒæååãªã©ïŒãããå ŽåãããŒã¿ã»ããå šäœã®ãµã€ãºååžã ãã§ãªããæå°ããã³æ倧ããŒã¿ãµã€ãºãæŠç®ã§ããŸãã 䜿çšããããŒã¿åã®æ°ãšååã®æ å ±éã«åºã¥ããŠãã¡ã¢ãªãšãã£ã¹ã¯ã®éãèšç»ããŸãã
çµéšçã¢ãããŒã
çµéšçãªã¢ãããŒãã¯å°ãäžæ£ç¢ºãããããŸãããããŠãŒã¶ãŒã®èŠ³ç¹ããã¯ãã·ã¹ãã ã®æ§é ã«æ·±ã没é ããå¿ èŠã¯ãããŸããã ã¢ãããŒãã®æ¬è³ªã¯æ¬¡ã®ãšããã§ãã
ããŒã¿ã®ä»£è¡šçãªãµã³ãã«ãåããApache Igniteã«ã¢ããããŒãããŸãã ããŒãäžã«ãã¹ãã¬ãŒãžãµã€ãºã®å¢å ã芳å¯ããŸãã ç¹å®ã®ããªã¥ãŒã ã§ã¯ããã«ãããªãããå®è¡ããŠãããŒã¿ã»ããå šäœã«å¿ èŠãªã¹ãã¬ãŒãžããªã¥ãŒã ãç·åœ¢ã«æšå®ããã³äºæž¬ã§ããŸãã
éåžžãããã«ã¯ã代衚çãªãµã³ãã«ã¯ã©ãããã¹ãã§ããïŒããšãã質åããããŸãã
ã©ã³ãã ã«ãµã³ãã«ãçæãããã ãããããžã§ãã¬ãŒã¿ãŒã¯ãçæäžã®é€ç®ã®æ®ããã»ããã«å«ãŸããããã«ããŒã¿ãåéããããšãå€æããŸããã ããæç¹ã§ãåäžãªååžãæã€ã¯ãã®ã©ã³ãã ãªæååãå®éã«ãã®ååžãæããªãããšãå€æããŸããã ãããã£ãŠãã¹ãã¬ãŒãžã®éãè©äŸ¡ãããšãã¯ãæäœããŠããé åžã代衚ãµã³ãã«ã§å®éã«å®è¡ãããŠããããšã確èªããŠãã ããã
ãŸãããªããžã§ã¯ãã®ãµã€ãºã®åºããã«ã泚æããŠãã ããã ããããåãé·ãã§ãããšä»®å®ããå Žåãäžè¬çã«ãå°æ°ã®ãªããžã§ã¯ãã§ä»£è¡šçãªãµã³ãã«ã«ååã§ãã å€åæ§ã倧ããã»ã©ããã£ãŒã«ããµã€ãºã®çµã¿åãããå€ãã»ã©ãé¢ä¿ãç解ããããã«ãµã³ãã«ãããŠã³ããŒãããå¿ èŠã倧ãããªããŸãã ç§èªèº«ã®çµéšããèšãã°ãããŒãããšã«1ã€ã®ããŒãã£ã·ã§ã³ã«ããŒãããã100äžåã®ãªããžã§ã¯ãã«ãã£ãŠãäŸåé¢ä¿ã¯ã©ããã§è§£æ¶ããå§ããŸãã
代衚çãªãµã³ãã«ã®ããŒãäžã«æ£ç¢ºã«ç£èŠããå¿ èŠããããã®ã¯äœã§ããïŒ æ°žç¶åã䜿çšããå ŽåãååŸãããã¡ã€ã«ã®éã確èªã§ããŸãã ãŸãã¯ããªãŒãžã§ã³ããŒã¿ã®ã¡ããªãã¯ãApache Igniteæ§æã®ã¡ããªãã¯ããªã³ã«ããMX Beanã䜿çšããŠã¡ã¢ãªã®å¢å ãç£èŠãããã«ãããªãããšãããããè¡ãããšãã§ããŸãã
æ°å€è©äŸ¡
ãã®å ŽåãApache Igniteã§ãªããžã§ã¯ããä¿åãããšãã«ãªããžã§ã¯ããåããããŒã¿æ§é ãå€æŽãããã¹ãŠã®æ®µéãçµãŠãã¡ã¢ãªæ¶è²»ãå¢ããå¯èœæ§ã®ããåšå²ã®ããŒã¿æ§é ã調ã¹ãŸãã ã©ã®ãããªå€åãèµ·ãã£ãŠããã®ããã©ã®ããŒã¿æ§é ãå€åããŠããã®ããç解ããã°ãããŒã¿ãããŒãããããã«å¿ èŠãªã¡ã¢ãªéãããªãæ£ç¢ºã«æšå®ã§ããŸãã
Apache Igniteã«æžã蟌ããšãã®ãã£ãã·ã¥ãããæäœãåæããŸãããã ããŒã¿ã¯å€æã®4ã€ã®æ®µéãééããŸãã
äžéšã®ãŠãŒã¶ãŒã¯ã¯ã©ã¹ãæäœããJavaãªããžã§ã¯ããApache Igniteã«æž¡ããããæåã®æ®µéã¯ãªãã·ã§ã³ã§ãã äžéšã®ãŠãŒã¶ãŒã¯ãã€ããªãªããžã§ã¯ããçŽæ¥äœæããããããªããžã§ã¯ããå€æããæåã®æ®µéã¯ã¹ããããããŸãã ãã ããJavaãªããžã§ã¯ãã䜿çšããå Žåãããã¯ãªããžã§ã¯ããåããæåã®å€æã§ãã
Javaãªããžã§ã¯ãããã€ããªãªããžã§ã¯ãã«å€æããåŸãã¯ã©ã¹ã«äŸåããªã圢åŒãååŸããŸãã ãã®æ¬è³ªã¯ãã¯ã©ã¹ã®èª¬æããªããŠããã¯ã©ã¹ã¿ãŒå ã®ãã€ããªãªããžã§ã¯ããæäœã§ããããšã§ãã ããã«ãããã¯ã©ã¹ã®æ§é ãå€æŽãããªããžã§ã¯ãã®æ§é ã®å€æŽã®ããããããŒãªã³ã°ãå®è¡ã§ããŸãã ã€ãŸããã¢ãã«ãæé·ããå€åããã¯ã©ã¹ãã¯ã©ã¹ã¿ãŒã«ãããã€ããããšãªããã¯ã©ã¹ãå€æŽããã«ããŒã¿ãæäœããæ©äŒãåŸãããŸãã
å€æŽã®ç¬¬3段éãè¿œå ã®ãªãŒããŒãããã®å°å ¥-ãã£ã¹ã¯ãžã®æžã蟌ã¿ã ãã£ã¹ã¯ã®äœæ¥åäœã¯ãåŸæ¥ã¯ããŒãžã§ãã ãŸããApache Ignite 2.0以éãããŒãžã¢ãŒããã¯ãã£ã«åãæ¿ããŸããã ããã¯ãåããŒãžã«ãªãã·ã§ã³ã®ã¿ã€ãã«ãäžéšã®ã¡ã¿ããŒã¿ããããããŒãžã«ãªããžã§ã¯ããæžã蟌ããšãã«ãã¹ããŒã¹ãå æããããšãæå³ããŸãã
ãŸããèæ ®ããå¿ èŠãããæåŸã®éšåã¯ãã€ã³ããã¯ã¹ã®æŽæ°ã§ãã SQLã䜿çšããŠããªãå Žåã§ããApache Igniteã§ã¯ããŒã«ãã°ããã¢ã¯ã»ã¹ã§ããŸãã ããã¯ãã¡ã€ã³ã®Apache Igniteãã£ãã·ã¥APIã§ãã ãããã£ãŠãäž»ããŒã®ã€ã³ããã¯ã¹ã¯åžžã«æ§ç¯ãããã¹ããŒã¹ãç¡é§ã«ãªããŸãã
ããã¯ãã€ããªãªããžã§ã¯ãã§ãã
æ§é ãæ·±ãæãäžããããšã¯ãããäžè¬çã«ã¯ãäžçš®ã®èŠåºãã次ã«ãã£ãŒã«ããéèŠãªããŒã¿ãšããã¿ãŒãšããŠè¡šçŸã§ããŸãã ãã€ããªãªããžã§ã¯ãããããŒã«ã¯24ãã€ããå¿ èŠã§ãã ããããããã¯ãããããããŸãããã¯ã©ã¹ã®ãªããªããžã§ã¯ãã®å¯å€æ§ããµããŒãããããã«ã¯éåžžã«å€ããå¿ èŠã§ãã
ãã£ãã·ã¥ã«å ¥ããããŒã¿ã®ã¢ãã«ã«äœããã®å éšæ§é ã®æ¡æ£ãå«ãŸããå Žåãããã€ãã®å°ããªãªããžã§ã¯ããå ã®å€§ããªãªããžã§ã¯ãã«ã€ã³ã©ã€ã³åã§ãããã©ããã確èªãã䟡å€ããããŸããïŒ ååãšããŠããã®ãããªã€ã³ã©ã€ã³åã¯ãªããžã§ã¯ãããšã«24ãã€ããç¯çŽããŸããã¢ãã«ãååã«å€§ããå Žåãå€§å¹ ã«å¢å ããŸãã
ããã¿ãŒã®ãµã€ãºã¯compactFooterãã©ã°ã«äŸåããŸããããã«ããããªããžã§ã¯ãã®æ§é ãè¿œå ã®ã¡ã¿ããŒã¿ã«æžã蟌ãããšãã§ããŸãã ã€ãŸãããªããžã§ã¯ãèªäœã®ãã£ãŒã«ãã®é åºãèšè¿°ãã代ããã«ãããããåå¥ã«ä¿åããŸãã compactFooterãtrueã®å Žåãããã¿ãŒã¯éåžžã«å°ãããªããŸãã ãããåæã«ãApache Igniteã¯ãã®ã¡ã¿ããŒã¿ãä¿åããã³ç¶æããããã«è¿œå ã®æé ãå®è¡ããŸãã compactFooterãfalseã®å Žåããªããžã§ã¯ãã¯èªçµŠèªè¶³ã§ãããè¿œå ã®ã¡ã¿ããŒã¿ãªãã§ãã®æ§é ãèæ ®ããããšãã§ããŸãã
çŸæç¹ã§ã¯ããããªãã¯APIã«ã¯ãã€ããªãªããžã§ã¯ãã®ãµã€ãºãè¿ãã¡ãœããã¯ãããŸããã ãããã£ãŠããããéåžžã«èå³æ·±ãå Žåã¯ãããã¯ããŠãªããžã§ã¯ããå®è£ ããããšãã§ãããã®ãµã€ãºã衚瀺ãããŸãã Apache Ignite 2.5ã§ã¯ããªããžã§ã¯ãã®ãµã€ãºãååŸããã¡ãœãããè¿œå ãããšæããŸãã
ããŒãžã®ã¢ãŒããã¯ãã£
å ã»ã©èšã£ãããã«ããã£ã¹ã¯ã®äœæ¥åäœã¯ããŒãžã§ãã ããã¯ããã£ã¹ã¯ãžã®èªã¿åããšæžã蟌ã¿ãæé©åããããã«è¡ãããŸãã ãããåæã«ããã£ã¹ã¯ã«ä¿åãããããŒã¿æ§é ã¯ããŒãžã§ãæ©èœããå¿ èŠããããããApache Igniteã®å éšã¢ãŒããã¯ãã£ã«å¶éã課ããŸãã
èšãæããã°ãããŒã¿æ§é ã¯ãããªãŒã§ããããªãŒãªã¹ãã§ãããããªãã¯ããŒãžããæ§ç¯ãããŸãã ããŒãžã¯äžæã®èå¥åã«ãã£ãŠçžäºã«ãªã³ã¯ããŸãã åãäžæã®èå¥åã䜿çšããŠãäžå®ã®æéããããã®ããŒãžãèªã¿åãããšãã§ãããã¡ã€ã«ããŸãã¯ãã®ãã¡ã€ã«ãããã®ããŒãžãŸãã¯ãã®ããŒãžãèªã¿åããªãã»ããã決å®ã§ããŸãã
å€ãã®ããŒãžã«åå²ãããåäžã®ã»ã¯ã·ã§ã³ã¯ããã®ãããªã¹ããŒã ãšããŠè¡šãããšãã§ããŸãã
éå§ã¡ã¿ããŒãžã§ã¯ãä»ã®ããŒãžã«ã¢ã¯ã»ã¹ã§ããŸãã ãããã¯ããŸããŸãªã¿ã€ãã«åãããããã®å€ãããããŸãããäŸãåçŽåããããã«ã次ã®ããã«ããŸãã
- ããŒã¿ãä¿åããããŒã¿ããŒãžã
- ã€ã³ããã¯ã¹ããªãŒãæ§ç¯ã§ããã€ã³ããã¯ã¹ããŒãžã
- ããªãŒãªã¹ããã¡ã¿ããŒã¿ãªã©ã®æ§é ã®è£å©ããŒãžã
ãªããããå¿ èŠãªã®ããããå°ã詳ãã説æããŸãã
ããŒã¿ããŒãžããå§ããŸãããã ãã®ãããã¯ã¯ãApache Igniteã«ããŒã¿ãæžã蟌ããšãã«ããŒãšå€ãåããŸãã ãŸããæ å ±ã«å¯Ÿå¿ã§ããããŒã¿ããŒãžãååŸãããããã«ããŒã¿ãæžã蟌ãŸããŸãã ããããžã®ãªã³ã¯ãåä¿¡ããããšãæ å ±ãã€ã³ããã¯ã¹ã«æžã蟌ãŸããŸãã
ããŒã¿ããŒãžã«ã¯ããŒãã«æ§æããããŸãã æåã«ãããŒãšå€ã®ãã¢ãžã®ãªãã»ãããå«ãããŒãã«ããããŸãã ããŒãšå€ã®ãã¢èªäœã¯éã®é åºã§æžã蟌ãŸããŸãã æåã®ãšã³ããªã¯ããŒãžã®æåŸã«ãããŸãã ããã¯ã空ãé åã§ã®äœæ¥ããã䟿å©ã«ããããã«è¡ãããŸãã ãªããããªã«è€éã ã£ãã®ããšå°ããŸããïŒ ããŒãžã«çŽæ¥ããŒã¿ãæžã蟌ãã§ãããŒãžå ã®ãªãã»ãããåç §ã§ããªãã®ã¯ãªãã§ããïŒ ããã¯ãããŒãžãæé©åããããã«è¡ãããŸãã
ããã§ã¬ã³ãŒãçªå·2ãåé€ãããšã2ã€ã®ç©ºããŸãŒã³ã圢æãããŸãã å°æ¥ãã¬ã³ãŒã3ãå³ã«ç§»åããŠãããã§ãã倧ããªã¬ã³ãŒãã«å¯Ÿå¿ããå¿ èŠãçããå¯èœæ§ããããŸãã ãŸããéæ¥ã¢ãã¬ã¹æå®ãããå Žåã¯ãããŒãã«å ã®å¯Ÿå¿ããã¬ã³ãŒãã®ãªãã»ãããå€æŽããã ãã§ãã ãã®å Žåããã®ããŒãžã«ãªã³ã¯ããå€éšãªã³ã¯ã¯äžå®ã®ãŸãŸã§ãã
æååã¯ããã®ãµã€ãºãããŒãžãµã€ãºããã倧ãããªããšããæå³ã§æçåã§ããŸãã ãã®å Žåã空çœããŒãžãååŸããè¡ã®æ«å°Ÿããã®ããŒãžã«æžã蟌ã¿ãæ®ããããŒã¿ããŒãžã«æžã蟌ã¿ãŸãã
ããŒãšå€ã«å ããŠãã·ã¹ãã ã®æ£ããåäœã®ããã®è£å©æ å ±ãããšãã°ããŒãžã§ã³çªå·ãããŒã¿ããŒãžã«èšé²ãããŸãã æå¹æéããªã·ãŒã䜿çšããå Žåãæå¹æéãããã«æžã蟌ãŸããŸãã äžè¬ã«ãè¿œå ã®ã¡ã¿ããŒã¿ã¯35ãã€ããå æããŸãã ãã€ããªãªããžã§ã¯ããšããŒã®ãµã€ãºãããã£ããã35ãã€ããè¿œå ããŠãããŒã¿ããŒãžã®ç¹å®ã®ã¬ã³ãŒãã®éãååŸããŸãã 次ã«ãããŒãžã«åãŸãã¬ã³ãŒãæ°ãèšç®ããŸãã
ããŒã¿ããŒãžã«ã¯ãã©ã®ã¬ã³ãŒããåãŸããªã空ãé åãããããšãå€æããå ŽåããããŸãã ãã®åŸãã¡ããªãã¯ã«1ã«çãããªãæ²ç·å åã衚瀺ãããŸãã
ãããŠèšé²æé ã«ã€ããŠã®å°ãã®èšèã 空çœã®ããŒãžããããããã«ããŒã¿ãæžã蟌ãã ãšããŸãã 空ãé åããããããããŸãã åã«ããŒãžãæšãŠãŠãããŒãžãã©ããã«æšªããã£ãŠäœ¿çšãããªãããã«ããã®ã¯ééã£ãŠããŸãã
èæ ®ã«å ¥ããæå³ã®ãã空ãé åãããããŒãžã«é¢ããæ å ±ã¯ã空ããªã¹ãããŒã¿æ§é ã«æ ŒçŽãããŸãã ãã®å®è£ ã§ãçŸæç¹ã§ããŒãžã«å«ãŸãããã€ãã8ãã€ãæªæºã®å Žåã8ãã€ãã«åãŸããããªããŒãšå€ã®ãã¢ãååšããªããããããŒãžã¯ããªãŒãªã¹ãã«åé¡ãããŸããã
ããŒã¿ããŒãžãææ¡ããŠãã®æ°ãèŠç©ãã£ãåŸãå¿ èŠãªã€ã³ããã¯ã¹ããŒãžã®æ°ãèŠç©ããããšãã§ããŸãã
Apache Igniteã®ã€ã³ããã¯ã¹ã¯ãã¹ãŠBããªãŒã§ãã ããã¯ãæäœã¬ãã«-ã¯ã€ãã¬ãã«-ã絶察çã«ãã¹ãŠã®ããŒãšå€ã®ãã¢ãžã®ãªã³ã¯ã§ããããšãæå³ããŸãã ã€ã³ããã¯ã¹ã¯ã«ãŒãããŒãžããå§ãŸããŸãã åå éšããŒãžã«ã¯ãäžäœã¬ãã«ãžã®ãªã³ã¯ããããŸãã
äž»ããŒã§ããã€ã³ããã¯ã¹ã®å Žåãã€ã³ããã¯ã¹ããŒãžã«æžã蟌ãŸããã¢ã€ãã ã®ãµã€ãºã¯12ãã€ãã§ãã é²èŠ§ããŠããããŒãž-å åŽãŸãã¯ã·ãŒã-ã«å¿ããŠãæ倧èŠçŽ ã®æ°ãç°ãªããŸãã ãã®ãããªæ°å€ã®æšå®å€ã䜿çšãããšãã³ãŒãå ã®æ倧èŠçŽ ã®æ°ã確èªã§ããŸãã ãã©ã€ããªã€ã³ããã¯ã¹ã®å Žåããªã³ã¯ãµã€ãºã¯åžžã«12ãã€ãã«åºå®ãããŸãã ããŒãžèŠçŽ ã®æ倧æ°ã倧ãŸãã«èšç®ããã«ã¯ãããŒãžãµã€ãºïŒããã©ã«ãã§ã¯4ã¡ã¬ãã€ãïŒã12ãã€ãã§é€ç®ã§ããŸãã
ããªãŒã®æé·ãèãããšãããŒã¿ã®ããŒãé åºã«å¿ããŠãåããŒãžã50ïŒ ãã75ïŒ ã«æºãããããšæ³å®ã§ããŸãã ããªãŒã®äžäœã¬ãã«ã«ãã¹ãŠã®èŠçŽ ãå«ãŸããŠããå Žåãã€ã³ããã¯ã¹ãä¿åããã®ã«å¿ èŠãªããŒãžæ°ãæšå®ã§ããŸãã
SQLã€ã³ããã¯ã¹ïŒãŸãã¯ã»ã«ã³ããªã€ã³ããã¯ã¹ïŒã®å ŽåãããŒãžã«æ ŒçŽãããèŠçŽ ã®ãµã€ãºã¯ãæ§æãããã€ã³ã©ã€ã³ãµã€ãºã«ãã£ãŠç°ãªããŸãã ã€ã³ããã¯ã¹ããŒãžã®æ°ãèšç®ããã«ã¯ãããŒã¿ã¢ãã«ãæ éã«åæããå¿ èŠããããŸãã
å€ãã®è³ªåã«ããããŠãããããŒãã£ã·ã§ã³ããšã«è¿œå ã®ã¡ã¢ãªæ¶è²»ãçºçããŸãã æåéã1ã€ã®èŠçŽ ãåããŒãã£ã·ã§ã³ã«æžã蟌ãŸãã空ã®ãã£ãã·ã¥ãéå§ããã«ã¯ãããªãã®éã®ã¡ã¢ãªãå¿ èŠã§ãã å®éããã®æ§é ã§ã¯ãããŒãã£ã·ã§ã³ããšã«å¿ èŠãªãã¹ãŠã®ã¡ã¿ããŒã¿ãåæåããå¿ èŠããããŸãã
<ã€ã©ã¹ã>
ããã©ã«ãã®ããŒãã£ã·ã§ã³æ°ã¯1024ã§ããããã1ã€ã®ããŒããéå§ããåããŒãã£ã·ã§ã³ã§1ã€ã®èŠçŽ ã®æžã蟌ã¿ãéå§ãããšãéåžžã«å€æ°ã®ã¡ã¿ã¹ããŒãžãããã«åæåãããããåæã¡ã¢ãªãªãŒããŒããããéåžžã«å€§ãããªããŸãã
çµéšçãªã¢ãããŒãã§ã¯ãããªã倧éã®ããŒã¿ãããŒãããããŒãã£ã·ã§ã³ã®ã¡ã¢ãªæ¶è²»éã¯ç®ç«ããªããªããŸãã ããããããæ£ç¢ºãªè©äŸ¡ã®ããã«èæ ®ã«å ¥ããå¿ èŠããããŸãã ããŒãã£ã·ã§ã³ããã¹ãŠã®ããŒã¿ããŒãžããã³ã€ã³ããã¯ã¹ããŒãžã«ã¡ã¢ãªãªãŒããŒããããè¿œå ãããšãå¿ èŠãªã¡ã¢ãªãµã€ãºãæ£ç¢ºã«èšç®ã§ããŸãã
æé©å
å°æ¥ããŠãŒã¶ãŒã®ç掻ãã©ã®ããã«æ¥œã«ããããšãã§ããŸããïŒ Apache Igniteã¯SQLã·ã¹ãã ã«ç§»è¡ããŠããããªãŒããŒããããåæžããããã®å€ãã®ã¢ã€ãã¢ããããŸãã
ãã€ããªåœ¢åŒãå€æŽã㊠ãããããŒã®ãµã€ãºãå°ããããããšãã§ããŸã ã ãã£ãã·ã¥ã®ããããã§ããå³å¯ã«åæå®ãããããŒã¿æ§é ã«åãæ¿ããŠãããªããžã§ã¯ããæ··åšãããããšã¯ã§ããŸããããæ¶è²»ãããã¡ã¢ãªéã¯æžå°ããŸãã
2çªç®ã®è§£æ±ºçã¯ãããŒãžå ã§åãã¿ã€ãã®ãªããžã§ã¯ããã°ã«ãŒãåããã¿ã€ãã«ãŸãã¯ãã®äžéšãéžæããããšã§ãã ãã®å ŽåãApache Igniteã¯ãããŒãžã¬ãã«ã§æ¢ã«ããŒã¿ãéè€æé€ããŸãã
å¥ã®è³¢æãªã¢ã€ãã¢ïŒ freelistã«ã«ã¹ã¿ã ããŒã¿ã¢ã«ãŠã³ãã£ã³ã°ã®ãããå€ãå®è£ ããŸã ã ããŒãžã100ãã€ãã«ãªãããã«æçåãããããŒã¿ã100ãã€ãæªæºã«ãªããªãããšãç解ããŠããå ŽåãããŒãžãããã«å°éããããã®ããªãŒãªã¹ãèªäœã«ã¹ããŒã¹ã䜿çšããªãããã«ããªãŒãªã¹ãã匷åããããšã¯çã«ããªã£ãŠããŸãã
ãŠãŒã¶ãŒã«å¯ŸããŠééçãªãããŒãžã¬ãã«ã§ã®ã·ã¹ãã ããŒã¿å§çž®ã«ããç©æ¥µçã«è°è«ããã³å®è¡ãããŸãã æè¡çãªåé¡ã¯ããã€ããããŸãããäžè¬çãªã±ãŒã¹ã§ã¯ãããã³ã³ãã¯ããªããŒã¿é 眮ãåªå ããŠããã©ãŒãã³ã¹ãç ç²ã«ããŸãã
ãããŠãæåŸã®ãéåžžã«äžè¬çãªæé©åã¯ã ã¯ã©ã¹ã¿ãŒå®¹éèšç®æ©ã§ãã 倧ããªåé¡ã¯ããã®ãããªãŠãŒãã£ãªãã£ã®å ¥åã¯äœã«ãªããã§ãã ãã®ãããªã¹ããŒã ãèŠãããšãã§ããŸãïŒãŠãŒã¶ãŒã¯ãªããžã§ã¯ãã®æ§é ãèšç®æ©ã«ããŒãããããŒãããäºå®ã®è¡æ°ã瀺ããèšç®æ©ã¯Apache Igniteã®ãã¹ãŠã®ã€ã³ããã¯ã¹ãšå éšãªãŒããŒããããèæ ®ããŠãå¿ èŠãªã¡ã¢ãªéã瀺ããŸãã
ãã£ã¹ã¯/ã¡ã¢ãªã®å²åã決å®ãã
ä¿åãããããŒã¿ã®éãå©çšå¯èœãªã¡ã¢ãªã®éããã倧ããå Žåãã©ã®ãããã®ã¡ã¢ãªãå²ãåœãŠãå¿ èŠããããŸããïŒ ã¡ã¢ãªãäžè¶³ãããšãApache Igniteã¯OSãšã»ãŒåãæ¹æ³ã§åäœããŸããã¡ã¢ãªããããŒã¿ãåãåºããå¿ èŠãªããŒã¿ãããŒãããŸãã äžéšã®ããŒã¿ã¯ç Žæ£ã§ããŸããããã»ãšãã©ã®å Žåãããã¯éèŠã§ã¯ãããŸããã
ããã§ã¯ãããŒãžèªäœã®å€èŠ³ã¯ã¬ã³ãŒããæå³ãããã®ã§ã¯ãªãããšãèŠããŠããå¿ èŠããããŸãã ã¡ã¢ãªããã®ããŒã¿ã®åãåºãã¯å®äŸ¡ã§ãã ãŸãããã£ã¹ã¯ãããã¹ãçºçããããŒã¿ã®ãã®åŸã®èªã¿åãã¯ãé«äŸ¡ãªæäœã§ãã ã»ãšãã©ã®å Žåã泚æããå¿ èŠãããæãéèŠãªæ©èœã¯ããã©ã€ããçºè¡ã§ããIOPSã®æ°ã§ãã ã¯ã©ãŠãå±éã䜿çšããŠããå ŽåãIOPSã®æ°ãèŠã€ããããšã¯éåžžã«ç°¡åã§ãã
ããšãã°ãAmazonã§ã€ã¡ãŒãžãéå§ããŠããŠã³ããããšããMb / sã®èšé²é床ãæã€ãã£ã¹ã¯ããéžæã§ããŸãã ããããç§ãã¡ã®çµéšã§ã¯ãIOPSãç¥ãæ¹ãã¯ããã«äŸ¿å©ã§ãã å®éãããŒãžãæäœãããããIOPSã¯åäœæéãããã«ãã£ã¹ã¯äžã§å®è¡ã§ããèªã¿åããŸãã¯æžã蟌ã¿æäœã®æ倧æ°ã§ãã
ã¡ã¢ãªããæ¶å»ãããããŒãžãéžæããæ¹æ³ã¯ïŒ ããã¯ãã©ã³ãã LRUã¢ã«ãŽãªãºã ã«åŸã£ãŠè¡ãããŸãã Apache Igniteã«ã¯ãããŒã¿ãé 眮ãããŠããã¡ã¢ãªå ã®ç¹å®ã®ç©çã¢ãã¬ã¹ãžã®åãããŒãžèå¥åã®ãããã³ã°ãä¿åããã¡ã¢ãªå ã®ããŒãžãå«ãŸããŠããŸãã ããŒãžã®1ã€ãç Žæ£ããå¿ èŠãããå Žåããã®ããŒãã«ããnåã®ã©ã³ãã ããŒãžãååŸããæãå€ãããŒãžãéžæããŸãã 圌女ã¯åžžã«çµ¶å¯Ÿçãªæå³ã§æ幎é·ã«ãªããšã¯éããŸããã ããããã»ãšãã©ã®å Žåãnçªç®ã®éšåã«åé¡ãããŸããnã¯éžæãããµã³ãã«ã®æ°ã§ãã
ãããŸã§ãã©ã³ãã LRUã¢ã«ãŽãªãºã ã¯ãã«ã¹ãã£ã³ã«èæ§ããããŸããããApache Igniteã§å¥ã®ã¿ã¹ã¯ã«äœ¿çšãããã©ã³ãã LRU 2ã¢ã«ãŽãªãºã ã®å®è£ ãæ¢ã«ãããŸãã ãŸããã©ã³ãã ãªLRU 2ã䜿çšããŠããŒãžã眮ãæãããšããã«ã¹ãã£ã³ã«å¯Ÿããèæ§ã®åé¡ã解決ãããŸãã
ããŒãžã®æŒãåºãã¯ãåäžã®ãã£ãã·ã¥æäœã®ã¬ã€ãã³ã·ã«å€§ãã圱é¿ããŸãã ææªã®ç¶æ³ïŒãã£ãã·ã¥ã«ããçš®ã®ååã«äœ¿çšãããŠããªãSQLã€ã³ããã¯ã¹ãŸãã¯é åãããããã®é åã®ãã¹ãŠã®ããŒãžããã£ã¹ã¯ã«å®å šã«ããã·ã¥ããããã€ãŸãã¡ã¢ãªããæ¶å»ãããããšãå€æããŸããã nããŒãžãã¹ãŠã«ã¢ã¯ã»ã¹ããããŒã䜿çšãããšããã£ã¹ã¯ããé çªã«èªã¿åãããŸãã ãããŠããã£ã¹ã¯ããã®èªã¿åãã®å¯èœæ§ãæå°éã«æããå¿ èŠããããŸãã
Apache Ignite 2.3ããããã£ãã·ã¥ãç°ãªãããŒã¿é åã«åå²ã§ããããã«ãªããŸããã ãããããŒã¿ã®ãµãã»ãããããããšãç¥ã£ãŠããŠãããããããããæäœããããã«å±¥æŽããŒã¿ã®ãµãã»ãããããå Žåã¯ããããã®ãµãã»ãããç°ãªãããŒã¿é åã«åå²ããããšã¯çã«ããªã£ãŠããŸãã
ãŸãããã£ã¹ã¯/ã¡ã¢ãªæ¯ã決å®ããã«ã¯ããã£ãã·ã¥å ã®åäžæäœã®ã¢ã¯ã»ã¹æéã®äžå€®å€ãŸãã¯å¹³åã§ã¯ãªããããŒã»ã³ã¿ã€ã«ãåžžã«ç£èŠããå¿ èŠããããŸããããã¯ãããŒã»ã³ã¿ã€ã«ãæ å ±ãæ瀺ããæãå®å šãªæ¹æ³ã ããã§ãã
ææªã®ã·ããªãªã§ã¯ãããŒãžããã£ã¹ã¯ããèªã¿åãå¿ èŠããããããã±ãŒã¹ã®1ïŒ ã§é 延ãå€§å¹ ã«å€§ãããªããŸãã åçŽã«å¹³åãèŠããšããã®æ©èœã«æ°ä»ããªãã§ãããã å³å¯ãªSLAãéèŠãªå Žåã¯ãå²åã決å®ããéã«ããŒã»ã³ã¿ã€ã«ãåæããã ãã§ãã
æåŸã«èšåãã䟡å€ãããã®ã¯ãåãç©çã¡ãã£ã¢ã§æ°žç¶æ§ãæå¹ã«ããŠå€ãã®Apache IgniteããŒããå®è¡ããªãã§ãã ããã ç©çãã£ã¹ã¯ã¯1ã€ãããªããããIOPSã®æ°ã¯Apache IgniteããŒãéã§å ±æãããŸãã ããŒãéã§åž¯åå¹ ãå ±æããã ãã§ãªããããã«å ããŠãåããŒãã§IOPSã®å®¹éãäžè¶³ããå¯èœæ§ããããã¯ã©ã¹ã¿ãŒå šäœã®åäœãäºæž¬äžèœã«ãªããŸãã
äœããã®çç±ã§åããã·ã³ã§è€æ°ã®Apache IgniteããŒããå®è¡ããå Žåã¯ãããŒãã®ç©çãªããžããªãç°ãªããã®ã«ããŠãã ããã ããã¯ãå è¡æžã蟌ã¿ãã°ãå¥ã®ç©çã¡ãã£ã¢ã«è»¢éããæšå¥šäºé ã«è¿œå ãããŸãã
CPUããã³ãããã¯ãŒã¯åž¯åå¹ ã®èšç»
1ã®ã¬ãããæªæºã®åž¯åå¹ ã®ãããã¯ãŒã¯ã䜿çšããªãã§ãã ããã ä»æ¥ããããã¯ãŒã¯ã®åž¯åå¹ ãå°ãªã人ã¯ã»ãšãã©ããŸããã CPUã®éžæã¯ãè² è·ãããã¡ã€ã«ãã€ã³ããã¯ã¹ã®æ°ã«å€§ããäŸåããŸãã ããã§ã¯ãçµéšçãªã¢ãããŒãã«æ»ããã¢ããªã±ãŒã·ã§ã³ã«å¿ èŠãªè² è·ãããã¡ã€ã«ãåçŽã«çæãããã¹ãŠã®ã·ã¹ãã ããã©ãŒãã³ã¹ã泚ææ·±ãç£èŠãã䟡å€ããããŸãã äžéšã®ãªãœãŒã¹ãå®å šã«äœ¿ãæããããŠããããšãããã£ãå Žåã¯ãè¿œå ããã®ãçã«ããªã£ãŠããŸãã
Apache Igniteãæ¹åããããã®è³ªåãã¢ã€ãã¢ãæè¿ããŸãã
ã¢ã¹ã¯ã¯ãšãµã³ã¯ãããã«ãã«ã¯ã§ã®äŒè°ã«åå ããŠãã ããã