Node.js ç¨åºå ç¨å
å 90MB-110MBï¼å©ä½å
åé½è¢«ç£çç¼åå æ®ã
以æçäºè§£ï¼Python å Ruby ä¸çé Event Driven ç Framework æ ¹æ¬ä¸å¯è½è¾¾å°è¿æ ·çæ§è½ã
ç¶å说说 Node.js çå
¶ä»ä¼ç¹
Node.js çæ¶æä¸ Django, Rails çä¼ ç»ç Framework ä¸åï¼ä¸éè¦æ¾å¨ Nginx / Apache åï¼å©ç¨ WSGIï¼ CGI ä¹ç±»çæ¥å£ä¸æ¿ä¸ç¼ç [æ¥åRequest] -> [è¿è¡ç¨åºé»è¾] -> [çæ并è¿åResponse]ãè¿æ¯ä¸ä¸ªå·¨å¤§çååï¼ä¹åä¸äºæ æ³æ³è±¡çåè½é½æå¯è½å®ç°äºãæ¯å¦
https://github.com/Miserlou/DirtyShare å¯ä»¥ç¨æµè§å¨å®ç° P2P çæä»¶ä¼ è¾ãæ£å 为 Node.js å¯ä»¥æ´ç²¾ç»çæ§å¶ Request å Response çæ¶é´åå
容ï¼websocket ä¼¼ä¹å¤©çå°±æ¯ä¸º Node.js èççï¼èé
å
http://socket.io è¿ä¸ªç¥å¥çåºä¹åï¼å¨ realtime webapp è¿ä¸ªé¢åï¼Node.js å·²ç»æ²¡æ对æäºã
Node.js çå
管çå¨ npm 设计å¾æ¯ python å ruby 好å¾å¤ãæå¾å¤ç module å¼åè
ã
å½ç¶ä¹æä¸äºç¼ºç¹
Debug å¾å°é¾ã没æ stack traceï¼åºäºé®é¢å¾é¾æ¥æ¾é®é¢çåå ã
å¦æ设计ä¸å¥½ï¼å¾å®¹æ让代ç å
满 callback ãå®å¨åä¸äºçå¯ä»¥èèä¸ä¸
https://github.com/laverdet/node-fibers/ è¿ä¸ªé¡¹ç®ãä¸è¿ Node.js çæ ¸å¿å¢é并ä¸æ¨è使ç¨ã