Node.jsã®ãã©ãããã©ã¼ã æ½è±¡åã©ã¤ãã©ãªlibuv
Node.jsã¯ãWindowsã®IOCPã«ããéåæI/Oã«å¯¾å¿ããã®ãæ©ã«ããã©ãããã©ã¼ã æ½è±¡å層ãåé¢ãã¦å¥ã®ã©ã¤ãã©ãªã«ã¾ã¨ããããã ãããã«ã¯ãc-ares(éåæDNSãªã¯ã¨ã¹ãã©ã¤ãã©ãª)ãlibevã®ãããªå¤é¨ã©ã¤ãã©ãªãåæã«å«ã¾ãã¦ããã(BSDL)
nmoshã¯æ¬¡ã®ãã¼ã¸ã§ã³ã§ã¯Windowsã®IOCPã¨MacOS X/FreeBSDã®kqueueã«ããéåæI/Oããµãã¼ãããäºå®ã§ãåæ§ã®æ½è±¡å層ãèªåã§æã£ã¦ãã(ãã ãCã§ã¯ãªãSchemeå´ã§åã£ã¦ãã)ãlibuvã®ãããªã©ã¤ãã©ãªã«å¤æ³¨ããã®ã¯è¯ãã¢ã¤ãã¢ã«æãããã© :
- Node.jsã¯ã·ã³ã°ã«ã¹ã¬ãããåæã«ãããã¶ã¤ã³ã§ããããã(ãããã)libuvã¯ã¹ã¬ããã»ã¼ãã§ãªãã
- nmoshã¯"Schemeã使ã£ã¦(EthernetãUSBã®)ãã±ãããæä½ãã"ã¨ããã«åç¹ãç½®ãã®ã§ããã¤ãã¹ããªã¼ã ãåæã¨ããlibuvã®APIã ã¨åã¾ããæªã
ã¨ããå°å³ãªåé¡ãããã
ãã ãç¾å®çãªåé¡ã¨ãã¦ãWindowsã®ãããªéåæ I/Oã¯ä»ã«Solaris(ãAIX)ã«ãããããåå¨ããªãã®ã§ãåºæ¬çã«ã¯libuvãããã®è¡¨ç¾åã§ããã¦ãã®OSã®éåæI/Oæ©è½ã¯è¡¨ç¾ã§ãã¦ãã¾ããã
Windowsã¨ãã®ä»ã®éåæI/Oã®éãã¯âã®ããã¸ã§ã¯ãWebãã¼ã¸ã¨ãã¦ç´¹ä»ããã¦ãããhttp://tinyclouds.org/iocp-links.htmlãã¨ãããã¬ã¼ã³ã®PDF http://nodejs.org/nodeconf.pdf ã«è©³ããã
IOCPã¯I/O Completion Portã§ãããI/Oã®å®äºãããã¨ããã®ã大ããªãã¤ã³ãã«ãªã£ã¦ãããepollãkqueueã§ã¯ãã¼ã¿ã®èªã¿æ¸ãReadyããæ¥ãªãã®ã§ãå®éã®èªã¿æ¸ããå¾ããè¡ãå¿
è¦ããããä¸å¿POSIX AIOã¨ãã¦æ¨æºã¯åå¨ããããä¾ãã°Linuxã¯æ®éã®ã¹ã¬ããã使ã£ã¦ã¨ãã¥ã¬ã¼ã·ã§ã³ãã¦ããã
éåæI/Oãµã¼ããã¹ã¬ããã»ã¼ãã§ããã¹ããã©ããã¯å°å³ã ãã©éè¦ãªåé¡ã ãããnmoshã®å ´åã¯OpenCLã®ãããªæ¼ç®ããã¤ã¹ã®æ½è±¡åAPIããµãã¼ãããªããã°ãªããªãã®ã§ãã¹ã¬ããã»ã¼ãã«ããªãé¸æè¢ã¯ç¡ãããã(OpenCLã¯ããã»ã¹éã§æ¼ç®å¨ãå
±æãããã¨ãèæ
®ãã¦ããªãããIOCPã®ãããªOSèªä½ã®éåæI/Oã¤ã³ãã©ã¨æ··åãããã¨ã¯ã§ããªããããã¹ã¬ããã§å¾
ã¡åããé¨åã¯ã©ããã¦ãæ®ããã¨ã«ãªãã)
ãã ãnode.jsã®ããã«ãããã¯ã¼ã¯I/Oã«å¯¾è±¡ãçµãããã¼ã¿ã®å¦çã¯ä»ã®ããã»ã¹ã«æããã¨ãããã¶ã¤ã³ã許容ããããªããã·ã³ã°ã«ã¹ã¬ãããåæã¨ããã·ã¹ãã ã§ãååã«æ©è½ããå¯è½æ§ãé«ãã