Igniteãããžã§ã¯ãã¯ãApache Software Foundationã«ç»å Žããæç¹ã§ãçŽç²ãªã€ã³ã¡ã¢ãªãœãªã¥ãŒã·ã§ã³ãšããŠäœçœ®ä»ããããŠããŸãããã¢ã¯ã»ã¹æéã確ä¿ããããã«ãåŸæ¥ã®DBMSããã¡ã¢ãªã«ããŒã¿ãåã蟌ãåæ£ãã£ãã·ã¥ã§ãã ãããããã§ã«ãªãªãŒã¹2.1ã«ã¯ãã«ãã€ã³æ°žç¶æ§ïŒ Native Persistence ïŒã®ã¢ãžã¥ãŒã«ããããIgniteãå®å šãªåæ£ããŒã¿ããŒã¹ãšããŠåé¡ã§ããŸãã ãã以æ¥ãIgniteã¯æ°žç¶çãªããŒã¿ã¹ãã¬ãŒãžãæäŸããããã«å€éšã·ã¹ãã ã«äŸåããããšãããããŠãŒã¶ãŒãè€æ°åèžã¿èŸŒãã æ§æãšç®¡çã®ã¬ãŒãã®ãã³ãã«ã¯ãªããªããŸããã
ãã ããæ°žç¶ã¢ãŒãã«ã¯ç¬èªã®ã¹ã¯ãªãããšæ°ãã質åããããŸãã ã¹ããªãããã¬ã€ã³ã®ç¶æ³ã§è§£æ±ºã§ããªãããŒã¿ã®ç«¶åãé²ãæ¹æ³ ããŒãã®åºåããã®ããŒã¿ã倱ãããããšãæå³ããªãå ŽåãããŒãã£ã·ã§ã³ã®åãã©ã³ã¹ãæåŠã§ããŸããïŒ ã¯ã©ã¹ã¿ãŒã®ã¢ã¯ãã£ãåãªã©ã®è¿œå ã¢ã¯ã·ã§ã³ãèªååããæ¹æ³ã¯ïŒ 圹ç«ã€ããŒã¹ã©ã€ã³ããããžã
ããŒã¹ã©ã€ã³ããããžïŒæåã®ç¥ãåã
æŠå¿µçã«ã¯ãã€ã³ã¡ã¢ãªã¢ãŒãã®ã¯ã©ã¹ã¿ãŒã¯åçŽã§ããå°çšããŒãã¯ãªãããã¹ãŠåçã§ãããããããã«ãã£ãã·ã¥ããŒãã£ã·ã§ã³ãå²ãåœãŠãããèšç®ã¿ã¹ã¯ãéä¿¡ãããããµãŒãã¹ããããã€ãããã§ããŸãã ããŒããããããžãé¢ãããšããŠãŒã¶ãŒèŠæ±ã¯ä»ã®ããŒãã«ãã£ãŠåŠçãããçµäºããããŒãã®ããŒã¿ã¯äœ¿çšã§ããªããªããŸãã
ãŠãŒã¶ãŒã¯ãã¯ã©ã¹ã¿ãŒã°ã«ãŒããšãŠãŒã¶ãŒå±æ§ã䜿çšããŠãéžæããç¹æ§ã«åºã¥ããŠããŒããã¯ã©ã¹ã«åæ£ã§ããŸãã ãã ããããŒããåèµ·åãããšãåèµ·ååã«äœãèµ·ãã£ããããå¿ãããŸãã ãããã®ãã£ãã·ã¥ã¯ã¯ã©ã¹ã¿ãŒå ã§åãã©ãã·ã¥ãããèšç®ã¿ã¹ã¯ãåå®è¡ããããµãŒãã¹ãåãããã€ãããŸãã ããŒãã¯ç¶æ ãä¿åããªããããå®å šã«äº€æå¯èœã§ãã
æ°žç¶ã¢ãŒãã§ã¯ãããŒãã¯åèµ·ååŸãç¶æ ãä¿æããŸããéå§ããã»ã¹äžã«ãããŒãããŒã¿ããã£ã¹ã¯ããèªã¿åããããã®ç¶æ ã埩å ãããŸãã ãããã£ãŠãããŒããåèµ·åããŠããã¯ã©ã¹ã¿ãŒå ã®ä»ã®ããŒãããããŒã¿ãå®å šã«ã³ããŒããå¿ èŠã¯ãããŸããïŒãªãã©ã³ã¹ãšåŒã°ããããã»ã¹ïŒããã©ãŒã«æã®ããŒã¿ã¯ããŒã«ã«ãã£ã¹ã¯ãã埩å ãããŸãã ããã«ããããããã¯ãŒã¯ã€ã³ã¿ã©ã¯ã·ã§ã³ã®éåžžã«é åçãªæé©åã®æ©äŒãéããããã®çµæãã¯ã©ã¹ã¿ãŒå šäœã®çç£æ§ãåäžããŸãã ãã®ãããåèµ·ååŸã«ä»ã®ãã¹ãŠã®ããŒãããç¶æ ãç¶æã§ããå€ãã®ããŒããäœããã®åœ¢ã§åºå¥ããå¿ èŠããããŸãã BaselineTopologyã¯ãã®ã¿ã¹ã¯ãæäŸããŸãã
ãŠãŒã¶ãŒãã€ã³ã¡ã¢ãªãã£ãã·ã¥ãšåæã«æ°žç¶ãã£ãã·ã¥ã䜿çšã§ããããšã«æ³šæããŠãã ããã åŸè ã¯ä»¥åãšåã寿åœãç¶ããŸãïŒãã¹ãŠã®ããŒããåçã§äºææ§ãããããšãèæ ®ããããŒããçµäºããŠããŒã¿ã³ããŒã®æ°ãç¶æãããšãã«ããŒãã£ã·ã§ã³ã®ååæ£ãéå§ããŸã-BaselineTopologyã¯æ°žç¶ãã£ãã·ã¥ã®åäœã®ã¿ãèŠå¶ããŸãã
æé«ã¬ãã«ã®BaselineTopologyïŒä»¥éBLTïŒã¯ãããŒã¿ãæ ŒçŽããããã«æ§æãããããŒãèå¥åã®ã³ã¬ã¯ã·ã§ã³ã§ãã ã¯ã©ã¹ã¿ãŒå ã§BLTãäœæããŠç®¡çããæ¹æ³ã«ã€ããŠã¯ãåŸã»ã©èª¬æããŸãããå®éã«ãããã©ã®ãããªæŠå¿µã«åœ¹ç«ã€ããèŠãŠã¿ãŸãããã
æ°žç¶ããŒã¿ïŒãã©ã€ããªã
ã¹ããªãããã¬ã€ã³ãšããŠç¥ãããåæ£ã·ã¹ãã ã®åé¡ã¯ãæ°žç¶æ§ã®äœ¿çšãããã«æœè¡çã«ãªããšããã§ã«è€éã«ãªã£ãŠããŸãã
ç°¡åãªäŸïŒã¯ã©ã¹ã¿ãŒãšè€è£œããããã£ãã·ã¥ããããŸãã
ãã©ãŒã«ããã¬ã©ã³ã¹ãæäŸããæšæºçãªã¢ãããŒãã¯ããªãœãŒã¹ã®åé·æ§ãç¶æããããšã§ãã Igniteã¯ãã®ã¢ãããŒããæ¡çšããŠãããŒã¿ã¹ãã¬ãŒãžã®ä¿¡é Œæ§ã確ä¿ããŸããæ§æã«å¿ããŠããã£ãã·ã¥ã¯ã¯ã©ã¹ã¿ãŒã®ç°ãªãããŒãã«ããŒã®è€æ°ã®ã³ããŒãæ ŒçŽã§ããŸãã ã¬ããªã±ãŒãããããã£ãã·ã¥ã¯åããŒãã«1ã€ã®ã³ããŒãä¿åããããŒãã£ã·ã§ã³åããããã£ãã·ã¥ã¯åºå®æ°ã®ã³ããŒãä¿åããŸãã
ãã®æ©èœã®è©³çŽ°ã«ã€ããŠã¯ã ããã¥ã¡ã³ããã芧ãã ããã
次ã®é åºã§ç°¡åãªæäœãå®è¡ããŸãã
- ã¯ã©ã¹ã¿ãŒãåæ¢ããããŒãã°ã«ãŒãAãèµ·åããŸãã
- ãã£ãã·ã¥å ã®ããŒãæŽæ°ããŸãã
- ã°ã«ãŒãAãåæ¢ããã°ã«ãŒãBãéå§ããŸãã
- åãããŒã«å¯ŸããŠä»ã®æŽæ°ãé©çšããŸãã
Igniteã¯ããŒã¿ããŒã¹ã¢ãŒãã§åäœããããã2çªç®ã®ã°ã«ãŒãã®ããŒããåæ¢ããŠããæŽæ°ã¯å€±ãããŸããã2çªç®ã®ã°ã«ãŒããå床éå§ãããšããã«å©çšå¯èœã«ãªããŸãã ãã®ãããã¯ã©ã¹ã¿ãŒã®åæç¶æ ã埩å ããåŸãåãããŒã«å¯ŸããŠç°ãªãããŒããç°ãªãå€ãæã€ããšãã§ããŸãã
ããŒããåã«åæ¢ããã³èµ·åããã ãã§ãããŸãç±çããã«ãã¯ã©ã¹ã¿ãŒå ã®ããŒã¿ãæªå®çŸ©ã®ç¶æ ã«ããããšãã§ããŸãããããã¯èªåçã«è§£æ±ºããããšã¯ã§ããŸããã
ãã®ç¶æ³ãé²ãããšã¯ãBLTã®ã¿ã¹ã¯ã®1ã€ã«ãããŸããã
èãæ¹ã¯ãæ°žç¶ã¢ãŒãã§ã¯ãã¯ã©ã¹ã¿ãŒã®èµ·åã¯è¿œå ã®æ®µéã§ããã¢ã¯ãã£ããŒã·ã§ã³ãçµãããšã§ãã
æåã®ã¢ã¯ãã£ããŒã·ã§ã³ã§ãæåã®BaselineTopologyãäœæããããã£ã¹ã¯ã«ä¿åãããŸããããã«ã¯ãã¢ã¯ãã£ããŒã·ã§ã³æã«ã¯ã©ã¹ã¿ãŒã«ååšãããã¹ãŠã®ããŒãã«é¢ããæ å ±ãå«ãŸããŠããŸãã
ãã®æ å ±ã«ã¯ããªã³ã©ã€ã³ããŒãã®èå¥åã«åºã¥ããŠèšç®ãããããã·ã¥ãå«ãŸããŸãã åŸç¶ã®ã¢ã¯ãã£ãåäžã«ããããžã«äžéšã®ããŒããååšããªãå ŽåïŒããšãã°ãã¯ã©ã¹ã¿ãŒãåèµ·åããããµãŒãã¹ã®ããã«1ã€ã®ããŒããåãåºãããå ŽåïŒãããã·ã¥ãåèšç®ããã以åã®å€ãåãBLTå ã®ã¢ã¯ãã£ãåå±¥æŽã«ä¿åãããŸãã
ãããã£ãŠãBaselineTopologyã¯ãåã¢ã¯ãã£ããŒã·ã§ã³æã®ã¯ã©ã¹ã¿ãŒã®æ§æãèšè¿°ããããã·ã¥ã®ãã§ãŒã³ãç¶æããŸãã
ã¹ããŒãž1ããã³3ã§ã¯ãããŒãã°ã«ãŒããéå§ããåŸããŠãŒã¶ãŒã¯æ瀺çã«äžå®å šãªã¯ã©ã¹ã¿ãŒãã¢ã¯ãã£ãåããå¿ èŠããããåãªã³ã©ã€ã³ããŒãã¯ããŒã«ã«ã«BLTãæŽæ°ããŠæ°ããããã·ã¥ãè¿œå ããŸãã åã°ã«ãŒãã®ãã¹ãŠã®ããŒãã¯åãããã·ã¥ãèšç®ã§ããŸãããç°ãªãã°ã«ãŒãã§ã¯ç°ãªãããšã«ãªããŸãã
ããªãã¯ãã§ã«æ¬¡ã«äœãèµ·ããããæšæž¬ã§ããŸããã ããŒãããå€éšãã°ã«ãŒãã«åå ããããšãããšããã®ã°ã«ãŒãã®ããŒãã«é¢ä¿ãªãããŒããã¢ã¯ãã£ãåãããŠãããšå€æãããã¢ã¯ã»ã¹ãæåŠãããŸãã
ãã®æ€èšŒã¡ã«ããºã ã¯ãã¹ããªãããã¬ã€ã³ç¶æ³ã§ã®ç«¶åã«å¯Ÿããå®å šãªä¿è·ãæäŸããªãããšã«æ³šæããŠãã ããã ã¯ã©ã¹ã¿ãŒã®åå以äžã«ããŒãã£ã·ã§ã³ã®ã³ããŒãå°ãªããšã1ã€æ®ãããã«ã¯ã©ã¹ã¿ãŒã2ã€ã®ååã«åå²ãããååãåã¢ã¯ãã£ãåãããªãå ŽåãåãããŒã¿ã®ç«¶åããå€æŽãååã«ãªã£ãŠå°çããå¯èœæ§ããããŸãã BLTã¯CAPå®çã«åè«ããŸããããæãããªç®¡çãšã©ãŒãšã®ç«¶åãé²ããŸãã
ãã³
ããŒã¿ã®ç«¶åãé²ãããšã«å ããŠãBLTã§ã¯ãããã€ãã®ãªãã·ã§ã³ã§ã¯ãããçŽ æŽããããªãã·ã§ã³ãå®è£ ã§ããŸãã
ãå£å1-ãã€ãã¹1ã€ã®æåã¢ã¯ã·ã§ã³ã äžèšã®ã¢ã¯ãã£ããŒã·ã§ã³ã¯ãã¯ã©ã¹ã¿ãŒãåèµ·åãããã³ã«æåã§å®è¡ããå¿ èŠããããŸããã ãããã«äœ¿ãããèªååããŒã«ã¯ãããŸããã§ããã BLTãååšããå Žåãã¯ã©ã¹ã¿ãŒã¯ã¢ã¯ãã£ãåãåå¥ã«æ±ºå®ã§ããŸãã
Igniteã¯ã©ã¹ã¿ãŒã¯åŒŸåæ§ã®ããã·ã¹ãã ã§ãããããŒããåçã«è¿œå ããã³è¡šç€ºã§ããŸãããBTLã¯ããŒã¿ããŒã¹ã¢ãŒãã§ã¯ãŠãŒã¶ãŒãå®å®ããã¯ã©ã¹ã¿ãŒæ§æãç¶æãããšããæŠå¿µã«åºã¥ããŠããŸãã
ã¯ã©ã¹ã¿ãŒãæåã«ã¢ã¯ãã£ãåããããšãæ°ããäœæãããBaselineTopologyã¯ãããããžã«ååšããããŒããèšæ¶ããŠããŸãã åèµ·ååŸãåããŒãã¯ä»ã®BLTããŒãã®ã¹ããŒã¿ã¹ã確èªããŸãã ãã¹ãŠã®ããŒãããªã³ã©ã€ã³ã«ãªããšããã«ãã¯ã©ã¹ã¿ãŒãèªåçã«ã¢ã¯ãã£ãã«ãªããŸãã
Bun No. 2-ãããã¯ãŒã¯ã®ç¯çŽã ãã®èãæ¹ã¯ãããããžãé·æéå®å®ãããŸãŸã«ãªããšããåæã«åºã¥ããŠããŸãã 以åã¯ãããŒãã10åéããããžãŒãçµäºããŠãããã£ãã·ã¥ããŒãã£ã·ã§ã³ã®ãªãã©ã³ã¹ãéå§ãããããã¯ã¢ããã®æ°ãç¶æãããŠããŸããã ããããããŒãã®åé¡ãæ°å以å ã«è§£æ±ºãããåã³ãªã³ã©ã€ã³ã«ãªãå Žåããããã¯ãŒã¯ãªãœãŒã¹ã浪費ããã¯ã©ã¹ã¿ãŒã®é床ãäœäžãããçç±ã¯äœã§ããã BaselineTopologyã¯ãã®åäœãæé©åããŸãã
çŸåšãããã©ã«ãã®ã¯ã©ã¹ã¿ãŒã¯ãåé¡ã®ããããŒããããã«ãµãŒãã¹ã«æ»ããšæ³å®ããŠããŸãã ãã®æéäžã®äžéšã®ãã£ãã·ã¥ã¯ãããå°ãªãããã¯ã¢ããã§æ©èœããŸãããããã«ãããµãŒãã¹ã®äžæãé床äœäžã¯çºçããŸããã
ããŒã¹ã©ã€ã³ããããžç®¡ç
ããŠããã§ã«1ã€ã®æ¹æ³ãç¥ã£ãŠããŸããBaselineTopologyã¯ãã¯ã©ã¹ã¿ãŒã®æåã®ã¢ã¯ãã£ãåæã«èªåçã«äœæãããŸãã åæã«ãã¢ã¯ãã£ããŒã·ã§ã³æã«ãªã³ã©ã€ã³ã§ãã£ããã¹ãŠã®ãµãŒããŒããŒããBLTã«å«ãŸããŸãã
BLTã®æå管çã¯ãIgniteãã£ã¹ããªãã¥ãŒã·ã§ã³ã®å¶åŸ¡ã¹ã¯ãªããã䜿çšããŠå®è¡ãããŸãã詳现ã«ã€ããŠã¯ãã¯ã©ã¹ã¿ãŒã®ã¢ã¯ãã£ããŒã·ã§ã³ã«é¢ããããã¥ã¡ã³ãããŒãžãã芧ãã ãã ã
ãã®ã¹ã¯ãªããã¯éåžžã«åçŽãªAPIãæäŸããããŒãã®è¿œå ãããŒãã®åé€ãæ°ããBaselineTopologyã®ã€ã³ã¹ããŒã«ã®3ã€ã®æäœã®ã¿ããµããŒãããŸãã
ããã«ãããŒãã®è¿œå ãç¹å¥ãªããªãã¯ã®ãªãéåžžã«åçŽãªæäœã§ããå ŽåãBLTããã¢ã¯ãã£ãããŒããåé€ããããšã¯ãã埮åŠãªã¿ã¹ã¯ã§ãã è² è·ãããã£ãç¶æ ã§ã®å®è¡ã«ã¯ãææªã®å Žåãã¯ã©ã¹ã¿ãŒå šäœã®åçµãšããã¬ãŒã¹ã䌎ããŸãã ãããã£ãŠãåé€ã«ã¯è¿œå ã®æ¡ä»¶ã䌎ããŸããåé€ãããããŒãã¯ãªãã©ã€ã³ã§ãªããã°ãªããŸããã ãªã³ã©ã€ã³ããŒããåé€ããããšãããšãå¶åŸ¡ã¹ã¯ãªããã¯ãšã©ãŒãè¿ããæäœã¯éå§ãããŸããã
ãããã£ãŠãBLTããããŒããåé€ããå ŽåãããŒãã®åæ¢ãšãã1ã€ã®æåæäœãäŸç¶ãšããŠå¿ èŠã§ãã ãã ãããã®ãŠãŒã¹ã±ãŒã¹ã¯æããã«äž»ãªãã®ã§ã¯ãªããããè¿œå ã®äººä»¶è²»ã¯ããã»ã©å€§ãããããŸããã
BLTã管çããããã®Javaã€ã³ã¿ãŒãã§ãŒã¹ã¯ããã«ã·ã³ãã«ã§ãããããŒãã®ãªã¹ãããBaselineTopologyãã€ã³ã¹ããŒã«ãã1ã€ã®æ¹æ³ãæäŸããã ãã§ãã
Java APIã䜿çšããŠBaselineTopologyãå€æŽããäŸïŒ
Ignite ignite = /* ... */; IgniteCluster cluster = ignite.cluster(); // BaselineTopology. Collection<BaselineNode> curBaselineTop = cluster.baselineTopology(); for (ClusterNode node : cluster.topology(cluster.currentTopologyVersion())) { // , BaselineTopology // (shouldAdd(ClusterNode) - ) if (shouldAdd(node) curTop.add(node); } // BaselineTopology cluster.setBaselineTopology(curTop);
ãããã«
ããŒã¿ã®æŽåæ§ã確ä¿ããããšã¯ãããŒã¿ãŠã§ã¢ããŠã¹ã解決ããªããã°ãªããªãæãéèŠãªã¿ã¹ã¯ã§ãã Apache Igniteãå«ãåæ£DBMSã®å Žåããã®åé¡ã®è§£æ±ºçã¯éåžžã«è€éã«ãªããŸãã
BaselineTopologyã®æŠå¿µã«ãããããŒã¿ã®æŽåæ§ãæãªãããå¯èœæ§ã®ããå®éã®ã·ããªãªã®ããã€ããéããããšãã§ããŸãã
Igniteã®ãã1ã€ã®åªå äºé ã¯ããã©ãŒãã³ã¹ã§ããããã§ãBLTã¯ãªãœãŒã¹ãå€§å¹ ã«ç¯çŽããã·ã¹ãã ã®å¿çæéãæ¹åã§ããŸãã
ãã€ãã£ãããŒã·ã¹ãã³ã¹æ©èœã¯ããæè¿ãããžã§ã¯ãã«ç»å Žããééããªãéçºãããä¿¡é Œæ§ãé«ãŸããçç£æ§ãåäžãã䜿ãããããªããŸãã ããã«äŒŽããBaselineTopologyã®æŠå¿µãçºå±ããŸãã