ããã«ã¡ã¯ï¼æè¡éçºé¨ã®æµ æ²¼ã§ãï¼
å æãForkwellãã ã¨ã®ã³ã©ãã¤ãã³ããHow Ruby performed Higherããéå¬ãã¾ããã
ããã§ã¯ããRubyã§Pub/Sub messaging ã Multi Process, Daemonizesããã¢ããªã±ã¼ã·ã§ã³éçºã®äºä¾ãã¨é¡ãã¦ã IDCFã¯ã©ã¦ãã®ãµã¼ãã¹ãå®ç¾ãã¦ããããã¯ã¨ã³ãã·ã¹ãã ã®ã¢ã¼ããã¯ãã£ã¨éçºäºä¾ãç´¹ä»ãã¾ããã
IDCFã¯ã©ã¦ãRDBãã¤ã³ãã£ãããLBã®ããã¯ã¨ã³ãã·ã¹ãã ã¯ãRubyã§éçºããPub/Sub messaging ãç¨ããã¢ããªã±ã¼ã·ã§ã³ã稼åãã¦ãã¾ãã
Rubyã¨ããã¨Ruby on Railsãå©ç¨ããMVCãªWebã¢ããªã±ã¼ã·ã§ã³ãæãæµ®ãã¹ãã¨æãã¾ãããä»å㯠Multi Process, Daemonizes ãæ´»ç¨ããã¹ã±ã¼ã©ãã«ãã¤ãã¤ããã©ã¼ãã³ã¹ãç®æããããã¯ã¨ã³ãã·ã¹ãã ãç´¹ä»ãã¾ãã
ããã¯ã¨ã³ãã·ã¹ãã æ§ç¯ã®ãã¤ã³ã
ããã¯ã¨ã³ãã·ã¹ãã ã®æ§æãèããä¸ã§ããªã¯ã¨ã¹ãã¨ã¬ã¹ãã³ã¹ã®æ§è½ãã¹ã±ã¼ã©ããªãã£ãèæ ®ãããã¨ã常ã«æ±ããããã¨æãã¾ãããã®è¦ä»¶ãæºããä¸ã¤ã®æ¹æ³ã¨ãã¦ããªã¯ã¨ã¹ãã®éåæåãèãããã¾ãã
IDCFã¯ã©ã¦ãã®ããã¯ã¨ã³ãã·ã¹ãã ã«ããã¦ãéåæåã¯éè¦ãªãã¤ã³ãã«ãªãã¾ããåãµã¼ãã¹ã®ç®¡çç¨DBãã¯ã©ã¦ãåºç¤ã®å種APIãªã©ä¸ã¤ã®ãµã¼ãã¹ãå®ç¾ããããã«ãæ§ã ãªé£æºãµã¼ãã¹ãå©ç¨ãã¾ãã
ããã¼ã¸ããªãµã¼ãã¹ã®å ´åãã¦ã¼ã¶ã¼ã«æä¾ããä»®æ³ãã·ã³ã«ã¯ç®¡çç¨ã®Agentãµã¼ãã¹ã稼åãã¦ãã¾ãããã®Agentããå種ç¶æ³ã«å¿ãã¦ã¤ãã³ããçºçããããAgentã¸ã¤ãã³ããéä¿¡ãããªã©ã®å¦çãçºçããããã¾ãããµã¼ãã¹ã®å©ç¨æ¡å¤§ã«å¿ãã¦ç®¡çããAgentæ°ã®å¢æ¸ãçºçããã¤ãã³ãã®å¢æ¸ãªã©ããã®ã¹ã±ã¼ã©ããªãã£ã«Pub/Sub messagingã¨ããå½¢ã¯ããã¿ãªå½ã¦ã¯ã¾ãã¾ããã
é«å¯ç¨æ§ãå®ç¾ãããã«ããªã¼ã¸ã§ã³é ç½®
å¯ç¨æ§ã«ããã¦ãPub/Sub messagingã§ãããã¨ããã¤ã³ãã«ãªãã¾ããPub/Subã§æ§ç¯ãããåã¢ããªã±ã¼ã·ã§ã³ã¯ããã±ã¼ã·ã§ã³ä¸ã§ãåæ£é ç½®ãããã¨ãå¯è½ã«ãªãã¾ãã
å½ç¤¾ãã¼ã¿ã»ã³ã¿ã¼ãæ´»ç¨ãã¦ãã«ããªã¼ã¸ã§ã³ä¸ã«ã¢ããªã±ã¼ã·ã§ã³ãåæ£é ç½®ãMessage Queueingãæ ãããã«ã¦ã§ã¢ãªã©ãã¯ã©ã¹ã¿åãã¦é ç½®ãããã¨ã§é«å¯ç¨æ§ãå®ç¾ãããã¨ãã§ãã¾ããã
ã¢ããªã±ã¼ã·ã§ã³ã®ã¹ã±ã¼ã©ããªãã£ããã¤ããã©ã¼ãã³ã¹å
åã¢ããªã±ã¼ã·ã§ã³ã®ããã©ã¼ãã³ã¹ãã¹ã±ã¼ã©ããªãã£ã»å¯ç¨æ§ã§ã¯ãRubyã¨ServerEngineã®çµã¿åãããæ´»ç¨ãã¦ãããã¨ããã¤ã³ãã¨ãªã£ã¦ãã¾ãã
ServerEngineã¯ããã«ãããã»ã¹åããã¢ããªã±ã¼ã·ã§ã³ã«æé©åãããå ç¢ãªRubyã®ãã¬ã¼ã ã¯ã¼ã¯ã§ããServerEngineã®Supervisorãå©ç¨ãããã¨ã«ãã£ã¦ãããã»ã¹ã®èªåãªã¹ã¿ã¼ããã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã®ãã¤ãããã¯ãªåèªè¾¼ãªã©ãå¯è½ã¨ãªã£ã¦ãã¾ããããã稼åãã¦ããããã»ã¹ãç°å¸¸çµäºããã¨ãã¦ããè¨å®ããããã»ã¹æ°ãç¶æããããã«æ°ããããã»ã¹ãèªåçã«èµ·åãã¦ããã¾ããä¸å°ã®ãµã¼ãã§å¿ è¦ãªä¸¦åæ°ãç¶æãã¦ããã©ã¼ãã³ã¹ãã¹ã±ã¼ã©ããªãã£ãã³ã³ããã¼ã«ãããå ´åã«ããã®ServerEngineã®ç¹æ§ãå½¹ã«ç«ã¡ã¾ãã
Railsã§ãã«ãããã»ã¹åãè¡ãã¨ãä¸ã¤ã®ããã»ã¹ã®ä½¿ç¨ã¡ã¢ãªéããªã¼ãããããæ°ã«ãªãã¾ãããRuby+ServerEngineãå©ç¨ãããã¨ã§ãå¿ è¦ãªgemã®ã¿ãèªã¿åºãããã«ãã¦ãã¾ããå®è£ ã¯ãã¯ã©ã¹ã®æ§æãã話ããã¨ãå¤ãã常ã«ã³ã¼ãã£ã³ã°ã¹ãã«ãéãããã¾ãã
以ä¸ã®ããã«ãPub/Sub messagingãæ´»ç¨ããã¹ã±ã¼ã©ããªãã£ã¨é«å¯ç¨æ§ãRuby+ServerEngineã«ãããã«ãããã»ã¹åããã¢ããªã±ã¼ã·ã§ã³ã®ãã¤ããã©ã¼ãã³ã¹ãæèãã¦æ¥ã éçºã«åãçµãã§ãã¾ãã
ãããã«
Rubyã§ãã«ãããã»ã¹ãæ´»ç¨ããã¢ããªã±ã¼ã·ã§ã³äºä¾ã¯ãªããªãçããããã§ãå½æ¥ã®åå è ã®çããã«ã¯ãPub/Sub messagingã®ãã¤ã³ããServerEngineã®å®ç¨äºä¾ã好è©ã§ããã次åãæ©ä¼ãããã°Pub/Sub messagingãå©ç¨ããã¢ããªã±ã¼ã·ã§ã³å®è£ ã®ãã³ãºãªã³ããã£ã¦ã¿ããã¨æã£ã¦ãã¾ãã
ã¾ã ã¾ã ãMessage Queueingãæ ãããã«ã¦ã§ã¢ã®æ§è½ãå¼ãåºããããåã¢ããªã±ã¼ã·ã§ã³ã®ã¯ã©ã¹æ§æãããã¹ãã¼ãã«ããããã¤ã³ã¿ã¼ãã§ã¼ã¹ãããçºå±ãããããªã©ãææ¦ããããã¨ã¯ãã£ã±ãããã¾ããã¢ã¼ããã¯ãããããã«ã¦ã§ã¢ã詳細è¨è¨ã»å®è£ ã¾ã§ãä¸ç·ã«Rubyã§ã¢ããªã±ã¼ã·ã§ã³ãéçºãã¦ã¯ã©ã¦ããµã¼ãã¹ãå®ç¾ãããã¨ã«èå³ã®ããã¨ã³ã¸ãã¢ãåéãã¦ãã¾ãã詳ããã¯æ¡ç¨ãã¼ã¸ã¾ã§ï¼